#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi


as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in #(
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

# Use a proper internal environment variable to ensure we don't fall
  # into an infinite loop, continuously re-executing ourselves.
  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
    _as_can_reexec=no; export _as_can_reexec;
    # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
  fi
  # We don't want this to propagate to other subprocesses.
          { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
  setopt NO_GLOB_SUBST
else
  case \`(set -o) 2>/dev/null\` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi
"
  as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }

exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :

else
  exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
test -x / || exit 1"
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
  if (eval "$as_required") 2>/dev/null; then :
  as_have_required=yes
else
  as_have_required=no
fi
  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :

else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  as_found=:
  case $as_dir in #(
	 /*)
	   for as_base in sh bash ksh sh5; do
	     # Try only shells that exist, to save several forks.
	     as_shell=$as_dir/$as_base
	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
  CONFIG_SHELL=$as_shell as_have_required=yes
		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
  break 2
fi
fi
	   done;;
       esac
  as_found=false
done
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
  CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
IFS=$as_save_IFS


      if test "x$CONFIG_SHELL" != x; then :
  export CONFIG_SHELL
             # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi

    if test x$as_have_required = xno; then :
  $as_echo "$0: This script requires a shell more modern than all"
  $as_echo "$0: the shells that I found on your system."
  if test x${ZSH_VERSION+set} = xset ; then
    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
  else
    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
  fi
  exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS

## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset

# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p

# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  $as_echo "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits


  as_lineno_1=$LINENO as_lineno_1a=$LINENO
  as_lineno_2=$LINENO as_lineno_2a=$LINENO
  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }

  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  # already done that, so ensure we don't try to do so again and fall
  # in an infinite loop.  This has already happened in practice.
  _as_can_reexec=no; export _as_can_reexec
  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    # In both cases, we have to default to `cp -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_test_x='test -x'
as_executable_p=as_fn_executable_p

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"


test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1

# Name of the host.
# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

#
# Initializations.
#
ac_default_prefix=/usr/local
ac_clean_files=
ac_config_libobj_dir=.
LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=
PACKAGE_URL=

ac_unique_file="mk/ptII.mk.in"
ac_default_prefix=$PTII
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#ifdef HAVE_STRING_H
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"

ac_subst_vars='LTLIBOBJS
LIBOBJS
PTWEBSOCKET_DIR
WABA_DIR
WABA_CLASSES
PTVIEWER_PACKAGES
PTVIEWER_DIR
PTVERTX_PACKAGES
PTVERTX_DIR
PTVERTX_JARS
PTVERTX_SOCKET_DIR
PTUSERINTERFACE_DIR
PTUDPSOCKET_DIR
PTTEXTDISPLAY_DIR
GIOTTO_DIR
GIOTTO_CLASSES
TOSDIR_NO_CYGDRIVE
TOSROOT_NO_CYGDRIVE
TOOLS_JAR
TINI_DIR
TINI_CLASSES
SOOT_DIR
SOOT_CLASSES
RXTX_PRESENT
RXTX_JAR
PTII_LOCALURL
PTXBJLIB_PACKAGES
PTXBJLIB_JARS
PTXBEE_DIR
PTWEBCAMCAPTURE_PACKAGES
PTWEBCAMCAPTURE_JARS
PTWABA_DIR
PTGIOTTO_DIR
PTTINYOS_DIR
PTTINI_DIR
PTSTRUCTURALCODER_JAR
PTSPHINX4_PACKAGES
PTSPHINX4_DIR
PTSPHINX4_DATA_JAR
PTSPHINX4_CORE_JAR
PTSPACEDOMAIN_PACKAGES
PTSPACEDOMAIN_JAR
PTSPACE_DIR
PTSLF4J_SIMPLE_JAR
PTSLF4J_API_JAR
PTSERIAL_DIR
PTSCALA_PACKAGES
PTSCALA_DIR
PTRXTX_PACKAGES
PTRTOOL_PACKAGES
PTRTOOL_JNLP_JARS
PTRTOOL_JARS
PTRTOOL_DIR
ANTLR_DIR
PTPTALON_PACKAGES
PTPTALON_DIR
PTPROTOBUF_JAR
PTPROCESSING_JARS
PTSVGSALAMANDER_PACKAGES
PTSVGSALAMANDER_JAR
PTSVGSALAMANDER_DIR
PTSVG_JAR
PTSVG_DIR
SPHINX4_JAR
PTRSYNTAXTEXTAREA_PACKAGES
PTRSYNTAXTEXTAREA_JAR
PTRSYNTAXTEXTAREA_DIR
PTPSDF_DIR
PTPDFRENDERER_JAR
PTPDFRENDERER_DIR
PTPAHO_MQTT_PACKAGES
PTPAHO_MQTT_JAR
PTPAHO_MQTT_DIRS
PTOSCP5_PACKAGES
PTOSCP5_DIR
PTOSCP5_JAR
PTOPENCV_PACKAGES
PTOPENCV_INCLUDE_DIR
PTOPENCV_DIR
PTNASHORN_JAR
PTMODULE_PATH_COMMAND_LINE
PTMODULE_PATH_ANT
PTMODULE_PATH
PTMETROII_PACKAGES
PTMETROII_DIR
PTMESCAL_DIR
PTMBED_DIR
PTMATLAB_PACKAGES
PTMATLAB_MEXEXT
PTMATLAB_64LD_ARGS
PTMATLAB_LD_ARGS
PTMATLAB_JARS
PTMATLAB_DIR
PTMATLAB_CC_FLAGS
PTLIBEXPAT_DIR
PTLEJOS_DIR
PTLEGO_DIR
PTLBNL_PACKAGES
PTLBNL_JARS
PTLBNL_CROOM_JAR
PTLBNL_CROOM_DIR
PTLBNL_DIR
PTKVM_DIR
PTKIELER_DIR
PTJYTHON_PACKAGES
PTJYTHON_DIR
PTJXL_JAR
PTJUNIT_PACKAGES
PTJUNIT_DIR
PTJSOUP_PACKAGES
PTJSOUP_DIR
PTJSOUP_JAR
PTJSON_PACKAGES
PTJSON_JAR
PTJSON_DIR
PTJOYSTICK_PACKAGES
PTJOYSTICK_DIR
PTJOGL_DIR
PTJNI_LIBRARIES
PTJNI_SHAREDLIBRARY_SUFFIX2
PTJNI_SHAREDLIBRARY_SUFFIX
PTJNI_SHAREDLIBRARY_PREFIX
PTJNI_SHAREDLIBRARY_LDFLAG
PTJNI_SHAREDLIBRARY_CFLAG
PTJNI_GCC_SHARED_FLAG
PTJNI_NO_CYGWIN
PTJNI_LIB_ARCHITECTURE
PTJNI_DL_LIBRARY
PTJNI_INCLUDE
PTJNI_ARCHITECTURE
PTJNI_DIR
PTJMODELICA_PACKAGES
PTJMODELICA_DIR
PTJMF_PACKAGES
PTJMF_DIR
PTJJS_PACKAGES
PTJJS_DIR
PTJCERTI_JAR
PTJAVAMAIL_PACKAGES
PTJAVAMAIL_JARS
PTJAVAMAIL_DIR
PTJAVAFX_PACKAGES
PTJAVAFX_JAR
PTJAVAFX_DIR
PTJAVA3D_DIR
PTJAVA32_DIR
PTJAVA18_PACKAGES
PTJAVA_HOME
PTJAVA_DIR_NO_CYGDRIVE
PTJAVA_DIR
PTJAVACV_PACKAGES
PTJAVACV_DIR
PTJAI_PACKAGES
PTJAI_DIR
PTJACL_JAR
PTJACL_DIR
PTIMUSENSOR_DIR
PTITEXTPDF_PACKAGES
PTITEXTPDF_JAR
PTITEXTPDF_DIR
PTII
PTHTTPSERVER_DIR
PTHTTPCLIENT_DIR
PTHOMER_PACKAGES
PTHOMER_JARS
PTHOMER_DIR
PTHLACERTI_PACKAGES
PTHLACERTI_DIR
PTGR_PACKAGES
PTGRDOMAIN_JAR_FULL
PTGRDOMAIN_JAR
PTGMP_LIB
PTGMP_LD_FLAGS
PTGMP_INCLUDE
PTG4LTL_PACKAGES
PTG4LTL_DIR
PTG4LTL_JAR
PTFMIPP_PACKAGES
PTFMIPP_DIR
PTFMI_PACKAGES
PTFMI_DIR
PTEXCEL_PACKAGES
PTEXCEL_DIR
PTEVENTBUS_DIR
PTDOCLETS_DIR
PTDISTRIBUTED_PACKAGES
PTDISTRIBUTED_JARS
PTDISTRIBUTED_DIR
PTDATABASE_PACKAGES
PTDATABASE_JNLP_JARS
PTDATABASE_DIR
PTCUNIT_DIR
PTCORBA_PACKAGES
PTCORBA_DIR
PTCOPERNICUS_DIR
PTCOMM_PACKAGES
PTCOMM_DIR
PTCOLT_PACKAGES
PTCOLT_JARS
PTCOLT_DIR
PTCM_DIR
PTCHIC_DIR
PTCAMERAS_DIR
PTCALTROP_DIR
PTBSH_PACKAGES
PTBSH_RUN_DIR
PTBSH_MLC_DIR
PTBSH_JAR
PTBOOST_INCLUDE_DIR
PTBACKTRACK_ECLIPSE_PACKAGES
PTBACKTRACK_ECLIPSE_JARS
PTBACKTRACK_ECLIPSE_DOC_JARS
PTBACKTRACK_ECLIPSE_DIR
PTBACKTRACK_DIR
PTASM_JAR
PTADD_MODULES_COMMAND_LINE
PTADD_MODULES_ANT_JAVAC
PTADD_MODULES_ANT
PTADD_MODULES
PTACCESSOR_DIR
PSDF_DIR
ORACLE_OJDBC_JAR
OPENCV_JAR
MYSQL_JAR
MATLAB_64LIBDIR
MATLAB_LIBDIR
MATLAB_DIR
MAJOR_OS_NAME
LIBEXPAT_LIB_DIR
LIBEXPAT_INCLUDE_DIR
LEJOS_DIR
KVM_DIR
KVM_CLASSES
KIELER_JAR
JYTHON_DIR
JUNIT_JARS
JODE_CLASSES
JNA_JAR
JMODELICA_HOME
JMF_JARS
JVERSION_TARGET
JVERSION
JJTREE_OPTIONS
JTCLSH
JOYSTICK_JAR
JINI_PRESENT
JINI_DIR
JDOCTAGLET
JDOCTAG
JDOCSOURCEFLAGS
JDOCBREAKITERATOR
JAVAX_CRYPTO_JAR
JAVACV_JAR
JAVACC_DIR
JAVACC_OPTIONS
JAVACC
JAVA3D_JARS
JAVA_SYSTEM_JAR
JAR_INDEX
JAI_JARS
IMAGEJ_JAR
ECLIPSE_CLASSPATHENTRY_LIBS
ECLIPSE_EXCLUDING_SRC
GC_LD_DIRECTIVE
GC_INCLUDE_DIR
ECLIPSE_DIR
ECLIPSE_CLASSPATHENTRY_PDE_REQUIREDPLUGINS
CMKIT_DIR
COBERTURA_JAR
COBERTURA_DIR
COLT_DIR
CLASSPATHSEPARATOR
CHIC_DIR
CHECKSTYLE_JAR
CHECKSTYLE_DIR
CALTROP_DIR
ANT_SRC
ANT_WEBSENSOR_SRC
ANT_WEBSENSOR_SOURCEPATH
ANT_WEBSENSOR_FILESET
ANT_MAVEN_BUILD_WEBSENSOR
ANT_MAVEN_SUBPROJECTS
ANT_MAVEN_ARTIFACT
ANT_JAVADOC_EXCLUDEPACKAGENAMES
ANT_EXCLUDE_TESTS
ANT_EXCLUDE
ANT_CLASSPATH
ANT_ALWAYS_EXCLUDE
ANT_PATH
SCALA
SCALAC
PTMATLAB_CC
MATLAB
JAVAH
PTCCJNI
JJTREE
PTNPM
PTNODE
PTJYTHON_BAT
PTJYTHON
ac_ct_CXX
CXXFLAGS
CXX
EGREP
GREP
CPP
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
PTCC
PTECLIPSE
ECLIPSE
JAVADOC
MVN
GAWK
GIT
KEYTOOL
JAVAWS
JARSIGNER
JAR
JAVA32
JAVA
JAVAC
FIND
CMD_PATH
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_verbose
with_find
with_java
with_java32
with_asm
with_nashorn
with_gawk
with_boost
with_cmkit
with_cal
with_checkstyle
with_chic
with_colt
with_cobertura
with_cunit
with_tools_jar
with_eclipse
with_gc_include
with_gcc_arm
with_itextpdf
with_openideutil
with_openideutillookup
with_netbeansapivisual
with_jcerti
with_javamail
with_javafx_jar
with_jna_jar
with_joystick_jar
with_ptjacl_jar
with_jsoup
with_junit
with_junitparams
with_jxl
with_jython
with_kieler_jar
with_opencv_jar
with_oscp5
with_rxtx
with_lejos
with_javacc
with_java3D
with_jogl
with_jini
with_jode
with_kvm
with_pahoMqtt
with_mapss
with_antlr
with_soot
with_javasystemjar
with_mysql
with_ojdbc
with_sphinx_data
with_sphinx_core
with_pdfrenderer
with_batikjar
with_svgsalamanderjar
with_rsyntaxeditor
with_tini
with_giotto
with_waba
with_slf4j_api
with_slf4j_simple
with_webcam_capture
with_expat_include
'
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP
CXX
CXXFLAGS
CCC'


# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
ac_unrecognized_opts=
ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

ac_prev=
ac_dashdash=
for ac_option
do
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval $ac_prev=\$ac_option
    ac_prev=
    continue
  fi

  case $ac_option in
  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  *=)   ac_optarg= ;;
  *)    ac_optarg=yes ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case $ac_dashdash$ac_option in
  --)
    ac_dashdash=yes ;;

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir=$ac_optarg ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$ac_optarg ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file=$ac_optarg ;;

  --config-cache | -C)
    cache_file=config.cache ;;

  -datadir | --datadir | --datadi | --datad)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    datadir=$ac_optarg ;;

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$ac_optarg ;;

  -disable-* | --disable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=no ;;

  -docdir | --docdir | --docdi | --doc | --do)
    ac_prev=docdir ;;
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
    docdir=$ac_optarg ;;

  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
    ac_prev=dvidir ;;
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
    dvidir=$ac_optarg ;;

  -enable-* | --enable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=\$ac_optarg ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix=$ac_optarg ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

  -host | --host | --hos | --ho)
    ac_prev=host_alias ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host_alias=$ac_optarg ;;

  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
    ac_prev=htmldir ;;
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  | --ht=*)
    htmldir=$ac_optarg ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir=$ac_optarg ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir=$ac_optarg ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir=$ac_optarg ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir=$ac_optarg ;;

  -localedir | --localedir | --localedi | --localed | --locale)
    ac_prev=localedir ;;
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
    localedir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst | --locals)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    localstatedir=$ac_optarg ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir=$ac_optarg ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c | -n)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir=$ac_optarg ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix=$ac_optarg ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix=$ac_optarg ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix=$ac_optarg ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name=$ac_optarg ;;

  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
    ac_prev=pdfdir ;;
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
    pdfdir=$ac_optarg ;;

  -psdir | --psdir | --psdi | --psd | --ps)
    ac_prev=psdir ;;
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
    psdir=$ac_optarg ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir=$ac_optarg ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir=$ac_optarg ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site=$ac_optarg ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir=$ac_optarg ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir=$ac_optarg ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target_alias ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target_alias=$ac_optarg ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=\$ac_optarg ;;

  -without-* | --without-*)
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=no ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes=$ac_optarg ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries=$ac_optarg ;;

  -*) as_fn_error $? "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information"
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    case $ac_envvar in #(
      '' | [0-9]* | *[!_$as_cr_alnum]* )
      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
    esac
    eval $ac_envvar=\$ac_optarg
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
    ;;

  esac
done

if test -n "$ac_prev"; then
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  as_fn_error $? "missing argument to $ac_option"
fi

if test -n "$ac_unrecognized_opts"; then
  case $enable_option_checking in
    no) ;;
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  esac
fi

# Check all directory arguments for consistency.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir
do
  eval ac_val=\$$ac_var
  # Remove trailing slashes.
  case $ac_val in
    */ )
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
      eval $ac_var=\$ac_val;;
  esac
  # Be sure to have absolute directory names.
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done

# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: To remove some day.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  as_fn_error $? "pwd does not report name of working directory"


# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then the parent directory.
  ac_confdir=`$as_dirname -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_myself" : 'X\(//\)[^/]' \| \
	 X"$as_myself" : 'X\(//\)$' \| \
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_myself" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  srcdir=$ac_confdir
  if test ! -r "$srcdir/$ac_unique_file"; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r "$srcdir/$ac_unique_file"; then
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
	pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
  srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_env_${ac_var}_value=\$${ac_var}
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
done

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures this package to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print \`checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for \`--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then

  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-verbose,	configure prints verbose msgs

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-find=PATH         use the find command from PATH,
                           PTJAVA_DIR environment variable
  --with-java=DIR         use Java binaries from DIR,
                           defaults to the value of the
                           PTJAVA_DIR environment variable
  --with-java32=DIR         use 32-bit Java binaries from DIR,
                           defaults to the value of the
                           PTJAVA32_DIR environment variable
  --with-asml=$asm_jar use asm-core-xx.y.jar
                       defaults to $asm_jar
  --with-nashornl=$nashorn_jar use nashorn-core-xx.y.jar
                       defaults to $nashorn_jar
  --with-gawk=PATH         use the gawk command from PATH with maven and ptolemy/configs/doc/makefile,
                   /usr/bin/gawk
  --with-boost-include=DIR      use boost includes from DIR DIR/boost/numeric/odeint.hpp should exist,
                          defaults to /usr/local/include
  --with-cmkit=DIR       use CaffeineMark from DIR,
                          defaults to \$PTII/vendors/cm
  --with-cal=DIR       use ptCal.jar from DIR,
                          defaults to \$PTII/lib
  --with-checkstyle=DIR    use Checkstyle from DIR,
                          defaults to $PTII/vendors/checkstyle-6.2
  --with-chic=DIR       use chic.jar from DIR,
                          defaults to \$PTII/lib
  --with-colt=DIR       use colt.jar from DIR,
                          defaults to \$PTII/vendors/misc/colt
  --with-cobertura=DIR    use Cobertura from DIR,
                          defaults to $PTII/vendors/cobertura-2.0.3
  --with-cunit=DIR    use CUnit from DIR,
                          defaults to /usr/local or $PTII/vendors/CUnit
  --with-tools_jar=DIR    use tools.jar from DIR,
                          defaults to \$PTJAVA_HOME/../lib/tools.jar
  --with-eclipse=ECLIPSE_DIR     use Eclipse from ECLIPSE_DIR,
                         defaults to $TMP_ECLIPSE_DIR
  --with-gc-include=DIR       use gc.h from DIR
                          defaults to \$PTII/vendors/gc/gc/include
  --with-gcc-arm=GCC_BINARY       use gcc-arm
                          defaults to \$PTII/vendors/mbed/gcc-arm/bin/arm-none-eabi-gcc
  --with-itextpdf=JARFILE       use iText from JARFILE,
                          defaults to \$PTII/vendors/misc/itext/iText.jar
  --with-openideutil=JAR       use org-openide-util.jar from JAR,
                          defaults to \$PTII/lib/org-openide-util.jar
  --with-openideutillookup=JAR       use org-openide-util-lookup.jar from JAR,
                          defaults to \$PTII/lib/org-openide-util-lookup.jar
  --with-netbeansapivisual=JAR       use org-netbeans-api-visual.jar from JAR,
                              defaults to \$PTII/lib/org-netbeans-api-visual.jar
  --with-jcerti=JAR       use jcert.jar from JAR,
                          defaults to \$PTII/lib/jcerti.jar
  --with-javamail=DIRECTORY       use JavaMail interface from DIRECTORY,
                          defaults to \$PTII/lib
  --with-javafx=PATH         use JavaFX from PATH,
                          defaults to $TMP_JAVAFX_DIR
        JAVAFX_DIR=$withval
  --with-jna-jar=JARFILE       use JNA from JARFILE,
                          defaults to \$PTII/jna-4.0.0-variadic.jar
  --with-joystick-jar=JARFILE       use JOYSTICK from JARFILE,
                          defaults to \$PTII/vendors/misc/joystick/Joystick.jar
  --with-ptjacl_jar=PTJACL.JAR  ptjacl.jar file,
                           used for running the test scripts
  --with-jsoup=JAR       use jsoup.jar from JAR,
                          defaults to \$PTII/lib/jsoup-1.14.2.jar
  --with-junit=JARFILE       use JUnit Testing Framework from JARFILE,
                          defaults to \$PTII/lib/junit-4.8.2.jar
  --with-junitparams=JARFILE       use JUnitParams Testing Framework from JARFILE,
                          defaults to \$PTII/lib/JUnitParams-0.4.0.jar
  --with-jxl=JARFILE       use Java Excel API from JARFILE,
                          defaults to \$PTII/ptolemy/actor/lib/excel/jxl.jar
  --with-jython=DIR       use jython.jar from DIR,
                          defaults to \$PTII/lib, though the path
			  is searched for jython
  --with-kieler-jar=JARFILE       use JARFILE,
                          defaults to \$PTII/lib/kieler.jar
  --with-opencv-jar=JARFILE       use OpenCV from JARFILE,
                          defaults to \$PTII/lib/opencv-320.jar
  --with-oscp5=JAR       use oscP5.jar from JAR,
                          defaults to \$PTII/lib/oscP5.jar
  --with-rxtx=DIR       use Java Serial Port Interface rxtx from DIR,
                          defaults to $RXTX_JAR_DEFAULT
  --with-lejos=DIR       use Java lejos from DIR,
                          defaults to \$PTII/vendors/lejos/lejosBeta3
  --with-javacc=DIR       use JavaCC.zip from DIR,
                           defaults to \$PTII/vendors/sun/javacc-5.0
  --with-java3D=DIR       use j3dcore.jar, j3dutils.jar,
                          and vecmath.jar from DIR.  Usually Java 3D is
			  installed in the JDK in jre/lib/ext or $PTII/vendors/j3d
  --with-jogl=DIR       use jogl-all.jar and gluegen.jar from DIR,
			  Java3D under Mac OS with JDK 1.7 and later requires Jogl.
			  Usually Jogl is installed in $PTII/vendors/jogl
  --with-jogl=DIR       use Jogl from DIR
			  Java3D under Linux with JDK 9 or 10 and later requires Jogl.
  --with-jini=DIR       use Jini jars from DIR,
                          defaults to \$PTII/ptolemy/distributed/jini
  --with-jode=DIR       use JODE from DIR,
                          defaults to \$PTII/vendors/jode/1.1.2-pre1
  --with-json=DIR       use JSON from DIR,
                          defaults to \$PTII/org/json
  --with-kvm=DIR       use PalmOS KVM from DIR,
                          defaults to \$PTII/vendors/sun/j2me_cldc
  --with-paho-mqtt-jar=Jar       use Paho MQTT from JAR,
                                  defaults to \$PTII/lib/org.eclipse.paho.client.mqttv3.jar
  --with-mapss=DIR       use mapss.jar from DIR,
                          defaults to \$PTII/lib
  --with-antlr=DIR       use antlr.jar from DIR,
                          defaults to \$PTII/ptolemy/actor/ptalon/antlr'
  --with-soot=DIR       use SOOT from DIR,
                          defaults to \$PTII/lib
  --with-javasystemjar=DIR       use rt.lib from DIR,
                          defaults to JRE java.home property with lib/rt.jar appended
  --with-mysql=/path/to/mysql.jar  path to mysql.jar
                          defaults to \$PTII/ptolemy/actor/lib/database/$MYSQL_TARGET_JAR
  --with-ojdbc=/path/to/ojdbcN.jar  path to $OJDBC_TARGET_JAR
                          defaults to \$PTII/ptolemy/actor/lib/database/$OJDBC_TARGET_JAR
  --with-sphinx-data-jar=/path/to/sphinx4-data-5prealpha.jar  path to
                          defaults to \$PTII/vendors/misc/sphinx4/sphinx4-data-5prealpha.jar
  --with-sphinx-core-jar=/path/to/sphinx4-core-5prealpha.jar path to
                          defaults to \$PTII/vendors/misc/sphinx4/sphinx4-core-5prealpha.jar
  --with-pdfrenderer=PDFRENDERER_JAR     use PDFRenderer PDFRENDERER_JAR
                          defaults to \$PTII/lib/PDFRenderer.jar
  --with-batikjar=BATIK_JAR     use Batik jar BATIK_JAR,
                          defaults to \$KEPLER/lib/jar/batik-all-1.9.jar
  --with-svgsalamanderjar=SVGSALAMANDER_JAR     use svgSalamander jar file,
                                  defaults to \$PTT/lib/svgSalamander.jar
  --with-rsyntaxeditor=RSYNTAXTEXTAREA_JAR     use RSyntaxEditor jar,
                          defaults to \$PTII/lib/rsyntaxtextarea-2.6.0-SNAPSHOT.jar
  --with-tini=DIR       use TINI from DIR,
                          defaults to \$PTII/vendors/dalsemi/tini
  --with-giotto=DIR       use GiottoSDF from DIR,
                          defaults to \$PTII/vendors/giotto
  --with-vertx=LIB       use vertx jars from JAR,
                              defaults to \$PTII/lib
  --with-waba=DIR       use PalmOS WABA from DIR,
                          defaults to \$PTII/vendors/misc/waba/wabasdk
  --with-slf4j-api=SLF4J_API_JAR     use slf4j-api SLF4J_API_JAR
                          defaults to \$PTII/lib/slf4j-api-1.7.13.jar
  --with-slf4j-simple=SLF4J_SIMPLE_JAR     use slf4j-simple SLF4J_SIMPLE_JAR
                              defaults to \$PTII/lib/slf4j-simple-1.7.13.jar
  --with-webcam-capture=WEBCAMCAPTURE_JAR     use webcam-capture WEBCAMCAPTURE_JAR
                          defaults to \$PTII/lib/webcam-capture-0.3.12.jar
  --with-xbjlib=DIR       use Java Serial Port Interface rxtx from DIR,
                          defaults to $XBJLIB_JAR_DEFAULT
  --with-expat-include=DIR       use expat.h from DIR
                          defaults to /usr/include

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to the package provider.
_ACEOF
ac_status=$?
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d "$ac_dir" ||
      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
      continue
    ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix

    cd "$ac_dir" || { ac_status=$?; continue; }
    # Check for guested configure.
    if test -f "$ac_srcdir/configure.gnu"; then
      echo &&
      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
    elif test -f "$ac_srcdir/configure"; then
      echo &&
      $SHELL "$ac_srcdir/configure" --help=recursive
    else
      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi || ac_status=$?
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
configure
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi

## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##

# ac_fn_c_try_compile LINENO
# --------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_compile

# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_link

# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_cpp ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } > conftest.i && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_cpp

# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
ac_fn_c_check_header_mongrel ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if eval \${$3+:} false; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_header_compiler=yes
else
  ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <$2>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  ac_header_preproc=yes
else
  ac_header_preproc=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
  yes:no: )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
  no:yes:* )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_mongrel

# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then :
  ac_retval=0
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
       $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_run

# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_compile

# ac_fn_cxx_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_compile

# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $2 innocuous_$2

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $2 (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $2

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char $2 ();
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined __stub_$2 || defined __stub___$2
choke me
#endif

int
main ()
{
return $2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_func
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by $as_me, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    $as_echo "PATH: $as_dir"
  done
IFS=$as_save_IFS

} >&5

cat >&5 <<_ACEOF


## ----------- ##
## Core tests. ##
## ----------- ##

_ACEOF


# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_must_keep_next=false
for ac_pass in 1 2
do
  for ac_arg
  do
    case $ac_arg in
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    | -silent | --silent | --silen | --sile | --sil)
      continue ;;
    *\'*)
      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
    2)
      as_fn_append ac_configure_args1 " '$ac_arg'"
      if test $ac_must_keep_next = true; then
	ac_must_keep_next=false # Got value, back to normal.
      else
	case $ac_arg in
	  *=* | --config-cache | -C | -disable-* | --disable-* \
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
	  | -with-* | --with-* | -without-* | --without-* | --x)
	    case "$ac_configure_args0 " in
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
	    esac
	    ;;
	  -* ) ac_must_keep_next=true ;;
	esac
      fi
      as_fn_append ac_configure_args " '$ac_arg'"
      ;;
    esac
  done
done
{ ac_configure_args0=; unset ac_configure_args0;}
{ ac_configure_args1=; unset ac_configure_args1;}

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  {
    echo

    $as_echo "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
    echo
    # The following way of writing the cache mishandles newlines in values,
(
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done
  (set) 2>&1 |
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      sed -n \
	"s/'\''/'\''\\\\'\'''\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
      ;; #(
    *)
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
)
    echo

    $as_echo "## ----------------- ##
## Output variables. ##
## ----------------- ##"
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=\$$ac_var
      case $ac_val in
      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      $as_echo "$ac_var='\''$ac_val'\''"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      $as_echo "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=\$$ac_var
	case $ac_val in
	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	$as_echo "$ac_var='\''$ac_val'\''"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      $as_echo "## ----------- ##
## confdefs.h. ##
## ----------- ##"
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      $as_echo "$as_me: caught signal $ac_signal"
    $as_echo "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
    exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h

$as_echo "/* confdefs.h */" > confdefs.h

# Predefined preprocessor variables.

cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF

cat >>confdefs.h <<_ACEOF
#define PACKAGE_URL "$PACKAGE_URL"
_ACEOF


# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
  # We do not want a PATH search for config.site.
  case $CONFIG_SITE in #((
    -*)  ac_site_file1=./$CONFIG_SITE;;
    */*) ac_site_file1=$CONFIG_SITE;;
    *)   ac_site_file1=./$CONFIG_SITE;;
  esac
elif test "x$prefix" != xNONE; then
  ac_site_file1=$prefix/share/config.site
  ac_site_file2=$prefix/etc/config.site
else
  ac_site_file1=$ac_default_prefix/share/config.site
  ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
  test "x$ac_site_file" = xNONE && continue
  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$ac_site_file" >&5
    . "$ac_site_file" \
      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
  fi
done

if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special files
  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . "$cache_file";;
      *)                      . "./$cache_file";;
    esac
  fi
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
$as_echo "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in $ac_precious_vars; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val=\$ac_cv_env_${ac_var}_value
  eval ac_new_val=\$ac_env_${ac_var}_value
  case $ac_old_set,$ac_new_set in
    set,)
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
	# differences in whitespace do not lead to failure.
	ac_old_val_w=`echo x $ac_old_val`
	ac_new_val_w=`echo x $ac_new_val`
	if test "$ac_old_val_w" != "$ac_new_val_w"; then
	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	  ac_cache_corrupted=:
	else
	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
	  eval $ac_var=\$ac_old_val
	fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    *) ac_arg=$ac_var=$ac_new_val ;;
    esac
    case " $ac_configure_args " in
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
## -------------------- ##

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu



#PT_VERBOSE=1

# Check whether --enable-verbose was given.
if test "${enable_verbose+set}" = set; then :
  enableval=$enable_verbose; PTVERBOSE=1
fi


if test "${PTVERBOSE:-none}" = "none"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: For more verbose output, run ./configure --enable-verbose" >&5
$as_echo "For more verbose output, run ./configure --enable-verbose" >&6; }
fi


# PT_MSG_RESULT

# PT_MSG_STATUS


# Fix permissions on files.
# If the distribution was in a jar file, then some files might not be executable.
execFiles="ptolemy/util/test/junit/javachdir configure bin/ant bin/node bin/npm"
for file in $execFiles
do
    if test -f $file -a ! -x $file; then
        # PT_MSG_RESULT(Making $file executable.)
        chmod a+x $file
    fi
done

# Java does not find things in c:/program files/java
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your path has 'program files/java' instead of 'Program Files/Java' " >&5
$as_echo_n "checking if your path has 'program files/java' instead of 'Program Files/Java' ... " >&6; }
echo "$PATH" | egrep 'program files/java' > /dev/null
status=$?
if test "$status" -eq 0 ; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
    Temporarily changing your path within configure for Java because
    Java can't find c:/program files/java, but can find
    c:/Program files/Java." >&5
$as_echo "$as_me: WARNING:
    Temporarily changing your path within configure for Java because
    Java can't find c:/program files/java, but can find
    c:/Program files/Java." >&2;}
   PATH="`echo $PATH | sed 's@program files/java@Program Files/Java@g'`"
else
   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
fi

# We must have PTII set before running configure.
if test -z "$PTII"; then
    if test -n "$PTOLEMY"; then
	if test -d "$PTOLEMY/tycho/java"; then
	    echo "\$PTOLEMY/tycho/java exists, setting PTII to that value"
	    PTII="$PTOLEMY/tycho/java"
	    # We should not have to call AC_PREFIX_DEFAULT($PTII) here
	    # but autoconf shuffles things around, so the call to
	    # AC_PREFIX_DEFAULT($PTII) that is 15 or so lines below
	    # actually appears at the top of configure.
	    ac_default_prefix=$PTII
	else
	    echo "You must set the PTII environment variable before running configure"
	    exit 3
	fi
    else
	echo "You must set the PTII environment variable before running configure"
	exit 3
    fi

fi

if test  ! -d "$PTII"; then
    echo "\$PTII is set to '$PTII', but it does not exist"
    exit 3
fi

if test  ! -w "$PTII"; then
    echo "Warning: \$PTII is set to '$PTII', but it is not writable by you."
    echo "This may or may not be a problem.  If you are running under"
    echo "Windows, then you might be able to ignore this problem and"
    echo "proceed with the build.  If you continue to have problems,"
    echo "try upgrading to cygwin1.1.0 or later"
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if \$PTII ('$PTII') has backslashes" >&5
$as_echo_n "checking if \$PTII ('$PTII') has backslashes... " >&6; }
echo "$PTII" | egrep '\\' > /dev/null
status=$?
if test "$status" -eq 1 ; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok
    '$PTII' does not contain backslashes" >&5
$as_echo "ok
    '$PTII' does not contain backslashes" >&6; }; fi
else
    as_fn_error $? "
    \$PTII == $PTII,
    which contains backslashes.  Even under Windows, please set
    PTII to use forward slashes." "$LINENO" 5
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if \$PTII ('$PTII') and the current directory are the same\"" >&5
$as_echo_n "checking if \$PTII ('$PTII') and the current directory are the same\"... " >&6; }
canonicalPTII=`cd "$PTII"; pwd`
if test "$canonicalPTII" != "`pwd`" ; then
    currentDirectory="`pwd`"
    FINAL_WARNING="Perhaps $PTII is set to a directory other \
    than the current directory? \
    'cd \"$PTII\"; pwd' yields \"$canonicalPTII\", which is not the \
    same as 'pwd', which is \"$currentDirectory\""
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FINAL_WARNING" >&5
$as_echo "$as_me: WARNING: $FINAL_WARNING" >&2;}
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if \$PTII ('$PTII') contains \"cygdrive\"" >&5
$as_echo_n "checking if \$PTII ('$PTII') contains \"cygdrive\"... " >&6; }
echo "$PTII" | egrep 'cygdrive|cygwin' > /dev/null
status=$?
if test "$status" -eq 1 ; then
    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok
    '$PTII' does not contain cygdrive or cygwin, which is right." >&5
$as_echo "ok
    '$PTII' does not contain cygdrive or cygwin, which is right." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\$PTII == $PTII,
which contains 'cygdrive' or 'cygwin'.
It could be that you have incorrectly set PTII.
If you have installed Cygwin in c:/cygwin, and your Ptolemy II installation
is in a directory outside of the c:/cygwin tree, then Cygwin may
change your PTII variable to include \"/cygdrive/c\".  This
will cause problems with non-Cygwin tools like javac that do
not understand /cygdrive/c

PTII can end up with cygdrive or cygwin in it if
you mistakenly do something like PTII=\`pwd\`.

Under Cygwin, try permanently setting PTII in the control panel
(Start->Control Panels->Advanced->Environment Variables)
or temporary set it within bash:
  export PTII=c:/Users/YourLogin/ptII
and then rerun
  ./configure
See $PTII/doc/install.htm for details.'" >&5
$as_echo "$as_me: WARNING: '\$PTII == $PTII,
which contains 'cygdrive' or 'cygwin'.
It could be that you have incorrectly set PTII.
If you have installed Cygwin in c:/cygwin, and your Ptolemy II installation
is in a directory outside of the c:/cygwin tree, then Cygwin may
change your PTII variable to include \"/cygdrive/c\".  This
will cause problems with non-Cygwin tools like javac that do
not understand /cygdrive/c

PTII can end up with cygdrive or cygwin in it if
you mistakenly do something like PTII=\`pwd\`.

Under Cygwin, try permanently setting PTII in the control panel
(Start->Control Panels->Advanced->Environment Variables)
or temporary set it within bash:
  export PTII=c:/Users/YourLogin/ptII
and then rerun
  ./configure
See $PTII/doc/install.htm for details.'" >&2;}
fi


case "`uname -s`" in
    CYGWIN_NT-*)
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \$PTII ('$PTII') contains \"cygwin\"" >&5
$as_echo_n "checking if \$PTII ('$PTII') contains \"cygwin\"... " >&6; }
        cygpath -w "$PTII" | grep cygwin > /dev/null
        status=$?
        if test "$status" -eq 1 ; then
	     if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok
  \$PTII is '$PTII', which does not contain cygwin, which is right." >&5
$as_echo "ok
  \$PTII is '$PTII', which does not contain cygwin, which is right." >&6; }; fi
        else
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
'cygpath -w \$PTII' == '\`cygpath -w $PTII\`'
which contains 'cygwin'.
This could happen if your home directory is in the default location
for cygwin which cygwin thinks is /home/yourname,
but windows thinks is c:\\cygwin\\home\\yourname.
This will cause problems with non-Cygwin tools like javac that do
not understand Cygwin directory structure and mounts will not
be able to find files in $PTII.
The solution is to move the Ptolemy II tree outside of
c:\\cygwin and to set the PTII variable to point to that location
and then rerun
  cd \$PTII
  ./configure
See $PTII/doc/install.htm for details.'" >&5
$as_echo "$as_me: WARNING:
'cygpath -w \$PTII' == '\`cygpath -w $PTII\`'
which contains 'cygwin'.
This could happen if your home directory is in the default location
for cygwin which cygwin thinks is /home/yourname,
but windows thinks is c:\\cygwin\\home\\yourname.
This will cause problems with non-Cygwin tools like javac that do
not understand Cygwin directory structure and mounts will not
be able to find files in $PTII.
The solution is to move the Ptolemy II tree outside of
c:\\cygwin and to set the PTII variable to point to that location
and then rerun
  cd \$PTII
  ./configure
See $PTII/doc/install.htm for details.'" >&2;}
     fi
     ;;
esac


# If we are under Cygwin, check that we can find CMD
case "`uname -s`" in
    CYGWIN_NT-*)
	# Extract the first word of "cmd", so it can be a program name with args.
set dummy cmd; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CMD_PATH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CMD_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CMD_PATH="$CMD_PATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CMD_PATH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CMD_PATH=$ac_cv_path_CMD_PATH
if test -n "$CMD_PATH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMD_PATH" >&5
$as_echo "$CMD_PATH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	if test ! -x "$CMD_PATH"; then
			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the 'cmd' command, which
    is used by the $PTII/bin/ptolemy script.
    Under Windows 2000, cmd is usually found at c:\\winnt\\system32\\cmd.exe.
    Under Windows XP, cmd is usually found at c:\\windows\\system32\\cmd.exe.
    You may need to modify your PATH to explicitly include
    c:\\winnt\\system32 by going or c:\\windows\\system32 by going to
    to Start->Settings->Control Panels->System->Environment and changing
    %SystemRoot%\\system32 to c:\\winnt\\system32 or c:\\windows\\system32." >&5
$as_echo "$as_me: WARNING: Failed to find the 'cmd' command, which
    is used by the $PTII/bin/ptolemy script.
    Under Windows 2000, cmd is usually found at c:\\winnt\\system32\\cmd.exe.
    Under Windows XP, cmd is usually found at c:\\windows\\system32\\cmd.exe.
    You may need to modify your PATH to explicitly include
    c:\\winnt\\system32 by going or c:\\windows\\system32 by going to
    to Start->Settings->Control Panels->System->Environment and changing
    %SystemRoot%\\system32 to c:\\winnt\\system32 or c:\\windows\\system32." >&2;}
	fi
	;;

    *) ;;
esac

PTII_DEFAULT=$PTII
# The default value of prefix



#--------------------------------------------------------------------
#	The PTII directory as a URL
#--------------------------------------------------------------------

# Read the PTII variable and substitute forward slashes
# for backward slashes

case "`uname -s`" in
CYGWIN_ME-*)
	windows="yes"
	# Windows ME is not a real os, and it does not have CMD.
	# So, we punt
	PTII_DIR=$PTII
	;;
CYGWIN_98-*)
	windows="yes"
	# Windows 98 is not a real os, and it does not have CMD.
	# So, we punt
	PTII_DIR=$PTII
	;;
CYGWIN*)
	windows="yes"
	# We use cmd /c chdir here to get rid of /cygwin/c
	PTII_DIR=`(cd "$PTII"; cmd /c chdir) | tr -d '\r' | sed 's@\\\@/@g'`
	;;
*)
	windows="no"
	PTII_DIR=$PTII
	;;
esac

#--------------------------------------------------------------------
#       Look for the "find" command
#--------------------------------------------------------------------

# Check whether --with-find was given.
if test "${with_find+set}" = set; then :
  withval=$with_find; FIND=$withval
else
  FIND=/usr/bin/find
fi

# Extract the first word of "find", so it can be a program name with args.
set dummy find; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_FIND+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $FIND in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
FIND=$ac_cv_path_FIND
if test -n "$FIND"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
$as_echo "$FIND" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test `echo "$FIND" | grep system32`; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your path is probably messed up, you have a system32
    directory in your path before /bin" >&5
$as_echo "$as_me: WARNING: Your path is probably messed up, you have a system32
    directory in your path before /bin" >&2;}
    FIND=/bin/find
fi

if test ! -f "$FIND"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find the "find" command, looked in \"$FIND\"" >&5
$as_echo "$as_me: WARNING: Could not find the "find" command, looked in \"$FIND\"" >&2;}
fi

# Substitute %20 for any spaces.
PTII_LOCALURL=`echo "file:///$PTII_DIR" | sed 's/ /%20/g'`
#--------------------------------------------------------------------
#	See if there was a command-line option for where Java is;  if
#	not, check to see if the PTJAVA_DIR environment variable is set;
#       if it is not, look for javac on the path.
#       NOTE: If your javac compiler is in /usr/bin, then PTJAVA_DIR is
#       likely to be set to /usr.  Consider using PTJAVA_HOME if
#       you are looking for Java jar files.
#       Note that PTJAVA_HOME is set to the jre directory, wheras
#       PTJAVA_DIR is set to the directory above the jre directory.
#       PTJAVA_HOME will _not_ have a trailing slash.
#--------------------------------------------------------------------


# Check whether --with-java was given.
if test "${with_java+set}" = set; then :
  withval=$with_java; PTJAVA_DIR=$withval
fi


if test -d "$PTJAVA_DIR"; then
	if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result:
    PTJAVA_DIR environment variable was set to
    '$PTJAVA_DIR', and there is a directory
    at that location, so we will try it." >&5
$as_echo "
    PTJAVA_DIR environment variable was set to
    '$PTJAVA_DIR', and there is a directory
    at that location, so we will try it." >&6; }; fi
else
    if test -z "$PTJAVA_DIR"; then
	if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: PTJAVA_DIR environment variable was not set,
    so we search for the java compiler." >&5
$as_echo "PTJAVA_DIR environment variable was not set,
    so we search for the java compiler." >&6; }; fi
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PTJAVA_DIR environment variable is set to
    '${PTJAVA_DIR}', which is not a directory,
    so we search for the java compiler." >&5
$as_echo "$as_me: WARNING: PTJAVA_DIR environment variable is set to
    '${PTJAVA_DIR}', which is not a directory,
    so we search for the java compiler." >&2;}
    fi
    # Extract the first word of "javac", so it can be a program name with args.
set dummy javac; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVAC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVAC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVAC=$ac_cv_path_JAVAC
if test -n "$JAVAC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
$as_echo "$JAVAC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test -x "$JAVAC"; then
	JAVABIN=`dirname "$JAVAC"`
	PTJAVA_DIR=`dirname "$JAVABIN"`
	if test "$PTJAVA_DIR" = "/"; then
	    if test -d /usr/java; then
		PTJAVA_DIR=/usr/java
	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  Found javac in \"$JAVABIN\", /usr/java exists, so
  we are setting PTJAVA_DIR to '$PTJAVA_DIR'" >&5
$as_echo "$as_me: WARNING:  Found javac in \"$JAVABIN\", /usr/java exists, so
  we are setting PTJAVA_DIR to '$PTJAVA_DIR'" >&2;}
	    fi
	fi
        if test "$PTJAVA_DIR" = "/usr"; then
	    # $PTII/vendors/ptinyos/tinyos-1.x/contrib/ptII/ptinyos/tools/make/ptII/ptII.rules
	    # uses -I$(PTJAVA_DIR).  If PTJAVA_DIR is /usr, then compilation of the ptinyos
	    # demos fails.
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking PTJAVA_DIR == /usr, checking for links" >&5
$as_echo_n "checking PTJAVA_DIR == /usr, checking for links... " >&6; }
	    startdir=$PTII
	    cd "$srcdir/config"
	    if "$JAVAC" RootDirectory.java ; then
	        { $as_echo "$as_me:${as_lineno-$LINENO}: checking the value of the Java directory " >&5
$as_echo_n "checking the value of the Java directory ... " >&6; }
		# Extract the first word of "java", so it can be a program name with args.
set dummy java; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVA+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVA=$ac_cv_path_JAVA
if test -n "$JAVA"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
$as_echo "$JAVA" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


		if env "$JAVA" -classpath "$PTII/config" RootDirectory "$JAVAC"> /dev/null; then

		    PTJAVA_DIR_TMP=`"$JAVA" -classpath "$PTII/config" RootDirectory "$JAVAC"`

		    # Use changequote to protect the square brackets in sed
	            # Remove /cygdrive so we can compile with MSVC
		    #PTJAVA_DIR_REAL=`echo "$PTJAVA_HOME_TMP" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
       	            if test -d "$PTJAVA_DIR_TMP"; then
		        PTJAVA_DIR="$PTJAVA_DIR_TMP"
		        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJAVA_DIR'" >&5
$as_echo "'$PTJAVA_DIR'" >&6; }; fi ;
		    else
		        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$JAVA -classpath \"$PTII/config\" RootDirectory \"$JAVAC\"' failed.
    We will not be able to search for the canonical Java home directory." >&5
$as_echo "$as_me: WARNING: '$JAVA -classpath \"$PTII/config\" RootDirectory \"$JAVAC\"' failed.
    We will not be able to search for the canonical Java home directory." >&2;};
		    fi
	        else
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'cd config; $JAVAC RootDirectory.java' failed.
    We will not be able to search for the canonical Java home directory." >&5
$as_echo "$as_me: WARNING: 'cd config; $JAVAC RootDirectory.java' failed.
    We will not be able to search for the canonical Java home directory." >&2;};
	        fi
	        cd "$startdir"
            fi
        fi
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  Failed to find javac, perhaps Java is not installed?" >&5
$as_echo "$as_me: WARNING:  Failed to find javac, perhaps Java is not installed?" >&2;}
    fi

    # The default location that we look for the JDK.  This should probably
    # be a list that includes /usr/local/jdk and /opt/jdk
    if test ! -d "$PTJAVA_DIR"; then
	DEFAULT_JDK=/opt/jdk1.7
	if test -d "$DEFAULT_JDK"; then
	    PTJAVA_DIR=`cd "$DEFAULT_JDK"; pwd`
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '${PTJAVA_DIR}' is not a directory, using the default '${DEFAULT_JDK}'" >&5
$as_echo "$as_me: WARNING: '${PTJAVA_DIR}' is not a directory, using the default '${DEFAULT_JDK}'" >&2;}

	else
	    DEFAULT_JDK=/usr/java
	    if test -d "$DEFAULT_JDK"; then
		PTJAVA_DIR=`cd "$DEFAULT_JDK"; pwd`
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '${PTJAVA_DIR}' is not a directory, using the default '${DEFAULT_JDK}'" >&5
$as_echo "$as_me: WARNING: '${PTJAVA_DIR}' is not a directory, using the default '${DEFAULT_JDK}'" >&2;}
	    else
			    as_fn_error $? "
Java directory $DEFAULT_JDK doesn't exist.
Be sure that the directory that contains javac and java is in your path.
Typically, under Windows, this directory might be c:\Program Files\Java\jdk1.8.0_45\bin
For instructions about adding to a directory to your path permanently,
consult your user documentation.
Under bash, you may temporarily add a directory with something like:
  PATH=/cygdrive/c/Program\ Files/Java/jdk1.8.0_45/bin:\$PATH
  export PATH
  rm config.*; ./configure
You may also try --with-java=DIR, or set the PTJAVA_DIR environment variable
to the directory where your jdk is located:
  export PTJAVA_DIR=/cygdrive/c/Program\ Files/Java/jdk1.8.0_45
  rm config.*; ./configure
but adding the directory to your path is likely to work best." "$LINENO" 5
	    fi
	fi
    fi
fi

# PTJAVA_DIR without /cygdrive
# Use changequote here to preserve square brackets
PTJAVA_DIR_NO_CYGDRIVE="`echo "$PTJAVA_DIR" | sed 's@/cygdrive/\([a-z]\)/@\1:/@'`"





if test ! -d "ptolemy/actor/lib/fmi/"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ptolemy/actor/lib/ is not present,
    so we need not find a 32-bit JVM for testing." >&5
$as_echo "ptolemy/actor/lib/ is not present,
    so we need not find a 32-bit JVM for testing." >&6; }; fi
else
#--------------------------------------------------------------------
#	See if there was a command-line option for where the 32-bit Java is;  if
#	not, check to see if the PTJAVA32_DIR environment variable is set;
#       if it is not, look for javac on the path.
#       NOTE: If your javac compiler is in /usr/bin, then PTJAVA32_DIR is
#       likely to be set to /usr.  Consider using PTJAVA32_HOME if
#       you are looking for Java jar files.
#       Note that PTJAVA_HOME is set to the jre directory, wheras
#       PTJAVA_DIR is set to the directory above the jre directory.
#       PTJAVA_HOME will _not_ have a trailing slash.
#--------------------------------------------------------------------


# Check whether --with-java32 was given.
if test "${with_java32+set}" = set; then :
  withval=$with_java32; PTJAVA32_DIR=$withval
fi


if test -d "$PTJAVA32_DIR"; then
	if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result:
    PTJAVA32_DIR environment variable was set to
    '$PTJAVA32_DIR', and there is a directory
    at that location, so we will try it." >&5
$as_echo "
    PTJAVA32_DIR environment variable was set to
    '$PTJAVA32_DIR', and there is a directory
    at that location, so we will try it." >&6; }; fi
else
    if test -z "$PTJAVA32_DIR"; then
	if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: PTJAVA32_DIR environment variable was not set,
    so we search for the java compiler." >&5
$as_echo "PTJAVA32_DIR environment variable was not set,
    so we search for the java compiler." >&6; }; fi
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PTJAVA32_DIR environment variable is set to
    '${PTJAVA32_DIR}', which is not a directory,
    so we search for the java compiler." >&5
$as_echo "$as_me: WARNING: PTJAVA32_DIR environment variable is set to
    '${PTJAVA32_DIR}', which is not a directory,
    so we search for the java compiler." >&2;}
    fi
    java -d32 -version > /dev/null
    retval=$?
    if test $retval = 0; then
        PTJAVA32_DIR=${PTJAVA_DIR}
	if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Running java -d32 -version succeeded,
    so PTJAVA32_DIR is $PTJAVA_32DIR" >&5
$as_echo "Running java -d32 -version succeeded,
    so PTJAVA32_DIR is $PTJAVA_32DIR" >&6; }; fi
    else
        # Extract the first word of "java32", so it can be a program name with args.
set dummy java32; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVA32+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVA32 in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVA32="$JAVA32" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVA32="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVA32=$ac_cv_path_JAVA32
if test -n "$JAVA32"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA32" >&5
$as_echo "$JAVA32" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	JAVA32BIN=`dirname "$JAVA32"`
	PTJAVA32_DIR=`dirname "$JAVA32BIN"`
	if test -x "$JAVA32"; then
	 if test "$PTJAV32_DIR" = "/"; then
	    if test -d /usr/java; then
		PTJAVA32_DIR=/usr/java
	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  Found java32 in \"$JAVA32BIN\", /usr/java exists, so
  we are setting PTJAVA32_DIR to '$PTJAVA32_DIR'" >&5
$as_echo "$as_me: WARNING:  Found java32 in \"$JAVA32BIN\", /usr/java exists, so
  we are setting PTJAVA32_DIR to '$PTJAVA32_DIR'" >&2;}
	    fi
	  fi
          if test "$PTJAVA32_DIR" = "/usr" -o "$PTJAVA32_DIR" = "/usr/local"; then
	    # $PTII/vendors/ptinyos/tinyos-1.x/contrib/ptII/ptinyos/tools/make/ptII/ptII.rules
	    # uses -I$(PTJAVA_DIR).  If PTJAVA_DIR is /usr, then compilation of the ptinyos
	    # demos fails.
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking PTJAVA32_DIR == /usr or /usr/local, checking for links" >&5
$as_echo_n "checking PTJAVA32_DIR == /usr or /usr/local, checking for links... " >&6; }
	    startdir=$PTII
	    cd "$srcdir/config"
	    if "$JAVAC" RootDirectory.java ; then
	        { $as_echo "$as_me:${as_lineno-$LINENO}: checking the value of the Java directory " >&5
$as_echo_n "checking the value of the Java directory ... " >&6; }
		if env "$JAVA32" -classpath "$PTII/config" RootDirectory "$JAVA32"> /dev/null; then

		    PTJAVA32_DIR_TMP=`"$JAVA32" -classpath "$PTII/config" RootDirectory "$JAVA32"`

		    # Use changequote to protect the square brackets in sed
	            # Remove /cygdrive so we can compile with MSVC
		    #PTJAVA_DIR_REAL=`echo "$PTJAVA_HOME_TMP" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
       	            if test -d "$PTJAVA32_DIR_TMP"; then
		        PTJAVA32_DIR="$PTJAVA32_DIR_TMP"
		        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJAVA_DIR'" >&5
$as_echo "'$PTJAVA_DIR'" >&6; }; fi ;
		    else
		        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$JAVA32 -classpath \"$PTII/config\" RootDirectory \"$JAVA32\"' failed.
    We will not be able to search for the canonical 32-bit Java home directory." >&5
$as_echo "$as_me: WARNING: '$JAVA32 -classpath \"$PTII/config\" RootDirectory \"$JAVA32\"' failed.
    We will not be able to search for the canonical 32-bit Java home directory." >&2;};
		    fi
	        else
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'cd \"$PTII/config\"; $JAVAC RootDirectory.java' failed.
    We will not be able to search for the canonical 32-bit Java home directory." >&5
$as_echo "$as_me: WARNING: 'cd \"$PTII/config\"; $JAVAC RootDirectory.java' failed.
    We will not be able to search for the canonical 32-bit Java home directory." >&2;};
	        fi
	        cd "$startdir"
            fi
          fi
        fi
	if test ! -x "$PTJAVA32_DIR/bin/java"; then
	   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Running java -d32 -version failed,
    and $PTJAVA32_DIR/bin/java does not exist.
    Perhaps you need to install a separate 32-bit JVM
    or rerun configure with --with-java32?
    The 32-bit JVM is only needed for certain 32-bit FMI tests.
    In general, under a 64-bit JVM, FMI will work fine without a 32-bit JVM." >&5
$as_echo "$as_me: WARNING: Running java -d32 -version failed,
    and $PTJAVA32_DIR/bin/java does not exist.
    Perhaps you need to install a separate 32-bit JVM
    or rerun configure with --with-java32?
    The 32-bit JVM is only needed for certain 32-bit FMI tests.
    In general, under a 64-bit JVM, FMI will work fine without a 32-bit JVM." >&2;}
        fi
    fi
fi

# PTJAVA32_DIR without /cygdrive
# Use changequote here to preserve square brackets
PTJAVA32_DIR_NO_CYGDRIVE="`echo "$PTJAVA32_DIR" | sed 's@/cygdrive/\([a-z]\)/@\1:/@'`"

fi # Test for ptolemy/actor/lib/fmi


#
# Check that we have the javac that corresponds with PTJAVA_DIR in our path
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the java runtime in $PTJAVA_DIR/bin" >&5
$as_echo_n "checking for the java runtime in $PTJAVA_DIR/bin... " >&6; }
if test -f "$PTJAVA_DIR/bin/java" -o -f "$PTJAVA_DIR/bin/java.exe"; then
    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/bin/java" >&5
$as_echo "$PTJAVA_DIR/bin/java" >&6; }; fi
    # Extract the first word of "java", so it can be a program name with args.
set dummy java; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVA+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVA=$ac_cv_path_JAVA
if test -n "$JAVA"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
$as_echo "$JAVA" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test "$PTJAVA_DIR/bin/java" = "$JAVA"; then
	if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result:     You have the right java in your path,
    \"$PTJAVA_DIR/bin/java\"
      = \"$JAVA\"" >&5
$as_echo "    You have the right java in your path,
    \"$PTJAVA_DIR/bin/java\"
      = \"$JAVA\"" >&6; }; fi
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$PTJAVA_DIR/bin/java' is not
    the same as '$JAVA'.
    Perhaps '$JAVA' is in your path before
    '$PTJAVA_DIR/bin/java'?
    If you have problems later, be sure that you don't have a mismatch
    in JDK versions." >&5
$as_echo "$as_me: WARNING: '$PTJAVA_DIR/bin/java' is not
    the same as '$JAVA'.
    Perhaps '$JAVA' is in your path before
    '$PTJAVA_DIR/bin/java'?
    If you have problems later, be sure that you don't have a mismatch
    in JDK versions." >&2;}
	JAVA="$PTJAVA_DIR/bin/java"
    fi
else
   if test -f "$PTJAVA_DIR/Commands/java"; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/Commands/java" >&5
$as_echo "$PTJAVA_DIR/Commands/java" >&6; }; fi
       # Extract the first word of "java", so it can be a program name with args.
set dummy java; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVA+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVA=$ac_cv_path_JAVA
if test -n "$JAVA"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
$as_echo "$JAVA" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


       if test "$PTJAVA_DIR/Commands/java" = "$JAVA"; then
           if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result:     You have the right java in your path,
    \"$PTJAVA_DIR/Commands/java\"
      = \"$JAVA\"" >&5
$as_echo "    You have the right java in your path,
    \"$PTJAVA_DIR/Commands/java\"
      = \"$JAVA\"" >&6; }; fi
       else
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$PTJAVA_DIR/Commands/java' is not
    the same as '$JAVA'.
    Perhaps '$JAVA' is in your path before
    '$PTJAVA_DIR/Commands/java'?
    If you have problems later, be sure that you don't have a mismatch
    in JDK versions." >&5
$as_echo "$as_me: WARNING: '$PTJAVA_DIR/Commands/java' is not
    the same as '$JAVA'.
    Perhaps '$JAVA' is in your path before
    '$PTJAVA_DIR/Commands/java'?
    If you have problems later, be sure that you don't have a mismatch
    in JDK versions." >&2;}
	JAVA="$PTJAVA_DIR/Commands/java"
      fi
   else
       as_fn_error $? "
  Cannot find '$PTJAVA_DIR/bin/java' or '$PTJAVA_DIR/Commands/java'.
  Try --with-java=DIR, or set the PTJAVA_DIR environment variable.
" "$LINENO" 5
   fi

fi

#
# Check that we have the javac that corresponds with PTJAVA_DIR in our path
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the java compiler in $PTJAVA_DIR/bin" >&5
$as_echo_n "checking for the java compiler in $PTJAVA_DIR/bin... " >&6; }
if test -f "$PTJAVA_DIR/bin/javac"; then
    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/bin/javac" >&5
$as_echo "$PTJAVA_DIR/bin/javac" >&6; }; fi
    # Extract the first word of "javac", so it can be a program name with args.
set dummy javac; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVAC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVAC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVAC=$ac_cv_path_JAVAC
if test -n "$JAVAC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
$as_echo "$JAVAC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test ! -x "$JAVAC"; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the 'javac' command in your path.
        This is not necessarily a problem, since
	'$PTJAVA_DIR/bin/javac' was found, but if you have problems,
	then you may want to adjust your path" >&5
$as_echo "$as_me: WARNING: Failed to find the 'javac' command in your path.
        This is not necessarily a problem, since
	'$PTJAVA_DIR/bin/javac' was found, but if you have problems,
	then you may want to adjust your path" >&2;}
    fi
    if test "$PTJAVA_DIR/bin/javac" = "$JAVAC"; then
        if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result:     You have the right javac in your path,
    \"$PTJAVA_DIR/bin/javac\"
      = \"$JAVAC\"" >&5
$as_echo "    You have the right javac in your path,
    \"$PTJAVA_DIR/bin/javac\"
      = \"$JAVAC\"" >&6; }; fi
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$PTJAVA_DIR/bin/javac' is not
	 the same as '$JAVAC'.
	 Perhaps '$JAVAC' is in your path
	 before '$PTJAVA_DIR/bin/javac'?
	 If you have problems later, be sure that you don't have a mismatch
	 in JDK versions." >&5
$as_echo "$as_me: WARNING: '$PTJAVA_DIR/bin/javac' is not
	 the same as '$JAVAC'.
	 Perhaps '$JAVAC' is in your path
	 before '$PTJAVA_DIR/bin/javac'?
	 If you have problems later, be sure that you don't have a mismatch
	 in JDK versions." >&2;}
	JAVAC="$PTJAVA_DIR/bin/javac"
    fi
else
   if test -f "$PTJAVA_DIR/Commands/javac"; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/Commands/javac" >&5
$as_echo "$PTJAVA_DIR/Commands/javac" >&6; }; fi
       # Extract the first word of "javac", so it can be a program name with args.
set dummy javac; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVAC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVAC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVAC=$ac_cv_path_JAVAC
if test -n "$JAVAC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
$as_echo "$JAVAC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


       if test "$PTJAVA_DIR/Commands/javac" = "$JAVAC"; then
           if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result:     You have the right java in your path,
    \"$PTJAVA_DIR/Commands/javac\"
      = \"$JAVAC\"" >&5
$as_echo "    You have the right java in your path,
    \"$PTJAVA_DIR/Commands/javac\"
      = \"$JAVAC\"" >&6; }; fi
       else
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$PTJAVA_DIR/Commands/javac' is not
    the same as '$JAVAC'.
    Perhaps '$JAVAC' is in your path before
    '$PTJAVA_DIR/Commands/javac'?
    If you have problems later, be sure that you don't have a mismatch
    in JDK versions." >&5
$as_echo "$as_me: WARNING: '$PTJAVA_DIR/Commands/javac' is not
    the same as '$JAVAC'.
    Perhaps '$JAVAC' is in your path before
    '$PTJAVA_DIR/Commands/javac'?
    If you have problems later, be sure that you don't have a mismatch
    in JDK versions." >&2;}
	JAVAC="$PTJAVA_DIR/Commands/javac"
      fi
   else
       as_fn_error $? "
  Cannot find '$PTJAVA_DIR/bin/javac' or '$PTJAVA_DIR/Commands/javac'.
  Try --with-java=DIR, or set the PTJAVA_DIR environment variable." "$LINENO" 5
   fi
fi

#--------------------------------------------------------------------
#	Test the Java Compiler (javac)
#--------------------------------------------------------------------
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the Java compiler with a simple compile" >&5
$as_echo_n "checking the Java compiler with a simple compile... " >&6; }
JVERSION=unknown
# We need to run javac in the config directory so that javac from jdk1.1.6
# under NT and cygwin works properly
startdir="$PTII"

cd "$srcdir/config"
rm -f *.class
if "$JAVAC" confTest.java ; then
    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: confTest.java compiled" >&5
$as_echo "confTest.java compiled" >&6; }; fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking the value of the java.version Property " >&5
$as_echo_n "checking the value of the java.version Property ... " >&6; }
    # Older versions of cygwin might not have env, but 1.1 does
    if env "$JAVA" -classpath "$PTII/config" confTest > /dev/null; then
	# Run it again and get the results
	JVERSION=`"$JAVA" -classpath "$PTII/config" confTest`
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVERSION" >&5
$as_echo "$JVERSION" >&6; }; fi
    else
        case "`uname -s`" in
            CYGWIN_NT-*)
	        # If $PTII is in /home, then suggest moving it.
	        echo "$PTII" | egrep "^/home/" > /dev/null
		status=$?

		if test "$status" -eq 0; then
		    as_fn_error $? "'\"$JAVA\" -classpath \"$PTII/config\" confTest failed.
    If java fails, then you will not be able to run Ptolemy II.'

    You are running under Cygwin and $PTII and starts with /home/.

    By default, Cygwin puts user home directories in /home.
    However, Java will not be able to find directories in Cygwin's /home/ tree.

    The fix is to move $PTII to the /cygdrive/Users/$USERNAME and set
    PTII to c:/Users/$USERNAME/ptII:

       mv $PTII /cygdrive/c/Users/$USERNAME
       export PTII=c:/Users/c/$USERNAME/ptII
       cd \$PTII
       ./configure
    '" "$LINENO" 5
		fi

	        as_fn_error $? "'\"$JAVA\" -classpath \"$PTII/config\" confTest failed.
    If java fails, then you will not be able to run Ptolemy II.'
    This could be because your PTII variable is set incorrectly, perhaps
    it has 'cygwin' or 'cygdrive' in it?

    Under Cygwin, try setting PTII in the control panel
    (Start->Control Panels->Advanced->Environment Variables)
    or temporary set it within bash:
        export PTII=c:/Users/$USERNAME/ptII
    and then rerun
        ./configure
    See $PTII/doc/install.htm for details.'" "$LINENO" 5

            ;;

            *)
	        as_fn_error $? "'\"$JAVA\" -classpath \"$PTII/config\" confTest failed.
    If java fails, then you will not be able to run Ptolemy II.'" "$LINENO" 5
            ;;
        esac
   fi

else
   as_fn_error $? "'cd \"$PTII/config\"; \"$JAVAC\" confTest.java failed.
    If javac fails, then you will not be able to compile Ptolemy II.

    This could be because your PTII variable is set incorrectly.

    Under Cygwin, try setting PTII in the control panel
    (Start->Control Panels->Advanced->Environment Variables)
    or temporary set it within bash:
       export PTII=c:/Users/YourLogin/ptII
    and then rerun
      ./configure
      See $PTII/doc/install.htm for details.'" "$LINENO" 5

fi

# The Major and Minor version of the JDK.  1.6, 1.8 etc.  Used by ant in build.xml.in.
# Sadly, javac 9 and later has a usability bug where "-target 9.0" fails, but "-target 9" works.
# See https://bugs.openjdk.java.net/browse/JDK-8190556
# If you get messages about "javac: invalid target release:", then check that JAVA_HOME
# is set to same JDK as the one that is in your path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java version for use with -target and by Ant in build.xml" >&5
$as_echo_n "checking for Java version for use with -target and by Ant in build.xml... " >&6; }

JVERSION_TARGET=`echo "$JVERSION" |
    awk -F . '{ if ($1 > 8) {
                   print $1
                } else {
		   print $1 "." $2
                }
              }'`

if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVERSION_TARGET" >&5
$as_echo "$JVERSION_TARGET" >&6; }; fi

cd "$startdir"

#--------------------------------------------------------------------
#	We require JDK 1.8 preferred
#--------------------------------------------------------------------

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the JDK version" >&5
$as_echo_n "checking the JDK version... " >&6; }
JDOCSIZE=
UPGRADE_JVM=no
# Ptalon uses generics, which are present only in Java 1.5 and later
HAS_GENERICS=no
JAVA1_6_OR_LATER=no
case "$JVERSION" in
	1.1.*) UPGRADE_JVM=yes;;
	1.2.*) UPGRADE_JVM=yes;;
	1.3.*) UPGRADE_JVM=yes;;
	1.4.*) UPGRADE_JVM=yes;;
	1.5.*) UPGRADE_JVM=yes;;
	1.6.*) case "`uname -s`" in
	           Darwin) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Java 1.6.x is the first JVM in your path.
    Ptolemy II can be built and run with Java 1.6, but under Mac OS X, the Java 1.6 JVM
    from Apple has bugs including occaisionally crashing when closing a window.
    A possible solution is to download Java 1.7 or later for Oracle and be sure that
    the path to the Oracle JDK is in your path before the path to the Apple JDK.
    Typically, the Oracle JDK is installed at
    /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home.
    To adjust the path in Bash, use
    export PATH=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin:\${PATH}" >&5
$as_echo "$as_me: WARNING: Java 1.6.x is the first JVM in your path.
    Ptolemy II can be built and run with Java 1.6, but under Mac OS X, the Java 1.6 JVM
    from Apple has bugs including occaisionally crashing when closing a window.
    A possible solution is to download Java 1.7 or later for Oracle and be sure that
    the path to the Oracle JDK is in your path before the path to the Apple JDK.
    Typically, the Oracle JDK is installed at
    /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home.
    To adjust the path in Bash, use
    export PATH=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin:\${PATH}" >&2;}
               esac
	       UPGRADE_JVM=yes;;
	1.7.*) UPGRADE_JVM=yes;;
        1.8.*) STANDALONE_NASHORN_PROBLEM=yes;;
        9.*) STANDALONE_NASHORN_PROBLEM=yes;;
        10.*) STANDALONE_NASHORN_PROBLEM=yes;;
       	*)     ;;
esac

if test "$STANDALONE_NASHORN_PROBLEM" = "yes"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: As of September, 2021, Ptolemy II is using
    the standalone Nashorn.jar.
    Please upgrade to JDK 11 or later to use the standalone Nashorn jar
    and thus support CapeCode." >&5
$as_echo "$as_me: WARNING: As of September, 2021, Ptolemy II is using
    the standalone Nashorn.jar.
    Please upgrade to JDK 11 or later to use the standalone Nashorn jar
    and thus support CapeCode." >&2;}
fi

if test "$UPGRADE_JVM" = "yes"; then
    case "`uname -s`" in
        Darwin)
     	    upgradeMessage="Mac OS X, ships with Java 1.6 from Apple, but
    later versions of Java are available from Oracle";;
        *)
	    upgradeMessage="";;
    esac

		as_fn_error $? "Ptolemy II requires JDK 1.8 or later.

    JDK 1.2.2 has a bug involving compiling inner classes with protected
    methods.
    The RTOS domain uses java.util.Timer, which is present in JDK 1.3
    and later.
    ptolemy/kernel/attributes/URIAttribute.java uses java.net.URI, which
    is present in JDK 1.4 and later.
    JDK 1.5 or later is required so that these packages can use generics:
	- actor/gui/run, which uses org/mlc/swing
	- actor/lib/vhdl
	- ptalon
    JDK 1.6 or later is needed to use javax.swing.GroupLayout.
    JDK 1.8 is needed for nio and many other features.
    Please upgrade your JDK to 1.8 or later and try again.
    To use Nashorn and support CapeCode, upgrade to JDK 11 or later.
    $upgradeMessage" "$LINENO" 5
else
   # -breakiterator is only present in jdk1.4 and later
   JDOCBREAKITERATOR=-breakiterator
   # Ptalon uses generics, assume 1.5 or greater here
   HAS_GENERICS=yes
   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, you are running $JVERSION" >&5
$as_echo "ok, you are running $JVERSION" >&6; }; fi
fi


# Set PTJAVA_HOME
# Under Cygwin, PTJAVA_HOME will not contain /cygdrive/c
# Under Cygwin, PTJAVA_DIR _will_ contain /cygdrive/c
# We need to run javac in the config directory so that javac from
# jdk1.1.6 under NT and cygwin works properly
startdir=$PTII
cd "$srcdir/config"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for java.home property by compiling a test program " >&5
$as_echo_n "checking for java.home property by compiling a test program ... " >&6; }
# Don't use 'env $JAVAC . . .' here, it will not work under Cygwin
if "$JAVAC" JavaHome.java ; then
   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: JavaHome.java compiled" >&5
$as_echo "JavaHome.java compiled" >&6; }; fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java.home property by running a test program " >&5
$as_echo_n "checking for java.home property by running a test program ... " >&6; }
   if env "$JAVA" -classpath "$PTII/config" JavaHome > /dev/null; then
      # Run it again and get the results with \ converted to /
      PTJAVA_HOME=`"$JAVA" -classpath "$PTII/config" JavaHome`
      if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_HOME" >&5
$as_echo "$PTJAVA_HOME" >&6; }; fi
      PTDOCLETS_DIR=doclets
   else
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$JAVA -classpath \"$PTII/config\" JavaHome' failed.
   Since we cannot determine where the JRE is, we cannot set PTJAVA_HOME.
   for use with doclets or the serial communications protocol" >&5
$as_echo "$as_me: WARNING: '$JAVA -classpath \"$PTII/config\" JavaHome' failed.
   Since we cannot determine where the JRE is, we cannot set PTJAVA_HOME.
   for use with doclets or the serial communications protocol" >&2;}
    fi
fi
cd "$startdir"

#
# Check that jar can handle the -i argument
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the jar command" >&5
$as_echo_n "checking for the jar command... " >&6; }
if test -f "$PTJAVA_DIR/bin/jar"; then
    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/bin/jar" >&5
$as_echo "$PTJAVA_DIR/bin/jar" >&6; }; fi
    JAR="$PTJAVA_DIR/bin/jar"
else
   if test -f "$PTJAVA_DIR/Commands/java"; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/Commands/java" >&5
$as_echo "$PTJAVA_DIR/Commands/java" >&6; }; fi
       JAR="$PTJAVA_DIR/Commands/jar"
   else
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find '$PTJAVA_DIR/bin/jar'.
       or '$PTJAVA/Commands/jar', looking in the path.
       This is usually only a problem if you run 'make install'" >&5
$as_echo "$as_me: WARNING: Cannot find '$PTJAVA_DIR/bin/jar'.
       or '$PTJAVA/Commands/jar', looking in the path.
       This is usually only a problem if you run 'make install'" >&2;}
       # Extract the first word of "jar", so it can be a program name with args.
set dummy jar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAR=$ac_cv_path_JAR
if test -n "$JAR"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
$as_echo "$JAR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


   fi
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that $JAR can handle -i" >&5
$as_echo_n "checking that $JAR can handle -i... " >&6; }
if test -x "$JAR"; then
    cd "$srcdir/config"

    "$JAR" -cf jarTest.jar confTest.class
    if "$JAR" -i jarTest.jar; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR -i worked" >&5
$as_echo "$JAR -i worked" >&6; }; fi
	# JAR_INDEX now includes the JAR_FLAGS flag so that we can
	# pass -J-Xss100m for linux
	JAR_INDEX='"$(JAR)" $(JAR_FLAGS) -i $@'
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $JAR -i jarTest.jar failed,
    so we will not index the jar files" >&5
$as_echo "$as_me: WARNING: $JAR -i jarTest.jar failed,
    so we will not index the jar files" >&2;}
	JAR_INDEX=""
    fi

    cd "$startdir"
else
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: jar command \"$JAR\" is not executable or not found.
       This is usually only a problem if you run 'make install'" >&5
$as_echo "$as_me: WARNING: jar command \"$JAR\" is not executable or not found.
       This is usually only a problem if you run 'make install'" >&2;}
fi

#
# The jarsigner command is used to create signed jar files for Webstart JNLP files
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the jarsigner command" >&5
$as_echo_n "checking for the jarsigner command... " >&6; }
if test -f "$PTJAVA_DIR/bin/jarsigner"; then
    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/bin/jarsigner" >&5
$as_echo "$PTJAVA_DIR/bin/jarsigner" >&6; }; fi
    JARSIGNER="$PTJAVA_DIR/bin/jarsigner"
else
   if test -f "$PTJAVA_DIR/Commands/java"; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/Commands/java" >&5
$as_echo "$PTJAVA_DIR/Commands/java" >&6; }; fi
       JARSIGNER="$PTJAVA_DIR/Commands/jarsigner"
   else
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find '$PTJAVA_DIR/bin/jarsigner'.
       or '$PTJAVA/Commands/jarsigner', looking in the path.
       This is only a problem when testing the security actors." >&5
$as_echo "$as_me: WARNING: Cannot find '$PTJAVA_DIR/bin/jarsigner'.
       or '$PTJAVA/Commands/jarsigner', looking in the path.
       This is only a problem when testing the security actors." >&2;}
       # Extract the first word of "jarsigner", so it can be a program name with args.
set dummy jarsigner; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JARSIGNER+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JARSIGNER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JARSIGNER=$ac_cv_path_JARSIGNER
if test -n "$JARSIGNER"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
$as_echo "$JARSIGNER" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


   fi
fi

if test ! -x "$JARSIGNER"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The jarsigner command \"$JARSIGNER\" is not executable or not found.
       This is only a problem when testing the security actors." >&5
$as_echo "$as_me: WARNING: The jarsigner command \"$JARSIGNER\" is not executable or not found.
       This is only a problem when testing the security actors." >&2;}
fi

#
# The javaws command is used to test Webstart JNLP files.
#
if test ! -f "mk/jnlp.mk"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: mk/jnlp.mk is not present,
    so we need not find javaws, the Java Web Start binary." >&5
$as_echo "mk/jnlp.mk is not present,
    so we need not find javaws, the Java Web Start binary." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the javaws command" >&5
$as_echo_n "checking for the javaws command... " >&6; }
    if test -f "$PTJAVA_DIR/bin/javaws"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/bin/javaws" >&5
$as_echo "$PTJAVA_DIR/bin/javaws" >&6; }; fi
        JAVAWS="$PTJAVA_DIR/bin/javaws"
    else
        if test -f "$PTJAVA_DIR/Commands/java"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/Commands/java" >&5
$as_echo "$PTJAVA_DIR/Commands/java" >&6; }; fi
            JAVAWS="$PTJAVA_DIR/Commands/javaws"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find '$PTJAVA_DIR/bin/javaws'.
    or '$PTJAVA/Commands/javaws', looking in the path.
    This is only a problem when testing the Java Webstart (JNLP) files." >&5
$as_echo "$as_me: WARNING: Cannot find '$PTJAVA_DIR/bin/javaws'.
    or '$PTJAVA/Commands/javaws', looking in the path.
    This is only a problem when testing the Java Webstart (JNLP) files." >&2;}
            # Extract the first word of "javaws", so it can be a program name with args.
set dummy javaws; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVAWS+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVAWS in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAWS="$JAVAWS" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVAWS="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVAWS=$ac_cv_path_JAVAWS
if test -n "$JAVAWS"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAWS" >&5
$as_echo "$JAVAWS" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        fi
    fi
    if test ! -x "$JAVAWS"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The javaws command \"$JAVAWS\" is not executable or not found.
    This is only a problem when testing the Java Webstart (JNLP) files." >&5
$as_echo "$as_me: WARNING: The javaws command \"$JAVAWS\" is not executable or not found.
    This is only a problem when testing the Java Webstart (JNLP) files." >&2;}
    fi
fi

#
# keytool command used to generate a certificate for testing actor.lib.security actors
#
if test ! -d "ptolemy/actor/lib/security/"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ptolemy/actor/lib/security/ is not present,
    so we need not find keytool, the certifate command." >&5
$as_echo "ptolemy/actor/lib/security/ is not present,
    so we need not find keytool, the certifate command." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the keytool command" >&5
$as_echo_n "checking for the keytool command... " >&6; }
    if test -f "$PTJAVA_DIR/bin/keytool"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/bin/keytool" >&5
$as_echo "$PTJAVA_DIR/bin/keytool" >&6; }; fi
        KEYTOOL="$PTJAVA_DIR/bin/keytool"
    else
        if test -f "$PTJAVA_DIR/Commands/java"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJAVA_DIR/Commands/java" >&5
$as_echo "$PTJAVA_DIR/Commands/java" >&6; }; fi
            KEYTOOL="$PTJAVA_DIR/Commands/keytool"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find '$PTJAVA_DIR/bin/keytool'.
    or '$PTJAVA/Commands/keytool', looking in the path.
    This is only a problem when testing the security actors." >&5
$as_echo "$as_me: WARNING: Cannot find '$PTJAVA_DIR/bin/keytool'.
    or '$PTJAVA/Commands/keytool', looking in the path.
    This is only a problem when testing the security actors." >&2;}
            # Extract the first word of "keytool", so it can be a program name with args.
set dummy keytool; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_KEYTOOL+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $KEYTOOL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_KEYTOOL="$KEYTOOL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_KEYTOOL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
KEYTOOL=$ac_cv_path_KEYTOOL
if test -n "$KEYTOOL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KEYTOOL" >&5
$as_echo "$KEYTOOL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        fi
    fi

    if test ! -x "$KEYTOOL"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The keytool command \"$KEYTOOL\" is not executable or not found.
    This is only a problem when testing the security actors." >&5
$as_echo "$as_me: WARNING: The keytool command \"$KEYTOOL\" is not executable or not found.
    This is only a problem when testing the security actors." >&2;}
    fi
fi


#--------------------------------------------------------------------
#	Figure out which separator to use for CLASSPATH
#	So much for write once, run everywhere.
#       Find NT4 and Windows 2000 (CYGWIN_NT-4.0 and
#       CYGWIN_NT-5.0 respectively)
#--------------------------------------------------------------------
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper CLASSPATH separator" >&5
$as_echo_n "checking for the proper CLASSPATH separator... " >&6; }

# If you mess with this, consider changing the jdkClassPathSeparator
# proc in ptII/util/testsuite/jdktools.tcl
case "`uname -s`" in
    CYGWIN_ME-*) CLASSPATHSEPARATOR=";";;
    CYGWIN_NT-*) CLASSPATHSEPARATOR=";";;
    CYGWIN_98-*) CLASSPATHSEPARATOR=";";;
    *) CLASSPATHSEPARATOR=":";;
esac
if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$CLASSPATHSEPARATOR'" >&5
$as_echo "'$CLASSPATHSEPARATOR'" >&6; }; fi


#--------------------------------------------------------------------
#	Get ready to accumulate information for Eclipse and Ant
#--------------------------------------------------------------------

# These directories are always excluded from Eclipse
# To add to this list, edit .classpath.in
ECLIPSE_EXCLUDING_SRC="ptolemy/actor/lib/reactable/"

# Jar files to include in the Eclipse library
#ECLIPSE_CLASSPATHENTRY_LIBS='<classpathentry kind="lib" path="lib/diva.jar"/>'
ECLIPSE_CLASSPATHENTRY_LIBS=''

# Add any jar files in $HOME/.ptolemyII
# FIXME: Eclipse should support Java 1.6 style * classpaths

# The Cygwin value of $HOME is not understood by Java under Windows.
if test  "$windows" = "yes"; then
    tmpHOME="`cygpath --mixed $HOME`"
else
    tmpHOME="$HOME"
fi
for jar in $tmpHOME/.ptolemyII/*.jar
do
    if test -f "$jar"; then

        if test "$windows" = "yes" ; then
	   # Avoid /cygdrive/c in .classpath
	   jar=`cygpath --mixed "$jar"`
	fi

        # Avoid adding .ptolemyII/*.jar to .classpath
	ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \
	        <classpathentry kind=\"lib\" path=\"$jar\"/> "
	# Ant understands * style classpaths, so no need to update Ant.
    fi
done

# Paths to always exclude in Ant's build.xml
# IMPORTANT: If you update the list below, also update .classpath.in and .classpath.default
ANT_ALWAYS_EXCLUDE='<exclude name="**/CVS/"/>
<exclude name="**/adm/dists/" />
<exclude name="**/adm/gen-*/" />
<exclude name="**/codeDoc/"/>
<exclude name="**/cobertura.ser" />
<exclude name="**/makefile" />
<exclude name="**/.*" />
<exclude name="**/*.bat" />
<exclude name="**/*.class" />
<exclude name="**/*.html" />
<exclude name="**/*.in" />
<exclude name="**/*.png" />
<exclude name="**/*.tcl" />
<exclude name="**/*.xml" />
<exclude name="adm/cvs2svn/"/>
<exclude name="build/"/>
<exclude name="config/"/>
<exclude name="doc/coding/templates/"/>
<exclude name="jni/test/jni/meaningOfLife/"/>
<exclude name="jni/test/jni/testDeux/"/>
<exclude name="jni/test/jni/testTrois/"/>
<exclude name="org/terraswarm/accessor/accessors/web/node_modules/" />
<exclude name="org/terraswarm/accessor/accessors/web/hosts/cordova/demo/" />
<exclude name="org/terraswarm/accessor/accessors/web/hosts/cordova/plugins/" />
<exclude name="org/terraswarm/accessor/accessors-svn/" />
<exclude name="pt-modules/"/>
<exclude name="ptolemy/apps/agilent/"/>
<exclude name="ptolemy/apps/anytimecontrol/"/>
<exclude name="ptolemy/apps/apes/"/>
<exclude name="ptolemy/apps/charon/"/>
<exclude name="ptolemy/apps/crazyboard/"/>
<exclude name="ptolemy/apps/eclipse/"/>
<exclude name="ptolemy/apps/etherealSting/"/>
<exclude name="ptolemy/apps/fullscreen/"/>
<exclude name="ptolemy/apps/giotto/"/>
<exclude name="ptolemy/apps/ia/"/>
<exclude name="ptolemy/apps/interfaces/"/>
<exclude name="ptolemy/apps/jmf/"/>
<exclude name="ptolemy/apps/kurt/"/>
<exclude name="ptolemy/apps/kvm/"/>
<exclude name="ptolemy/apps/lego/"/>
<exclude name="ptolemy/apps/lejos/"/>
<exclude name="ptolemy/apps/midp/"/>
<exclude name="ptolemy/apps/mobileCoding/"/>
<exclude name="ptolemy/apps/pendulum/"/>
<exclude name="ptolemy/apps/rijndael/"/>
<exclude name="ptolemy/apps/robot/"/>
<exclude name="ptolemy/apps/security/"/>
<exclude name="ptolemy/apps/sobel/"/>
<exclude name="ptolemy/apps/soot/"/>
<exclude name="ptolemy/apps/throttle/"/>
<exclude name="ptolemy/apps/tini/"/>
<exclude name="ptolemy/apps/transmission/"/>
<exclude name="ptolemy/apps/vergil/"/>
<exclude name="ptolemy/apps/waba/"/>
<exclude name="ptolemy/apps/websensor/"/>
<exclude name="ptolemy/apps/webstart/"/>
<exclude name="ptolemy/apps/xsl/"/>
<exclude name="ptolemy/apps/zaurus/"/>
<exclude name="ptolemy/codegen/c/actor/lib/oldJavaFiles/"/>
<exclude name="ptolemy/codegen/dsp/lib/"/>
<exclude name="ptolemy/codegen/kernel/newInterfaces/"/>
<exclude name="ptolemy/codegen/lib/"/>
<exclude name="ptolemy/copernicus/kernel/fragment/"/>
<exclude name="ptolemy/copernicus/shallow/cg/"/>
<exclude name="ptolemy/domains/giotto/demo/Hierarchy/Hierarchy/"/>
<exclude name="ptolemy/domains/giotto/demo/Multimode/Multimode/"/>
<exclude name="ptolemy/domains/giotto/demo/Simple/Simple/"/>
<exclude name="ptolemy/domains/gr/lib/experimental/"/>
<exclude name="ptolemy/domains/gro/"/>
<exclude name="ptolemy/domains/pdf/"/>
<exclude name="ptolemy/domains/ptinyos/demo/Surge/output/"/>
<exclude name="ptolemy/moml/test/NoPackageActor.java"/>
<exclude name="ptolemy/plot/adm/"/>
<exclude name="ptolemy/plot/servlet/"/>
<exclude name="reports/"/>
<exclude name="signed/" />
<exclude name="src/"/>
<exclude name="target/"/>
<exclude name="vendors/"/>'

# Jar files to include in Ant's build.xml
ANT_CLASSPATH=''

# if maven-ant-tasks/*.jar was found
# and if $PTII/ptolemy/apps/websensor was found.

# Paths to exclude in Ant's build.xml
ANT_EXCLUDE=''

# Path of directories that contain source, used by the Ant's build rule.
ANT_SRC=''

# Paths of tests to exclude in Ant's build.xml
ANT_EXCLUDE_TESTS=''

# A shell function that adds its argument to the ECLIPSE_CLASSPATH_ENTRY_LIBS
# and to ANT_CLASSPATH
updateClasspath () {
        if test ! -z "$1"; then
            ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \
	        <classpathentry kind=\"lib\" path=\"$1\"/> "
            ANT_CLASSPATH="$ANT_CLASSPATH <pathelement location=\"$1\"/> "
        else
            echo "INTERNAL WARNING: updateClasspath called with an empty string as the jar file?"
        fi
}

# A shell function that adds its argument to ECLIPSE_EXCLUDING_SRC
# and ANT_EXCLUDE
updateExcludes () {
   ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|$1"
   ANT_EXCLUDE="$ANT_EXCLUDE <exclude name=\"$1\" />"
}

# A shell function that adds its arguments to ANT_EXCLUDE_TESTS.
updateExcludeTests () {
   ANT_EXCLUDE_TESTS="$ANT_EXCLUDE_TESTS <exclude name=\"$1\" />"
}


########################################################################

if test ! -d "ptolemy/backtrack/eclipse"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ptolemy/backtrack/eclipse/ is not present,
    no need to print message about Darwin." >&5
$as_echo "ptolemy/backtrack/eclipse/ is not present,
    no need to print message about Darwin." >&6; }; fi
else
    case "`uname -s`" in
        Darwin)
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Under Eclipse on Mac OS X, there are various
    problems with Eclipse.
    - Eclipse-3.4.0 has problems with Eclipse plugins on the Mac.
      Note that the backtracking and other Eclipse code will
      _not_ work on the Mac from within Eclipse. Backtracking will work
      on the Mac _outside_ of Eclipse.
    For details, see
    http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Mac2008 and follow the
    'Problems with Eclipse and Ptolemy on the Mac' link." >&5
$as_echo "$as_me: WARNING: Under Eclipse on Mac OS X, there are various
    problems with Eclipse.
    - Eclipse-3.4.0 has problems with Eclipse plugins on the Mac.
      Note that the backtracking and other Eclipse code will
      _not_ work on the Mac from within Eclipse. Backtracking will work
      on the Mac _outside_ of Eclipse.
    For details, see
    http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Mac2008 and follow the
    'Problems with Eclipse and Ptolemy on the Mac' link." >&2;}
            if test -d ptolemy/apps/eclipse/awt/; then
	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Under Eclipse on Mac OS X, ptolemy/apps/eclipse/awt
    is not supported." >&5
$as_echo "$as_me: WARNING: Under Eclipse on Mac OS X, ptolemy/apps/eclipse/awt
    is not supported." >&2;}
	        updateExcludes "ptolemy/apps/eclipse/awt/"
            fi
     	    ;;
            *)
            ECLIPSE_CLASSPATHENTRY_PDE_REQUIREDPLUGINS='<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>'
            ;;
    esac
fi

PRE_JDK17=no
PRE_JDK18=no
case "$JVERSION" in
     1.6.*) PRE_JDK18=yes
     	    PRE_JDK17=yes;;
     1.7.*) PRE_JDK18=yes;;
esac

if test "$PRE_JDK17" = "yes" ; then
    # These must have trailing slash or the updateExcludes shell function will not work.
    pre1_7packages="ptolemy/cg/"
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A version of Java ($JVERSION) earlier than Java 1.7 is the first JVM in your path.
    The following packages will not be compiled:
        $pre1_7packages" >&5
$as_echo "$as_me: WARNING: A version of Java ($JVERSION) earlier than Java 1.7 is the first JVM in your path.
    The following packages will not be compiled:
        $pre1_7packages" >&2;}
    for package in $pre1_7packages
    do
	updateExcludes "${package}."
    done
fi

# JDK 8-10 don't support the standalone Nashorn, but we keep the logic for checking
# for the builtin Nashorn in case someone needs to do a back port.
# See https://github.com/icyphy/accessors/issues/23
# See https://github.com/szegedi/nashorn/wiki/Using-Nashorn-with-different-Java-versions

# Set to jjs if Nashorn (present in Java 1.8) is found.
PTJJS_DIR=
# Set to accessor and used in org/terraswarm/makefile if Nashorn is found.
PTACCESSOR_DIR=
# Set to include packages that require Java 1.8, but do not require Vertx or other optional packages and used in doc/makefile.
PTJAVA18_PACKAGES=
# Set to include packages that require Nashorn, the JavaScript engine used in Accessors.
PTJJS_PACKAGES=

if test "$PRE_JDK18" = "yes" ; then
    # These must have trailing slash or the updateExcludes shell function will not work.
    pre1_8packages="org/hlacerti/ org/ptolemy/machineLearning/particleFilter/ org/ptolemy/machineLearning/hsmm/ org/ptolemy/osc/ org/ptolemy/ssm/ ptolemy/apps/hardrealtime/ ptolemy/actor/lib/fmi/ ptolemy/actor/lib/conversions/ ptolemy/actor/lib/jjs/ ptolemy/actor/lib/jjs/modules/ ptolemy/actor/lib/jjs/modules/cameras/ ptolemy/actor/lib/jjs/modules/imageDisplay/ ptolemy/cg/adapter/generic/program/procedural/fmimahybrid/ /ptolemy/cg/adapter/generic/program/procedural/adapters/org/terraswarm/accessor/ ptolemy/vergil/basic/imprt/accessor/ ptolemy/vergil/basic/imprt/fmu/ org/terraswarm/accessor/ ptolemy/domains/wireless/lib/bluetooth/ ptolemy/actor/lib/security/ ptolemy/domains/atc/ ptolemy/domains/tcs/"
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A version of Java ($JVERSION) earlier than Java 1.8 is the first JVM in your path.
    The following packages will not be compiled:
        $pre1_8packages" >&5
$as_echo "$as_me: WARNING: A version of Java ($JVERSION) earlier than Java 1.8 is the first JVM in your path.
    The following packages will not be compiled:
        $pre1_8packages" >&2;}
    FINAL_WARNING="$FINAL_WARNING You are compiling with a pre-JDK1.8 Java, which means that accessors will NOT be built. Is this what you want?"
    for package in $pre1_8packages
    do
	updateExcludes $package
    done
else
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Nashorn, the JavaScript engine, used by Accessors" >&5
$as_echo_n "checking Nashorn, the JavaScript engine, used by Accessors... " >&6; }
	startdir=$PTII
	cd "$srcdir/config"
        jjs_packages='org.terraswarm.accessor
        ptolemy.actor.lib.jjs
        ptolemy.actor.lib.jjs.modules
        ptolemy.actor.lib.jjs.modules.IMUSensor
        ptolemy.actor.lib.jjs.modules.audio
        ptolemy.actor.lib.jjs.modules.cameras
        ptolemy.actor.lib.jjs.modules.contextAware
        ptolemy.actor.lib.jjs.modules.contextAwareTest
        ptolemy.actor.lib.jjs.modules.crypto
        ptolemy.actor.lib.jjs.modules.dataConverter
        ptolemy.actor.lib.jjs.modules.discovery
        ptolemy.actor.lib.jjs.modules.eventbus
        ptolemy.actor.lib.jjs.modules.httpClient
        ptolemy.actor.lib.jjs.modules.httpServer
        ptolemy.actor.lib.jjs.modules.imageDisplay
        ptolemy.actor.lib.jjs.modules.iotAuth
        ptolemy.actor.lib.jjs.modules.localStorage
        ptolemy.actor.lib.jjs.modules.mqtt
        ptolemy.actor.lib.jjs.modules.serial
        ptolemy.actor.lib.jjs.modules.serial.test
        ptolemy.actor.lib.jjs.modules.shell
        ptolemy.actor.lib.jjs.modules.speechRecognition
        ptolemy.actor.lib.jjs.modules.textDisplay
        ptolemy.actor.lib.jjs.modules.udpSocket
        ptolemy.actor.lib.jjs.modules.userInterface
        ptolemy.actor.lib.jjs.modules.webSocket
        ptolemy.actor.lib.jjs.modules.xbee
        ptolemy.actor.lib.jjs.modules.xbee.test
        ptolemy.actor.lib.jjs.udpSocket
        ptolemy.actor.lib.modules.socket
        ptolemy.actor.lib.modules.textDisplay
        ptolemy.cg.adapter.generic.accessor
        ptolemy.cg.adapter.generic.accessor.adapters.org.terraswarm.accessor
        ptolemy.cg.adapter.generic.accessor.adapters.ptolemy.actor.lib.jjs
        ptolemy.cg.adapter.generic.program.procedural.adapters.org.terraswarm.accessor
        ptolemy.cg.adapter.generic.program.procedural.adapters.ptolemy.actor.lib.jjs
        ptolemy.cg.adapter.generic.program.procedural.c.adapters.org.terraswarm.accessor
        ptolemy.cg.adapter.generic.program.procedural.c.duktape.adapters.org.terraswarm.accessor
        ptolemy.cg.adapter.generic.program.procedural.c.duktape.adapters.ptolemy.actor.lib.jjs
        ptolemy.cg.kernel.generic.accessor
        ptolemy.vergil.basic.imprt.accessor'


        # Determine whether to use the standalone Nashorn
        # The standalone Nashorn was compiled with a JDK that is not compatible
        # with JDK 8 - 10.  So much for write once, run anywhere.
        # This means that Ptolemy with JDK 8-10 will not include Nashorn and will not
        # support CapeCode.
        # See https://github.com/szegedi/nashorn/wiki/Using-Nashorn-with-different-Java-versions
        case "$JVERSION" in
             1.8.*) DONT_USE_STANDALONE_NASHORN=yes;;
             9.*) DONT_USE_STANDALONE_NASHORN=yes;;
             10.*) DONT_USE_STANDALONE_NASHORN=yes;;
             *) USE_STANDALONE_NASHORN=yes;;
        esac

        nashorn_classpath=""
        if test "$USE_STANDALONE_NASHORN" = "yes"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Java version $JVERSION > 10, checking for asm-all.jar and nashorn-core.jar" >&5
$as_echo "Java version $JVERSION > 10, checking for asm-all.jar and nashorn-core.jar" >&6; }; fi
            asm_jar="$PTII/lib/asm-all-5.2.jar"

# Check whether --with-asm was given.
if test "${with_asm+set}" = set; then :
  withval=$with_asm; ASM_JAR=$withval
else
  ASM_JAR=$asm_jar
fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Java version $JVERSION > 10, checking for asm-all.jar, used by standalone Nashorn" >&5
$as_echo_n "checking Java version $JVERSION > 10, checking for asm-all.jar, used by standalone Nashorn... " >&6; }
            if test -f "$ASM_JAR" ; then
                if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASM_JAR" >&5
$as_echo "$ASM_JAR" >&6; }; fi
                PTASM_JAR=$ASM_JAR
                nashorn_classpath=${CLASSPATHSEPARATOR}${ASM_JAR}
            else
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $ASM_JAR, which is use by the standalone version of Nashorn, the JavaScript Engine.
    Oracle JDK 8 through 11 has Nashorn build in, other versions need asm-all.jar and nashorn.jar
    which defaults to $asm_jar" >&5
$as_echo "$as_me: WARNING: Failed to find $ASM_JAR, which is use by the standalone version of Nashorn, the JavaScript Engine.
    Oracle JDK 8 through 11 has Nashorn build in, other versions need asm-all.jar and nashorn.jar
    which defaults to $asm_jar" >&2;}
            fi
            nashorn_jar="$PTII/lib/nashorn-core-15.3.jar"

# Check whether --with-nashorn was given.
if test "${with_nashorn+set}" = set; then :
  withval=$with_nashorn; NASHORN_JAR=$withval
else
  NASHORN_JAR=$nashorn_jar
fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Java version $JVERSION > 10, checking for standalone Nashorn" >&5
$as_echo_n "checking Java version $JVERSION > 10, checking for standalone Nashorn... " >&6; }
            if test -f "$NASHORN_JAR" ; then
                if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NASHORN_JAR" >&5
$as_echo "$NASHORN_JAR" >&6; }; fi
                PTNASHORN_JAR=$NASHORN_JAR
                nashorn_classpath=$nashorn_classpath${CLASSPATHSEPARATOR}${NASHORN_JAR}
            else
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Nashorn.jar, the JavaScript Engine.
    Oracle JDK 8 through 11 has Nashorn build in, other versions need nashorn.jar
    which defaults to $nashorn_jar" >&5
$as_echo "$as_me: WARNING: Failed to find Nashorn.jar, the JavaScript Engine.
    Oracle JDK 8 through 11 has Nashorn build in, other versions need nashorn.jar
    which defaults to $nashorn_jar" >&2;}
            fi
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Java version $JVERSION is > 8 and < 11,
    so the standalone version of Nashorn is not supported.
    CapeCode will not work.  Is this really what you want?" >&5
$as_echo "$as_me: WARNING: Java version $JVERSION is > 8 and < 11,
    so the standalone version of Nashorn is not supported.
    CapeCode will not work.  Is this really what you want?" >&2;}
        fi

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Compiling a Nashorn test program with classpath $PTII/config$nashorn_classpath" >&5
$as_echo_n "checking Compiling a Nashorn test program with classpath $PTII/config$nashorn_classpath... " >&6; }
	if "$JAVAC" -classpath $PTII/config$nashorn_classpath NashornTest.java ; then
           if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: NashornTest.java compiled" >&5
$as_echo "NashornTest.java compiled" >&6; }; fi

           if test "$USE_STANDALONE_NASHORN" = "yes"; then
               updateClasspath $ASM_JAR
               updateClasspath $NASHORN_JAR
           fi
           # Packages that do not use vertx or other packages, but do use Java 1.8.
           PTJAVA18_PACKAGES="org.ptolemy.machineLearning.hsmm org.ptolemy.machineLearning.particleFilter"
           # Packages that use Nashorn, the JavaScript engine
           PTJJS_PACKAGES="$jjs_packages"
           # Set to accessor and used in org/terraswarm/accessors/makefile if Nashorn is found.
           PTJJS_DIR=jjs
           # org.terraswarm.accessor depends on jjs/JavaScript.java so we
           # list org.terraswarm.accessor with jjs/JavaScript
           PTACCESSOR_DIR=accessor
           PTACCESSOR_DIR_FULL="$PTII/org/terraswarm/$PTACCESSOR_DIR"

           if test -d "$PTACCESSOR_DIR_FULL" ; then

              ACCESSORS_REPO=https://github.com/icyphy/accessors

              if test -d "$PTACCESSOR_DIR_FULL/accessors/.svn" ; then
                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking $PTACCESSOR_DIR_FULL/accessors/.svn exists, but we are now using git for the accessors repo." >&5
$as_echo_n "checking $PTACCESSOR_DIR_FULL/accessors/.svn exists, but we are now using git for the accessors repo.... " >&6; }
                  if test -d "$PTACCESSOR_DIR_FULL/accessors-svn" ; then
                     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $PTACCESSOR_DIR_FULL/accessors-svn exists, but so does $PTACCESSOR_DIR_FULL/accessors/.svn?
    Please remove $PTACCESSOR_DIR_FULL/accessors." >&5
$as_echo "$as_me: WARNING: $PTACCESSOR_DIR_FULL/accessors-svn exists, but so does $PTACCESSOR_DIR_FULL/accessors/.svn?
    Please remove $PTACCESSOR_DIR_FULL/accessors." >&2;}
                  else
                     mv "$PTACCESSOR_DIR_FULL/accessors" "$PTACCESSOR_DIR_FULL/accessors-svn"
                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: The $PTACCESSOR_DIR_FULL/accessors directory has been moved to $PTACCESSORS_DIR_FULL/accessors-svn and the accessors git repo will be checked out." >&5
$as_echo "The $PTACCESSOR_DIR_FULL/accessors directory has been moved to $PTACCESSORS_DIR_FULL/accessors-svn and the accessors git repo will be checked out." >&6; }
                  fi
              fi

              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PTACCESSOR_DIR_FULL/accessors/, used by CapeCode and Accessors" >&5
$as_echo_n "checking for $PTACCESSOR_DIR_FULL/accessors/, used by CapeCode and Accessors... " >&6; }

              if test -d "$PTACCESSOR_DIR_FULL/accessors" ; then
                  if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
              else
                  # The accessors mechanism needs to have a repo checked out.

                  # If the git command is present, try to check out the repo
                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for git" >&5
$as_echo_n "checking for git... " >&6; }
                  # Extract the first word of "git", so it can be a program name with args.
set dummy git; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GIT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GIT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GIT="$GIT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GIT="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
GIT=$ac_cv_path_GIT
if test -n "$GIT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
$as_echo "$GIT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


                  if test ! -x "$GIT"; then
                      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find a git binary so accessors that extend the TerraSwarm accessors will not work." >&5
$as_echo "$as_me: WARNING: Could not find a git binary so accessors that extend the TerraSwarm accessors will not work." >&2;}
                  else
                      GIT_CLONE_COMMAND="git clone $ACCESSORS_REPO"
                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: About to check out the accessors repo using
    $GIT_CLONE_COMMAND" >&5
$as_echo "About to check out the accessors repo using
    $GIT_CLONE_COMMAND" >&6; }

                      (cd $PTACCESSOR_DIR_FULL; $GIT_CLONE_COMMAND)
                  fi

                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the $PTACCESSOR_DIR_FULL/accessors directory again" >&5
$as_echo_n "checking for the $PTACCESSOR_DIR_FULL/accessors directory again... " >&6; }

                  if test ! -d "$PTACCESSOR_DIR_FULL/accessors" ; then
                      FINAL_WARNING="$FINAL_WARNING Could not check out the accessor repo in $PTACCESSOR_DIR_FULL.  Accessors probably won't work.  See above for details."

                      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not check out the accessors git repo.
    Accessors that extend the TerraSwarm accessors will probably not work well unless the repo is checked out.
    To check out the accessors repo:

      cd org/terraswarm/accessor
      git clone $ACCESSORS_REPO
      cd $PTII
      ./configure

" >&5
$as_echo "$as_me: WARNING: Could not check out the accessors git repo.
    Accessors that extend the TerraSwarm accessors will probably not work well unless the repo is checked out.
    To check out the accessors repo:

      cd org/terraswarm/accessor
      git clone $ACCESSORS_REPO
      cd $PTII
      ./configure

" >&2;}
                   else
                       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
                   fi
               fi
            fi

        else
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Nashorn failed to compile, perhaps you are using an Oracle JDK 15 or later,  which means that accessors will NOT be built.
Try an Oracle JDK after JDK 10 or try OpenJDK 15 or later.
           " >&5
$as_echo "$as_me: WARNING: Nashorn failed to compile, perhaps you are using an Oracle JDK 15 or later,  which means that accessors will NOT be built.
Try an Oracle JDK after JDK 10 or try OpenJDK 15 or later.
           " >&2;}
           FINAL_WARNING="$FINAL_WARNING Nashorn failed to compile, perhaps you are using an Oracle JDK before JDK 11,  which means that accessors will NOT be built. Is this what you want? Try an Oracle JDK after JDK 10 or try OpenJDK 15 or later."
           for package in $jjs_packages
           do
               updateExcludes "`echo $package | sed 's@\.@/@g'`/"
           done
           updateExcludes "ptolemy/actor/lib/jjs/**/*.java"
        fi
        cd "$startdir"
fi

# ptolemy/media/viewer/AudioPlayer.java uses internal sun.* classes not present in Java 9.
# PTVIEWER_DIR is set to viewer and used in ptolemy/media/makefile for JVM < 9
PTVIEWER_DIR=viewer
# PTVIEWER_PACKAGES is used in doc/makefile
PTVIEWER_PACKAGES=ptolemy.media.viewer

# Handle Java 9 and later fails.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Java 9 and later" >&5
$as_echo_n "checking Java 9 and later... " >&6; }

# Use changequote to protect the square brackets in egrep
echo "$JVERSION" | egrep '^9|^[1-9][0-9]' > /dev/null

status=$?
if test "$status" = "1" ; then
    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Java version is $JVERSION, so Java 9 or later is not present" >&5
$as_echo "Java version is $JVERSION, so Java 9 or later is not present" >&6; }; fi
    MODULE_SYSTEM=no
else
    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Java version is $JVERSION, Java 9 or later present, so certain internal sun.* packages are not accessible" >&5
$as_echo "Java version is $JVERSION, Java 9 or later present, so certain internal sun.* packages are not accessible" >&6; }; fi
    MODULE_SYSTEM=yes
    PTVIEWER_DIR=
    PTVIEWER_PACKAGES=
    updateExcludes "ptolemy/copernicus/applet/"
    updateExcludes "ptolemy/media/viewer/"
    updateExcludeTests "**/ptolemy/media/**/test/junit/JUnitTclTest.*"
fi


#####################################################################
#####################################################################
#       Below here we look for various packages.
#       Not all Ptolemy software products need all packages, so
#       we usually look for a directory that uses the package first
#
#       Please try to keep the packages vaguely alphabetical
#####################################################################
#####################################################################

#--------------------------------------------------------------------
#       Look for the maven-ant-tasks-*.jar file used
#       to run Maven from ant.
#
#--------------------------------------------------------------------

# Set to 'xmlns:artifact="antlib:org.apache.maven.artifact.ant"' if
# maven-ant-tasks-*.jar is found
ANT_MAVEN_ARTIFACT=''

# The ant rule to build $PTII/ptolemy/apps/websensor.
ANT_MAVEN_BUILD_WEBSENSOR=''

# Set to 'build-websensor'
# if maven-ant-tasks/*.jar was found
# and if $PTII/ptolemy/apps/websensor was found.
ANT_MAVEN_SUBPROJECTS=''

# Set to '<fileset dir="${basedir}/ptolemy/apps/websensor"/>'
# if maven-ant-tasks/*.jar was found
# and if $PTII/ptolemy/apps/websensor was found.
ANT_WEBSENSOR_FILESET=''

# Set to <sourcePath path="${basedir}/ptolemy/apps/websensor"/>'
ANT_WEBSENSOR_SOURCEPATH=''

# Set to '<src path="${basedir}/ptolemy/apps/websensor"/>'
# if maven-ant-tasks*.jar was found
# and if $PTII/ptolemy/apps/websensor was found.
ANT_WEBSENSOR_SRC=''

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Apache ant binary" >&5
$as_echo_n "checking for the Apache ant binary... " >&6; }

ANT="$PTII/bin/ant"
if test -d "$PTII/ant"; then
   case "`uname -s`" in
         CYGWIN_NT-*)
         # Not sure if we should use ant.bat or ant.cmd here
         ANT=$PTII/ant/bin/ant.cmd
         ;;
   *) ANT=$PTII/ant/bin/ant
   esac
fi

if test -f "$ANT" -a ! -x "$ANT"; then
   chmod a+x "$ANT"
fi

if test ! -f "$ANT"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ANT not found?
    Apche Ant, is the best way to build Ptolemy II from sources.

    Usually, a copy of Apache Ant may be found in $PTII/ant/bin/ant and
    $PTII/bin/ant will execute $PTII/ant/bin/ant.

    Apache Ant is available from http://ant.apache.org/bindownload.cgi" >&5
$as_echo "$as_me: WARNING: $ANT not found?
    Apche Ant, is the best way to build Ptolemy II from sources.

    Usually, a copy of Apache Ant may be found in $PTII/ant/bin/ant and
    $PTII/bin/ant will execute $PTII/ant/bin/ant.

    Apache Ant is available from http://ant.apache.org/bindownload.cgi" >&2;}
    case "`uname -s`" in
        Darwin)
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Under Mac OS X, the easiest way to install ant is to install
    MacPorts from https://www.macports.org/ and then run
        sudo port install apache-ant" >&5
$as_echo "$as_me: WARNING: Under Mac OS X, the easiest way to install ant is to install
    MacPorts from https://www.macports.org/ and then run
        sudo port install apache-ant" >&2;}
    esac
else
    if test ! -x "$ANT"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ANT is present, but not executable?" >&5
$as_echo "$as_me: WARNING: $ANT is present, but not executable?" >&2;}
    else
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5
$as_echo "$ANT" >&6; }; fi
        # Path to the ant binary, stored in lib/ptII.properteries, used
        # while importing accessors in
        # org/terraswarm/accessor/JSAccessor.java
        ANT_PATH="$ANT"
    fi
fi

#--------------------------------------------------------------------
#       Look for the "gawk" command, used by maven
#--------------------------------------------------------------------

# Check whether --with-gawk was given.
if test "${with_gawk+set}" = set; then :
  withval=$with_gawk; GAWK=$withval
else
  GAWK=gawk
fi

# Extract the first word of "gawk", so it can be a program name with args.
set dummy gawk; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GAWK+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GAWK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GAWK="$GAWK" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GAWK="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
GAWK=$ac_cv_path_GAWK
if test -n "$GAWK"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GAWK" >&5
$as_echo "$GAWK" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test ! -x "$GAWK"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Couldn't find gawk, looking for awk. gawk or awk is used by maven and in ptolemy/configs/doc/makefile." >&5
$as_echo "$as_me: WARNING: Couldn't find gawk, looking for awk. gawk or awk is used by maven and in ptolemy/configs/doc/makefile." >&2;}
    # Extract the first word of "awk", so it can be a program name with args.
set dummy awk; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GAWK+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GAWK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GAWK="$GAWK" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GAWK="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
GAWK=$ac_cv_path_GAWK
if test -n "$GAWK"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GAWK" >&5
$as_echo "$GAWK" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test ! -x "$GAWK"; then
        GAWK=awk
    fi
fi

if test ! -f pom.xml; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: pom.xml is not present
    so we need not find Maven." >&5
$as_echo "pom.xml is not present
    so we need not find Maven." >&6; }; fi
else
    for ac_prog in mvn mvn32
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MVN+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $MVN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MVN="$MVN" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_MVN="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MVN=$ac_cv_path_MVN
if test -n "$MVN"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MVN" >&5
$as_echo "$MVN" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$MVN" && break
done

    if test -x "$ANT" -a -x "$MVN"; then
        cat > maven-ant-tasks-test.xml << EoF
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="ptII"
 xmlns:artifact="antlib:org.apache.maven.artifact.ant">
 <target name="help">
    <artifact:mvn pom="pom.xml">
      <arg value="help"/>
    </artifact:mvn>
  </target>
</project>
EoF

       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maven ant task.  This could take a minute the first time configure is run." >&5
$as_echo_n "checking for maven ant task.  This could take a minute the first time configure is run.... " >&6; }
       if "$ANT" -f maven-ant-tasks-test.xml help > /dev/null 2>&1 ; then
          if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
          ANT_MAVEN_ARTIFACT='xmlns:artifact="antlib:org.apache.maven.artifact.ant"'
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for websensor in \$PTII/ptolemy/apps/websensor" >&5
$as_echo_n "checking for websensor in \$PTII/ptolemy/apps/websensor... " >&6; }
          if test -d "$PTII/ptolemy/apps/websensor" ; then
              if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
	      ANT_MAVEN_BUILD_WEBSENSOR="
  <!-- Maven ant task is from http://maven.apache.org/ant-tasks/
       It is no longer supported by the maven community.
       ant-task should be found at $PTII/ant/lib/maven-ant-tasks-2.1.3.jar
       $PTII/configure checks to see if maven ant task is present,
       but the nightly build failed once because configure was expecting
       maven ant task to be present, but at ant runtime, it was not present.
       -->
  <target name=\"-check-maven-ant-task\">
    <condition property=\"maven-ant-task-exists\">
      <typefound uri=\"antlib:org.apache.maven.artifact.ant\" name=\"artifact\"/>
    </condition>
  </target>

  <!-- The build-websensor target depends on maven and
       maven ant tasks being installed.
       $PTII/configure checks for these conditions,
       as does the -check-maven-ant-task condition.
       If you get errors with this target, then try
       rerunning (cd $PTII; ./configure)
   -->

  <target name=\"build-websensor\"
          depends=\"-check-maven-ant-task\"
          if=\"${maven-ant-task-exists}\"
          >
    <artifact:mvn pom=\"ptolemy/apps/websensor/pom.xml\">
      <arg value=\"compile\"/>
    </artifact:mvn>
  </target>"

	      ANT_MAVEN_SUBPROJECTS=',build-websensor'
      	      ANT_WEBSENSOR_FILESET='<fileset dir="${basedir}/ptolemy/apps/websensor"/>'
	      ANT_WEBSENSOR_SOURCEPATH='<sourcePath path="${basedir}/ptolemy/apps/websensor"/>'
	      ANT_WEBSENSOR_SRC='<src path="${basedir}/ptolemy/apps/websensor"/>'
          fi
      else
          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ant did not find the maven-ant-tasks*.jar file,
    so we will not build in $PTII/ptolemy/apps/websensor.
    maven-ant-tasks-*.jar is available from
    https://maven.apache.org/ant-tasks/download.html" >&5
$as_echo "$as_me: WARNING: ant did not find the maven-ant-tasks*.jar file,
    so we will not build in $PTII/ptolemy/apps/websensor.
    maven-ant-tasks-*.jar is available from
    https://maven.apache.org/ant-tasks/download.html" >&2;}
      fi
      rm -f maven-ant-tasks-test.xml
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The ant and/or mvn binaries could not be found,
    so we will not build in $PTII/ptolemy/apps/websensor." >&5
$as_echo "$as_me: WARNING: The ant and/or mvn binaries could not be found,
    so we will not build in $PTII/ptolemy/apps/websensor." >&2;}
    fi
fi

#--------------------------------------------------------------------
#       Boost was used by Mescal and is now used by FMI++
#	See http://www.boost.org
#--------------------------------------------------------------------

# Set to the directory that contains boost/numeric/odeint.hpp
# and used in actor/lib/fmi/fmipp
PTBOOST_INCLUDE_DIR=

# Set to yes if we found boost
PTBOOST=no

# Set to fmipp and used in ptolemy/actor/lib/fmi/makefile if odeint.hpp is found.
PTFMIPP_DIR=
# We only need to look for Boost if mescal is present
FMIPP_USER_DIR=$PTII/ptolemy/actor/lib/fmi/fmipp

if test ! -d "$FMIPP_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FMIPP_USER_DIR is not present,
    so we need not find Boost." >&5
$as_echo "$FMIPP_USER_DIR is not present,
    so we need not find Boost." >&6; }; fi
else
    if test "$PTBOOST" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost" >&5
$as_echo_n "checking for Boost... " >&6; }

# Check whether --with-boost was given.
if test "${with_boost+set}" = set; then :
  withval=$with_boost; PTBOOST_INCLUDE_DIR=$withval
else
  PTBOOST_INCLUDE_DIR=/usr/local/include
fi


	if test -f "$PTBOOST_INCLUDE_DIR/boost/numeric/odeint.hpp"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTBOOST_INCLUDE_DIR" >&5
$as_echo "$PTBOOST_INCLUDE_DIR" >&6; }; fi
	else
            boostdirs="/usr/local/boost* /opt/local/include /usr/local/include /usr/include"
	    for boostdir in $boostdirs
            do
	        if test -f "$boostdir/boost/numeric/odeint.hpp"; then
                    PTBOOST_INCLUDE_DIR=$boostdir
                    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTBOOST_INCLUDE_DIR" >&5
$as_echo "$PTBOOST_INCLUDE_DIR" >&6; }; fi
		    break
                fi
            done
	    if test ! -f "$PTBOOST_INCLUDE_DIR/boost/numeric/odeint.hpp"; then
	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTBOOST_INCLUDE_DIR/boost/numeric/odeint.hpp
    This is only a problem if you want to rebuild the Functional
    Mock-up Interface ++ C files in actor/lib/fmi/fmipp.
    Most users can use the shared libraries in $PTII/lib or $PTII/bin." >&5
$as_echo "$as_me: WARNING: Failed to find $PTBOOST_INCLUDE_DIR/boost/numeric/odeint.hpp
    This is only a problem if you want to rebuild the Functional
    Mock-up Interface ++ C files in actor/lib/fmi/fmipp.
    Most users can use the shared libraries in $PTII/lib or $PTII/bin." >&2;}
	    fi
        fi
    fi

    # We check for boost later in expat
fi

#--------------------------------------------------------------------
#       BSH is the Java Beanshell
#       It is used by the Run Control panel that uses FormLayoutManager
#	For more information, see
#       http://www.beanshell.org
#--------------------------------------------------------------------

# PTBSH_RUN_DIR is set to run and used in
# $PTII/ptolemy/actor/gui/makefile if bsh.jar was found.
PTBSH_RUN_DIR=

# PTBSH_MLC_DIR is set to mlc and used in
# $PTII/org/makefile if BSH was found.
PTBSH_MLC_DIR=

# BSH jar file.  We ship $PTII/lib/bsh-2.0b4.jar.
PTBSH_JAR=

# We only need to look for if $PTII/ptolemy/actor/gui exists
BSH_USER_DIR="$PTII/ptolemy/actor/gui/run"
if test ! -d "$BSH_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BSH_USER_DIR is not present,
    so we need not find BSH, the Java Bean Shell." >&5
$as_echo "$BSH_USER_DIR is not present,
    so we need not find BSH, the Java Bean Shell." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSH, the Java Bean Shell" >&5
$as_echo_n "checking for BSH, the Java Bean Shell... " >&6; }
    if test -f "$PTII/lib/bsh-2.0b4.jar"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/lib/bsh-2.0b4.jar" >&5
$as_echo "$PTII/lib/bsh-2.0b4.jar" >&6; }; fi
        PTBSH_JAR="$PTII/lib/bsh-2.0b4.jar"
	PTBSH_MLC_DIR=mlc
	PTBSH_RUN_DIR=run
	# PTBSH_PACKAGES is used in ptII/doc/makefile
	PTBSH_PACKAGES="com.jgoodies.forms.builder com.jgoodies.forms.debug com.jgoodies.forms.factories com.jgoodies.forms.layout com.jgoodies.forms.util org.mlc.swing.example org.mlc.swing.layout ptolemy.actor.gui.run"
	updateClasspath $PTBSH_JAR
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTII/lib/bsh-2.0b4.jar,
    BSH is the Java Bean Shell, which is used by the
    Ptolemy Run Control Panel.  BSH is optional." >&5
$as_echo "$as_me: WARNING: Failed to find $PTII/lib/bsh-2.0b4.jar,
    BSH is the Java Bean Shell, which is used by the
    Ptolemy Run Control Panel.  BSH is optional." >&2;}
    fi
fi

if test -z "$PTBSH_RUN_DIR"; then
   updateExcludes "ptolemy/actor/gui/run/"
fi


#--------------------------------------------------------------------
#       The CaffeineMark Kit is a Java benchmark kit
#	that is used by C code generation
#       See http://www-sor.inria.fr/~java/tools/cmkit
#--------------------------------------------------------------------

# Directory that contains the CaffeineMark Java Benchmark kit
# used by C code generation in copernicus/c
CMKIT_DIR='${PTII}/vendors/cm'

# PTCM_DIR is set to cm and used in $PTII/ptolemy/copernicus/c/test/makefile
# if the CaffeineMark Java Benchmark kit is found
PTCM_DIR=

# We only need to look for cm if $PTII/ptolemy/copernicus/c exists
if test ! -d "$PTII/ptolemy/copernicus/c"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/copernicus/c is not present,
    so we need not find the CaffeineMark Kit." >&5
$as_echo "$PTII/ptolemy/copernicus/c is not present,
    so we need not find the CaffeineMark Kit." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CaffeineMarkEmbeddedApp.class" >&5
$as_echo_n "checking for CaffeineMarkEmbeddedApp.class... " >&6; }

# Check whether --with-cmkit was given.
if test "${with_cmkit+set}" = set; then :
  withval=$with_cmkit; CMKIT_DIR=$withval
else
  CMKIT_DIR=$PTII/vendors/cm
fi


    if test -f "$CMKIT_DIR/CaffeineMarkEmbeddedApp.class"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMKIT_DIR" >&5
$as_echo "$CMKIT_DIR" >&6; }; fi
	PTCM_DIR=cm
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $CMKIT_DIR/CaffeineMarkEmbeddedApp.class
    perhaps CaffeineMark is not installed?
    You need not download CaffeineMark unless you plan on using C code
    generation using the older Copernicus C code generator.
    The newer codegen C code generator does  not require CaffeineMark.
    The CaffeineMark kit can be downloaded from
    http://www-sor.inria.fr/~java/tools/cmkit/embed.zip" >&5
$as_echo "$as_me: WARNING: Failed to find $CMKIT_DIR/CaffeineMarkEmbeddedApp.class
    perhaps CaffeineMark is not installed?
    You need not download CaffeineMark unless you plan on using C code
    generation using the older Copernicus C code generator.
    The newer codegen C code generator does  not require CaffeineMark.
    The CaffeineMark kit can be downloaded from
    http://www-sor.inria.fr/~java/tools/cmkit/embed.zip" >&2;}
	# Note that we don't substitute in the ${PTII} here
	CMKIT_DIR='${PTII}/vendors/cm'
    fi
fi

#--------------------------------------------------------------------
#       Caltrop is an language used to define actors
#	For more information,
#       see http://embedded.eecs.berkeley.edu/caltrop/
#       See if there was a command-line option for where Caltrop is.
#--------------------------------------------------------------------

# PTCALTROP_DIR is set to caltrop and used in
# $PTII/ptolemy/makefile if Cal was found.
PTCALTROP_DIR=

# Directory that contains the ptCal jar file
CALTROP_DIR='${PTII}/lib'

# We only need to look for on if $PTII/ptolemy/caltrop exists
CAL_USER_DIR="$PTII/ptolemy/caltrop"
if test ! -d "$CAL_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAL_USER_DIR is not present,
    so we need not find the Cal, the actor language." >&5
$as_echo "$CAL_USER_DIR is not present,
    so we need not find the Cal, the actor language." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cal, the actor language" >&5
$as_echo_n "checking for Cal, the actor language... " >&6; }

# Check whether --with-cal was given.
if test "${with_cal+set}" = set; then :
  withval=$with_cal; CALTROP_DIR=$withval
else
  CALTROP_DIR=$PTII/lib
fi


    if test -f "$CALTROP_DIR/ptCal.jar"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CALTROP_DIR" >&5
$as_echo "$CALTROP_DIR" >&6; }; fi
	# We found cal
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for saxon8.jar (used by caltrop)" >&5
$as_echo_n "checking for saxon8.jar (used by caltrop)... " >&6; }
	if test -f "$CALTROP_DIR/saxon8.jar"; then
	   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CALTROP_DIR/saxon8.jar" >&5
$as_echo "$CALTROP_DIR/saxon8.jar" >&6; }; fi

	   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for saxon8-dom.jar (used by caltrop)" >&5
$as_echo_n "checking for saxon8-dom.jar (used by caltrop)... " >&6; }
	   if test -f "$CALTROP_DIR/saxon8-dom.jar"; then
	       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CALTROP_DIR/saxon8-dom.jar" >&5
$as_echo "$CALTROP_DIR/saxon8-dom.jar" >&6; }; fi
	       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java_cup.jar (used by caltrop)" >&5
$as_echo_n "checking for java_cup.jar (used by caltrop)... " >&6; }
	       if test -f "$CALTROP_DIR/java_cup.jar"; then
	           if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CALTROP_DIR/java_cup.jar" >&5
$as_echo "$CALTROP_DIR/java_cup.jar" >&6; }; fi
	           PTCALTROP_DIR=caltrop
	       else
                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $CALTROP_DIR/java_cup.jar
    which is required by Cal, the actor language.
    You can download java_cup from
    http://www.cs.princeton.edu/~appel/modern/java/CUP/
    If it is not present, you will not be able to use the Cal actor
    or run the demonstrations  in ptolemy/caltrop" >&5
$as_echo "$as_me: WARNING: Failed to find $CALTROP_DIR/java_cup.jar
    which is required by Cal, the actor language.
    You can download java_cup from
    http://www.cs.princeton.edu/~appel/modern/java/CUP/
    If it is not present, you will not be able to use the Cal actor
    or run the demonstrations  in ptolemy/caltrop" >&2;}
	           # Note that we don't substitute in the ${PTII} here
	           CALTROP_DIR='${PTII}/lib/'
               fi
           else
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $CALTROP_DIR/saxon8-dom.jar
    which is required by Cal, the actor language.
    You can download saxon from http://saxon.sourceforge.net/
    If it is not present, you will not be able to use the Cal actor
    or run the demonstrations  in ptolemy/caltrop" >&5
$as_echo "$as_me: WARNING: Failed to find $CALTROP_DIR/saxon8-dom.jar
    which is required by Cal, the actor language.
    You can download saxon from http://saxon.sourceforge.net/
    If it is not present, you will not be able to use the Cal actor
    or run the demonstrations  in ptolemy/caltrop" >&2;}
	       # Note that we don't substitute in the ${PTII} here
	       CALTROP_DIR='${PTII}/lib/'
	   fi
	else
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $CALTROP_DIR/saxon8.jar
    which is required by Cal, the actor language.
    You can download saxon from http://saxon.sourceforge.net/
    If it is not present, you will not be able to use the Cal actor
    or run the demonstrations  in ptolemy/caltrop" >&5
$as_echo "$as_me: WARNING: Failed to find $CALTROP_DIR/saxon8.jar
    which is required by Cal, the actor language.
    You can download saxon from http://saxon.sourceforge.net/
    If it is not present, you will not be able to use the Cal actor
    or run the demonstrations  in ptolemy/caltrop" >&2;}
	   # Note that we don't substitute in the ${PTII} here
	   CALTROP_DIR='${PTII}/lib/'
        fi
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find PTII/lib/ptCal.jar
    ptCal.jar should be present in your distribution.
    If it is not present, you will not be able to use the Cal actor
    or run the demonstrations  in ptolemy/caltrop" >&5
$as_echo "$as_me: WARNING: Failed to find PTII/lib/ptCal.jar
    ptCal.jar should be present in your distribution.
    If it is not present, you will not be able to use the Cal actor
    or run the demonstrations  in ptolemy/caltrop" >&2;}
	# Note that we don't substitute in the ${PTII} here
	CALTROP_DIR='${PTII}/lib/'
    fi
fi

if test -z "$PTCALTROP_DIR"; then
   updateExcludes "ptolemy/caltrop/"
else
   updateClasspath "$CALTROP_DIR/ptCal.jar"
   updateClasspath "$CALTROP_DIR/java_cup.jar"
   updateClasspath "$CALTROP_DIR/saxon8.jar"
   updateClasspath "$CALTROP_DIR/saxon8-dom.jar"
fi

#--------------------------------------------------------------------
#       Checkstyle is used to check the style of java files by ant.
#
#
#--------------------------------------------------------------------
# We only need to look for CHECKSTYLE if this directory is present
CHECKSTYLE_USER_DIR="$PTII/ptolemy/actor/test/junit"

CHECKSTYLE_VERSION=-6.2
CHECKSTYLE_JAR="checkstyle$CHECKSTYLE_VERSION.jar"

if test ! -d "$CHECKSTYLE_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECKSTYLE_USER_DIR is not present,
    so we need not find Checkstyle for testing" >&5
$as_echo "$CHECKSTYLE_USER_DIR is not present,
    so we need not find Checkstyle for testing" >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Checkstyle, optionally used to check the style of Java files." >&5
$as_echo_n "checking for Checkstyle, optionally used to check the style of Java files.... " >&6; }

# Check whether --with-checkstyle was given.
if test "${with_checkstyle+set}" = set; then :
  withval=$with_checkstyle; CHECKSTYLE_DIR=$withval
else
  CHECKSTYLE_DIR=$PTII/vendors/checkstyle$CHECKSTYLE_VERSION
fi

    CHECKSTYLE_VERSION=`basename "$CHECKSTYLE_DIR" | sed 's/checkstyle\(.*\)$/\1/'`
    if test -r "$CHECKSTYLE_DIR/checkstyle$CHECKSTYLE_VERSION-all.jar" ; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECKSTYLE_DIR" >&5
$as_echo "$CHECKSTYLE_DIR" >&6; }; fi
        CHECKSTYLE_JAR="checkstyle$CHECKSTYLE_VERSION-all.jar"
    fi

    if test ! -f "$CHECKSTYLE_DIR/$CHECKSTYLE_JAR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Checkstyle in $PTII/vendors/checkstyle$CHECKSTYLE_VERSION
    Checkstyle is only necessary for code cleaning.
    Checkstyle is LGPL'd, so while it could be in the ptII repo, we don't add it.
    Checkstyle may be downloaded from http://checkstyle.sourceforge.net/" >&5
$as_echo "$as_me: WARNING: Failed to find Checkstyle in $PTII/vendors/checkstyle$CHECKSTYLE_VERSION
    Checkstyle is only necessary for code cleaning.
    Checkstyle is LGPL'd, so while it could be in the ptII repo, we don't add it.
    Checkstyle may be downloaded from http://checkstyle.sourceforge.net/" >&2;}
    fi
fi

#--------------------------------------------------------------------
#       "CHIC is a modular verifier for behavioral compatibility checking
#	 of software and hardware components"
#
#	For more information,
#       see https://embedded.eecs.berkeley.edu/research/chic/
#--------------------------------------------------------------------

# PTCHIC_DIR is set to chic and used in
# $PTII/ptolemy/makefile if Chic was found.
PTCHIC_DIR=

# Directory that contains the chic jar file
CHIC_DIR='${PTII}/lib'

# We only need to look for if $PTII/ptolemy/chic exists
CHIC_USER_DIR="$PTII/ptolemy/chic"
if test ! -d "$CHIC_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHIC_USER_DIR is not present,
    so we need not find Chic, the modular verifier for
    behavioral compatibility checking of software and hardware components." >&5
$as_echo "$CHIC_USER_DIR is not present,
    so we need not find Chic, the modular verifier for
    behavioral compatibility checking of software and hardware components." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Chic, the model checker" >&5
$as_echo_n "checking for Chic, the model checker... " >&6; }

# Check whether --with-chic was given.
if test "${with_chic+set}" = set; then :
  withval=$with_chic; CHIC_DIR=$withval
else
  CHIC_DIR=$PTII/lib
fi


    if test -f "$CHIC_DIR/chic.jar"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHIC_DIR" >&5
$as_echo "$CHIC_DIR" >&6; }; fi
	# We found chic
	PTCHIC_DIR=chic
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find PTII/lib/chic.jar
    chic.jar should be present in your distribution.
    Chic is a modular verifier for behavioral compatibility checking
    of software and hardware components.
    If it is not present, you will not be able to use the Chic facilities
    or run the demonstrations in ptolemy/chic." >&5
$as_echo "$as_me: WARNING: Failed to find PTII/lib/chic.jar
    chic.jar should be present in your distribution.
    Chic is a modular verifier for behavioral compatibility checking
    of software and hardware components.
    If it is not present, you will not be able to use the Chic facilities
    or run the demonstrations in ptolemy/chic." >&2;}
	# Note that we don't substitute in the ${PTII} here
	CHIC_DIR='${PTII}/lib'
    fi
fi

if test -z "$PTCHIC_DIR"; then
   updateExcludes "ptolemy/chic/"
else
   updateClasspath "$CHIC_DIR/chic.jar"
fi


case "`uname -s`" in
   Darwin) ECLIPSE_SWT_JAR=org.eclipse.swt.carbon.macosx_
  	   # Darwin has problems with echo -n?
   	   PT_ECHO="/bin/echo -n"
	   ;;
   *)      PT_ECHO=echo
  	   ;;
esac


#--------------------------------------------------------------------
#       COLT is a
#       "Open Source Libraries for High Performance Scientific and Technical
#       Computing in Java"
#	For more information, see
#       http://hoschek.home.cern.ch/hoschek/colt/
#--------------------------------------------------------------------

# PTCOLT_DIR is set to colt and used in
# $PTII/ptolemy/actor/lib/makefile if Colt was found.
PTCOLT_DIR=

# Colt jar files.  We ship $PTII/lib/ptcolt.jar, which is a subset
# of $PTII/vendors/misc/colt.jar
PTCOLT_JARS=

# Directory that contains the colt jar file
COLT_DIR='${PTII}/vendors/misc/colt'

# We only need to look for if $PTII/ptolemy/actor/lib/colt exists
COLT_USER_DIR="$PTII/ptolemy/actor/lib/colt"
if test ! -d "$COLT_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLT_USER_DIR is not present,
    so we need not find Colt, the
    Open Source Libraries for High Performance Scientific and Technical
    Computing in Java." >&5
$as_echo "$COLT_USER_DIR is not present,
    so we need not find Colt, the
    Open Source Libraries for High Performance Scientific and Technical
    Computing in Java." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ptolemy subset of Colt, the scientific computing lib" >&5
$as_echo_n "checking for Ptolemy subset of Colt, the scientific computing lib... " >&6; }
    if test -f "$PTII/lib/ptcolt.jar"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/lib/colt.jar" >&5
$as_echo "$PTII/lib/colt.jar" >&6; }; fi
        PTCOLT_JAR="$PTII/lib/ptcolt.jar"
	PTCOLT_DIR=colt
	# PTCOLT_PACKAGES is used in ptII/doc/makefile
	PTCOLT_PACKAGES=ptolemy.actor.lib.colt
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTII/lib/ptcolt.jar, will look for
    full colt.jar" >&5
$as_echo "$as_me: WARNING: Failed to find $PTII/lib/ptcolt.jar, will look for
    full colt.jar" >&2;}
        PTCOLT_JAR=
    fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Full version of Colt, the scientific computing lib" >&5
$as_echo_n "checking for Full version of Colt, the scientific computing lib... " >&6; }

# Check whether --with-colt was given.
if test "${with_colt+set}" = set; then :
  withval=$with_colt; COLT_DIR=$withval
else
  COLT_DIR=$PTII/vendors/misc/colt
fi


    if test -f "$COLT_DIR/colt.jar"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLT_DIR/colt.jar" >&5
$as_echo "$COLT_DIR/colt.jar" >&6; }; fi
	PTCOLT_JARS=$COLT_DIR/colt.jar$CLASSPATHSEPARATOR$PTCOLT_JAR
	# Put the ptcolt.jar second, after $COLT_DIR/colt.jar
        updateClasspath "$PTCOLT_JAR"
	updateClasspath "$COLT_DIR/colt.jar"
	# We found colt
	PTCOLT_DIR=colt
	# PTCOLT_PACKAGES is used in ptII/doc/makefile
	PTCOLT_PACKAGES=ptolemy.actor.lib.colt
    else
	if test -z "PTCOLT_DIR"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTII/lib/ptcolt.jar
    and $COLT_DIR/colt.jar.
    Colt is the 'Open Source Libraries for High Performance
    Scientific and Technical Computing in Java'
    For more information, see http://hoschek.home.cern.ch/hoschek/colt/
    If it is not present, you will not be able to use the Colt facilities
    or run the demonstrations in ptolemy/actor/lib/colt." >&5
$as_echo "$as_me: WARNING: Failed to find $PTII/lib/ptcolt.jar
    and $COLT_DIR/colt.jar.
    Colt is the 'Open Source Libraries for High Performance
    Scientific and Technical Computing in Java'
    For more information, see http://hoschek.home.cern.ch/hoschek/colt/
    If it is not present, you will not be able to use the Colt facilities
    or run the demonstrations in ptolemy/actor/lib/colt." >&2;}
	    # Note that we don't substitute in the ${PTII} here
	    COLT_DIR='${PTII}/vendors/misc/colt'
        else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Did not find $COLT_DIR/colt.jar,
    using $PTCOLT_JAR" >&5
$as_echo "$as_me: WARNING: Did not find $COLT_DIR/colt.jar,
    using $PTCOLT_JAR" >&2;}
    	    PTCOLT_JARS=$PTCOLT_JAR
	    updateClasspath "$PTCOLT_JAR"
        fi
    fi
fi

if test -z "$PTCOLT_DIR"; then
   updateExcludes "ptolemy/actor/lib/colt/"
fi


#--------------------------------------------------------------------
#       org.omg.CORBA.Object is part of the JDK 1.9 module system
#       The error is:
#   [javac]   (package org.omg.CORBA is declared in module java.corba, which is not in the module graph)
#
#--------------------------------------------------------------------

# PTCORBA_DIR is used in ptolemy/actor/makefile
PTCORBA_DIR=

# PTCORBA_PACKAGES is used in ptII/doc/makefile
PTCORBA_PACKAGES=

# We only need look for Corba if this directory exists
CORBA_USER_DIR="$PTII/ptolemy/actor/corba"
if test ! -d "$CORBA_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CORBA_USER_DIR is not present,
    so we need not check for CORBA." >&5
$as_echo "$CORBA_USER_DIR is not present,
    so we need not check for CORBA." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CORBA" >&5
$as_echo_n "checking for CORBA... " >&6; }
    # We need to run javac in the config directory so that javac from jdk1.1.6
    # under NT and cygwin works properly
    startdir=$PTII
    cd "$srcdir/config"
    # Don't use 'env $JAVAC . . .' here, it will not work under Cygwin
    if "$JAVAC" CORBATest.java ; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CORBA found in the default classpath" >&5
$as_echo "CORBA found in the default classpath" >&6; }; fi
        # PTCORBA_DIR is used in ptolemy/actor/lib/jjs/modules
        PTCORBA_DIR=corba
        # PTCORBA_PACKAGES is used in ptII/doc/makefile
        PTCORBA_PACKAGES="ptolemy.actor.corba ptolemy.actor.corba.util"
    else
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVAC\" CORBATest.java' failed.
    perhaps you are running an JDK 1.9?
    You will not be able to run the ptolemy.actor.corba actors,
    which is probably not a problem." >&5
$as_echo "$as_me: WARNING: '\"$JAVAC\" CORBATest.java' failed.
    perhaps you are running an JDK 1.9?
    You will not be able to run the ptolemy.actor.corba actors,
    which is probably not a problem." >&2;}
       updateExcludes "ptolemy/actor/corba/"
    fi
    cd "$startdir"

fi

#--------------------------------------------------------------------
#       Cobertura is used for code coverage
#
#
#--------------------------------------------------------------------
# We only need to look for COBERTURA if this directory is present
COBERTURA_USER_DIR="$PTII/ptolemy/actor/test/junit"

COBERTURA_VERSION=-2.0.3
COBERTURA_JAR="cobertura$COBERTURA_VERSION.jar"

if test ! -d "$COBERTURA_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COBERTURA_USER_DIR is not present,
    so we need not find Cobertura for testing" >&5
$as_echo "$COBERTURA_USER_DIR is not present,
    so we need not find Cobertura for testing" >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cobertura, optionally used for Java code coverage." >&5
$as_echo_n "checking for Cobertura, optionally used for Java code coverage.... " >&6; }

# Check whether --with-cobertura was given.
if test "${with_cobertura+set}" = set; then :
  withval=$with_cobertura; COBERTURA_DIR=$withval
else
  COBERTURA_DIR=$PTII/vendors/cobertura$COBERTURA_VERSION
fi

    COBERTURA_VERSION=`basename "$COBERTURA_DIR" | sed 's/cobertura\(.*\)$/\1/'`
    if test -r "$COBERTURA_DIR/cobertura$COBERTURA_VERSION.jar" ; then
        COBERTURA_JAR="cobertura$COBERTURA_VERSION.jar"
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COBERTURA_JAR" >&5
$as_echo "$COBERTURA_JAR" >&6; }; fi
    fi

    if test ! -f "$COBERTURA_DIR/$COBERTURA_JAR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Cobertura in $PTII/vendors/corbertura$COBERTURA_VERSION
    Cobertura is only necessary to for code coverage.
    Cobertura is GPL'd, so we don't check it in to the ptII repository.
    Cobertura may be downloaded from http://cobertura.github.io/cobertura/" >&5
$as_echo "$as_me: WARNING: Failed to find Cobertura in $PTII/vendors/corbertura$COBERTURA_VERSION
    Cobertura is only necessary to for code coverage.
    Cobertura is GPL'd, so we don't check it in to the ptII repository.
    Cobertura may be downloaded from http://cobertura.github.io/cobertura/" >&2;}
    fi
fi

#--------------------------------------------------------------------
#       CUnit is used to test C Code in the code generator
#
#
#--------------------------------------------------------------------
# We only need to look for CUnit if this directory is present
CUNIT_USER_DIR="$PTII/ptolemy/cg/kernel/generic/program/procedural/c/type"

# PTCUNIT_DIR is set to test and used in
# $PTII/ptolemy/cg/kernel/generic/program/procedural/c/type
# if CUnit is found
PTCUNIT_DIR=

if test ! -d "$CUNIT_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUNIT_USER_DIR is not present,
    so we need not find CUnit for testing" >&5
$as_echo "$CUNIT_USER_DIR is not present,
    so we need not find CUnit for testing" >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUnit to be used to test the C cg templates" >&5
$as_echo_n "checking for CUnit to be used to test the C cg templates... " >&6; }

# Check whether --with-cunit was given.
if test "${with_cunit+set}" = set; then :
  withval=$with_cunit; CUNIT_DIR=$withval
else
  CUNIT_DIR=/usr/local
fi

    if test -r "$CUNIT_DIR/include/CUnit/Basic.h" ; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUNIT_DIR" >&5
$as_echo "$CUNIT_DIR" >&6; }; fi
        #PTCUNIT_INCLUDE_DIR="$CUNIT_DIR/include"
        #PTCUNIT_LIB_DIR="$CUNIT_DIR/lib"
        PTCUNIT_DIR=test
    else
        if test -r /usr/local/include/CUnit/Basic.h ; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/include" >&5
$as_echo "/usr/include" >&6; }; fi
            #PTCUNIT_INCLUDE_DIR=/usr/local/include
            #PTCUNIT_LIB_DIR=/usr/local/lib
            PTCUNIT_DIR=test
        else
	    if test -r "$PTII/vendors/CUnit/include/CUnit/Basic.h" ; then
	        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/vendors/CUnit" >&5
$as_echo "$PTII/vendors/CUnit" >&6; }; fi
                #PTCUNIT_INCLUDE_DIR="$PTII/vendors/CUnit/include"
	        #PTCUNIT_LIB_DIR="$PTII/vendors/CUnit/lib"
	        PTCUNIT_DIR=test
            else
   	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find CUnit in /usr/local or
    $PTII/vendors/CUnit.
    CUnit is only necessary to test the C templates of the code generation facility" >&5
$as_echo "$as_me: WARNING: Failed to find CUnit in /usr/local or
    $PTII/vendors/CUnit.
    CUnit is only necessary to test the C templates of the code generation facility" >&2;}
    	        updateExcludeTests **/ptolemy/cg/kernel/generic/program/procedural/c/type/test/junit/JUnitTclTest.java
		updateExcludeTests **/ptolemy/cg/adapter/generic/program/procedural/c/adapters/ptolemy/domains/de/kernel/test/junit/JUnitTclTest.java
            fi
        fi
    fi
fi

#--------------------------------------------------------------------
#       doclets are used to control javadoc
#	The Ptolemy II doclets are in $PTII/doc/doclets
#	and use $PTJAVA_HOME/../tools.jar to compile
#--------------------------------------------------------------------

# We only need to look for doclet if $PTII/doc/doclets is present
DOCLETS_USER_DIR="$PTII/doc/doclets"
DOCLETS_PRESENT=no

# Location of tools.jar, usually $(PTJAVA_HOME)/../lib/tools.jar
TOOLS_JAR=

# PTDOCLETS_DIR is set to doclets and used in
# $PTII/doc if com.sun.tools.doclets.Taglet can be found
PTDOCLETS_DIR=

# If we can compile in doc/doclets, we set JDOCTAGLET appropriately
# and use JDOCTAGLET in doc/makefile
JDOCTAGLET=

if test ! -d "$DOCLETS_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCLETS_USER_DIR is not present,
    so we need not find tools.jar in the JRE." >&5
$as_echo "$DOCLETS_USER_DIR is not present,
    so we need not find tools.jar in the JRE." >&6; }; fi
    # Use curly brackets around PTII so that if tools.jar is not present

    TOOLS_JAR='${PTJAVA_HOME}/../lib/tools.jar'
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tools.jar for use with doclets" >&5
$as_echo_n "checking for tools.jar for use with doclets... " >&6; }

# Check whether --with-tools_jar was given.
if test "${with_tools_jar+set}" = set; then :
  withval=$with_tools_jar; TOOLS_JAR=$withval
else
  TOOLS_JAR=${PTJAVA_HOME}/../lib/tools.jar
fi

    if test -f "$TOOLS_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_JAR" >&5
$as_echo "$TOOLS_JAR" >&6; }; fi
	PTDOCLETS_DIR=doclets
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find tools.jar, checking for classes.jar" >&5
$as_echo "$as_me: WARNING: Could not find tools.jar, checking for classes.jar" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for classes.jar for use with doclets" >&5
$as_echo_n "checking for classes.jar for use with doclets... " >&6; }
	TOOLS_JAR=${PTJAVA_HOME}/../Classes/classes.jar
        if test -f "$TOOLS_JAR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_JAR" >&5
$as_echo "$TOOLS_JAR" >&6; }; fi
	    PTDOCLETS_DIR=doclets
        else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find tools.jar or classes.jar in
    PTJAVA_HOME = $PTJAVA_HOME
    Usually, tools.jar is in PTJAVA_HOME/../lib/tools.jar
    or classes.jar is in PTJAVA_HOME/../Classes/classes.jar
    Since tools.jar and classes.jar cannot be found,
    we will not use doclets from ptII/doc/doclets, which
    means that the actor documentation index system will not work." >&5
$as_echo "$as_me: WARNING: Could not find tools.jar or classes.jar in
    PTJAVA_HOME = $PTJAVA_HOME
    Usually, tools.jar is in PTJAVA_HOME/../lib/tools.jar
    or classes.jar is in PTJAVA_HOME/../Classes/classes.jar
    Since tools.jar and classes.jar cannot be found,
    we will not use doclets from ptII/doc/doclets, which
    means that the actor documentation index system will not work." >&2;}
        fi
    fi
fi
if test -z "$PTDOCLETS_DIR"; then
   updateExcludes "doc/doclets/"
else
   addToolsJarToEclipse=yes

#   case "`uname -s`" in
#	Darwin)
#	    case "$TOOLS_JAR" in
#		*/Classes/classes.jar)
#		    addToolsJarToEclipse=no
#  	            AC_MSG_WARN([Not including $TOOLS_JAR
#   to the Eclipse classpath under Darwin because it is already present.]);;
#            esac;;
#   esac

    if test "$addToolsJarToEclipse" = "yes" ; then
       updateClasspath "$TOOLS_JAR"
    fi
    JDOCTAG="-tag Pt.AcceptedRating -tag Pt.ProposedRating"

    # Sadly, Java 10 changed Taglet so that it is not backward compatible, so doc/doclets/RatingTaglet.java was removed,
    # see https://github.com/icyphy/ptII/commit/934554746d971dfd8f79cf5aa8281f5d582d17c6
    # Use curly brackets so PTII gets expanded in the makefile
    #JDOCTAGLET='-tagletpath "${PTII}" -taglet doc.doclets.RatingTaglet'
fi

# The javadoc program
# Extract the first word of "javadoc", so it can be a program name with args.
set dummy javadoc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVADOC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVADOC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVADOC="$JAVADOC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVADOC=$ac_cv_path_JAVADOC
if test -n "$JAVADOC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5
$as_echo "$JAVADOC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test -x "$JAVADOC"; then
    case "`uname -s`" in
    CYGWIN*)
		# We use cygpath here
		# so that we can run make from within the doc builder gui.  The reason is that
		# the doc builder gui runs make within a cmd shell, not a bash shell, which
		# means that /cygdrive/c notation will not be understood.
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Under windows, javadoc should use the non-cywin path" >&5
$as_echo_n "checking Under windows, javadoc should use the non-cywin path... " >&6; }
		JAVADOC=`cygpath --mixed "$JAVADOC"`
	        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5
$as_echo "$JAVADOC" >&6; }; fi
    ;;
    esac
fi


#--------------------------------------------------------------------
#       We use Eclipse for parsing java backtracking.
#       Eclipse is an integrated development environment, see
#	http://www.eclipse.org
#       See if there was a command-line option for where Eclipse can be found
#       is
#       If not, look for for $PTII/vendors/eclipse
#--------------------------------------------------------------------

# PTBACKTRACK_DIR is set to backtrack and used in
# $PTII/ptolemy/makefile if we can handle generics (Java 1.5)
PTBACKTRACK_DIR=backtrack

# PTBACKTRACK_ECLIPSE_DIR is set to eclipse and used in
# $PTII/ptolemy/backtrack/makefile if Eclipse was found
# and the jar files were found
PTBACKTRACK_ECLIPSE_DIR=

# Jar files used by ptolemy/backtrack/eclipse
PTBACKTRACK_ECLIPSE_JARS=

# Default to looking for Eclipse
PTECLIPSE_PLUGINS=yes

eclipseMessage="The backtracking facility requires Eclipse 3.2 or greater.
    You need not download Eclipse unless you plan on using the backtracking
    facility in ptolemy.backtrack.
    Eclipse may be downloaded from http://www.eclipse.org/"

if test ! -d "$PTII/ptolemy/backtrack/eclipse" -o "x$ECLIPSE_CLASSPATHENTRY_PDE_REQUIREDPLUGINS" == "x"; then
    if test ! -d "$PTII/ptolemy/backtrack/eclipse"; then
        if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/backtrack/eclipse is not present,
	so we need not find Eclipse." >&5
$as_echo "$PTII/ptolemy/backtrack/eclipse is not present,
	so we need not find Eclipse." >&6; }; fi
    fi
    if test "x$ECLIPSE_CLASSPATHENTRY_PDE_REQUIREDPLUGINS" == "x"; then
	if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: You are running under Mac OS X, and backtracking
    is not currently supported.  See
    http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Mac" >&5
$as_echo "You are running under Mac OS X, and backtracking
    is not currently supported.  See
    http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Mac" >&6; }; fi
    fi
else
    if test ! "$HAS_GENERICS" = "yes"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running Java $JVERSION, which does not
    support generics.  Thus, ptolemy/backtrack/eclipse will not compile." >&5
$as_echo "$as_me: WARNING: You are running Java $JVERSION, which does not
    support generics.  Thus, ptolemy/backtrack/eclipse will not compile." >&2;}
	PTBACKTRACK_DIR=
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Eclipse installation" >&5
$as_echo_n "checking for Eclipse installation... " >&6; }
        # Use changequote to protect the square brackets in sed

	# Extract the first word of "eclipse", so it can be a program name with args.
set dummy eclipse; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ECLIPSE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $ECLIPSE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ECLIPSE="$ECLIPSE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_ECLIPSE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
ECLIPSE=$ac_cv_path_ECLIPSE
if test -n "$ECLIPSE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECLIPSE" >&5
$as_echo "$ECLIPSE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	if test -f "$ECLIPSE"; then
	    startdir=$PTII
	    cd "$srcdir/config"
	    if "$JAVAC" RootDirectory.java ; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the value of the Eclipse root directory " >&5
$as_echo_n "checking the value of the Eclipse root directory ... " >&6; }
		if env "$JAVA" -classpath "$PTII/config" RootDirectory "$ECLIPSE"> /dev/null; then

		   ECLIPSE_DIR_TMP=`"$JAVA" -classpath "$PTII/config" RootDirectory "$ECLIPSE"`

		    # Use changequote to protect the square brackets in sed
		    # Remove /cygdrive so we can compile with MSVC
		    TMP_ECLIPSE_DIR=`echo "$ECLIPSE_DIR_TMP" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`

		    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$TMP_ECLIPSE_DIR'" >&5
$as_echo "'$TMP_ECLIPSE_DIR'" >&6; }; fi
		else
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVA\" -classpath \"$PTII/config\" RootDirectory \"$ECLIPSE\"' failed.
    We will not be able to compile the Eclipse interface in ptolemy/backtrack/" >&5
$as_echo "$as_me: WARNING: '\"$JAVA\" -classpath \"$PTII/config\" RootDirectory \"$ECLIPSE\"' failed.
    We will not be able to compile the Eclipse interface in ptolemy/backtrack/" >&2;};
		fi
	    else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'cd \"$PTII/config\"; $JAVAC RootDirectory.java' failed.
    We will not be able to compile the Eclipse interface in ptolemy/backtrack" >&5
$as_echo "$as_me: WARNING: 'cd \"$PTII/config\"; $JAVAC RootDirectory.java' failed.
    We will not be able to compile the Eclipse interface in ptolemy/backtrack" >&2;};
	    fi
	    cd "$startdir"
	else
	    # We cd to *clipse so that we get the case right in the jar files.
            if test -d "c:/Program Files/Eclipse" -o -d "c:/Program Files/eclipse"; then
            # Remove /cygdrive
                TMP_ECLIPSE_DIR="`cd c:/Program\ Files/*clipse; pwd | sed 's@/cygdrive/\([a-z]\)/@\1:/@'`"
            else
                TMP_ECLIPSE_DIR="c:/Program\ Files/eclipse"
            fi
	    if test -d "/Applications/eclipse"; then
	        TMP_ECLIPSE_DIR=/Applications/eclipse
            else
                TMP_ECLIPSE_DIR=`ls -1dr /Applications/[Ee]clipse* | head -1`
                if ! test -d "$TMP_ECLIPSE_DIR" -a -d /usr/lib/eclipse; then
                    TMP_ECLIPSE_DIR=/usr/lib/eclipse
                fi
            fi
        fi

# Check whether --with-eclipse was given.
if test "${with_eclipse+set}" = set; then :
  withval=$with_eclipse; ECLIPSE_DIR=$withval
else
  ECLIPSE_DIR=$TMP_ECLIPSE_DIR
fi


        if test "$ECLIPSE_DIR" = "no"; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure called with --without-eclipse
   not building in ptolemy/apps/eclipse and ptolemy/backtrack." >&5
$as_echo "$as_me: WARNING: configure called with --without-eclipse
   not building in ptolemy/apps/eclipse and ptolemy/backtrack." >&2;}
           updateExcludes "ptolemy/apps/eclipse/"
        else
	    if test ! -d "$ECLIPSE_DIR"; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Eclipse in $ECLIPSE_DIR" >&5
$as_echo "$as_me: WARNING: Failed to find Eclipse in $ECLIPSE_DIR" >&2;}
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PTII/vendors/eclipse" >&5
$as_echo_n "checking for $PTII/vendors/eclipse... " >&6; }
                if test -d  "$PTII/vendors/eclipse"; then
	            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
	            ECLIPSE_DIR="$PTII/vendors/eclipse"
                else
	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Eclipse in $PTII/vendors/eclipse" >&5
$as_echo "$as_me: WARNING: Failed to find Eclipse in $PTII/vendors/eclipse" >&2;}
                    # Extract the first word of "eclipse", so it can be a program name with args.
set dummy eclipse; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTECLIPSE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTECLIPSE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTECLIPSE="$PTECLIPSE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTECLIPSE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTECLIPSE=$ac_cv_path_PTECLIPSE
if test -n "$PTECLIPSE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTECLIPSE" >&5
$as_echo "$PTECLIPSE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


                    if test "${PTECLIPSE:-none}" != "none"; then
                 # Remove /cygdrive
	                ECLIPSE_DIR=`dirname $PTECLIPSE | sed 's@/cygdrive/\([a-z]\)/@\1:/@'`
	             fi
	         fi
             fi
        fi
        if test -d "$ECLIPSE_DIR"; then
            # Under RHEL 6.2, eclipse is in /usr/bin/eclipse
            if test ! -d "$ECLIPSE_DIR/plugins"; then
	        savedEclipseDir=$ECLIPSE_DIR
	        ECLIPSE_DIR=no
                eclipsedirs="/usr/local /usr/lib /usr/lib64"
                for eclipsedir in $eclipsedirs
                do
                    if test -d "$eclipsedir/eclipse/plugins"; then
                        ECLIPSE_DIR="$eclipsedir/eclipse"
                        break
                    fi
                done
		if test ! -d "$ECLIPSE_DIR"; then
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Eclipse was found in $savedEclipseDir, but $savedEclipseDir/plugins was not found?\"" >&5
$as_echo "$as_me: WARNING: Eclipse was found in $savedEclipseDir, but $savedEclipseDir/plugins was not found?\"" >&2;}
                fi
            fi
        fi

        if test -d "$ECLIPSE_DIR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECLIPSE_DIR" >&5
$as_echo "$ECLIPSE_DIR" >&6; }; fi
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jars used by backtracking in $ECLIPSE_DIR" >&5
$as_echo_n "checking for jars used by backtracking in $ECLIPSE_DIR... " >&6; }

	    case "`uname -s`" in
	    Darwin) ECLIPSE_SWT_JAR=org.eclipse.swt.cocoa.macosx
		;;
	    Linux) ECLIPSE_SWT_JAR=eclipse.swt.gtk.linux
		;;
	    *) ECLIPSE_SWT_JAR=eclipse.swt.win32.win32.x86_
	       ECLIPSE_JDT_UI_JAR=eclipse.jdt.ui_
		;;
	    esac

	    # jars="jdt.core osgi resources runtime"
	    # jdt.core core.runtime_ are needed to build backtrack
	    # osgi_ and resources_ are needed to run the tests in backtrack
	    jars="eclipse.jdt.core_ eclipse.core.runtime_ eclipse.osgi_ eclipse.core.resources_ eclipse.equinox.common_ eclipse.core.jobs_ eclipse.core.contenttype_ eclipse.equinox.preferences_ eclipse.text_ eclipse.ui.workbench_ eclipse.jface_ $ECLIPSE_SWT_JAR $ECLIPSE_JDT_UI eclipse.jface.text_ eclipse.ui.workbench.texteditor_ eclipse.ui.editors_ eclipse.core.commands_ org.eclipse.equinox.registry_ eclipse.ui.console_ eclipse.ui.forms_ eclipse.ui.ide_"
	    ANT_ECLIPSE_CLASSPATH=
	    eclipsejarpath=
	    for jar in $jars
	    do
	    	if test "${PTVERBOSE:-none}" = "none"; then
	            $PT_ECHO $ECHO_N "."
	        else
                    $PT_ECHO $ECHO_N "$jar "
                fi
		# In more recent versions of eclipse, the jdt jars are in dropins/, the other jars are in plugins/
	        jarpath=`$FIND "$ECLIPSE_DIR" -name "*${jar}*.jar" | grep -v source_ | head -1`
   	        if test -f "$jarpath"; then
                    # Keep track of the jars so we can use them while building
		    # with make.
	            ANT_ECLIPSE_CLASSPATH="$ANT_ECLIPSE_CLASSPATH <pathelement location=\"$jarpath\"/> "
  	            eclipsejarpath="$eclipsejarpath$CLASSPATHSEPARATOR$jarpath"

		    # NOTE: Eclipse 3.0 has problems if we include these
		    # jars in the .classpath, instead, .classpath.in includes:
		    #  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
                    updateClasspath "$jarpath"
 	        else
		    # If the jar name contains swt, then try just eclipse.swt_
		    # FIXME: Duplicated code here and below.
		    echo "$jar" | egrep swt >& /dev/null
		    status=$?
		    if test "$status" -eq 0; then
		        tmpjar="eclipse.swt_"
		        jarpath=`$FIND "$ECLIPSE_DIR" -name "*${tmpjar}*.jar" | grep -v source_ | head -1`
   	                if test -f "$jarpath"; then
	                    ANT_ECLIPSE_CLASSPATH="$ANT_ECLIPSE_CLASSPATH <pathelement location=\"$jarpath\"/> "
  	                    eclipsejarpath="$eclipsejarpath$CLASSPATHSEPARATOR$jarpath"
                            updateClasspath "$jarpath"
			else
                            ECLIPSE_DIR_JARS=`$FIND $ECLIPSE_DIR -name "*.jar"`
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $jar or $tmpjar in $ECLIPSE_DIR: $jarpath
    $ECLIPSE_DIR contains the following jars:
    $ECLIPSE_DIR_JARS" >&5
$as_echo "$as_me: WARNING: Failed to find $jar or $tmpjar in $ECLIPSE_DIR: $jarpath
    $ECLIPSE_DIR contains the following jars:
    $ECLIPSE_DIR_JARS" >&2;}
    	                    eclipsejarpath=
		            break
			fi
	            else
                        ECLIPSE_DIR_JARS=`$FIND $ECLIPSE_DIR -name "*.jar"`
		        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $jar in $ECLIPSE_DIR: $jarpath.
    $ECLIPSE_DIR contains the following jars:
    $ECLIPSE_DIR_JARS" >&5
$as_echo "$as_me: WARNING: Failed to find $jar in $ECLIPSE_DIR: $jarpath.
    $ECLIPSE_DIR contains the following jars:
    $ECLIPSE_DIR_JARS" >&2;}
	                eclipsejarpath=
   		        break
                    fi
	        fi


	    done

            if test ! -z "$eclipsejarpath"; then
                if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi

	        # Get the plugin jar files for use with javadoc in $PTII/doc
		case "`uname -s`" in
		Darwin) ECLIPSE_SWT_JAR=org.eclipse.swt.cocoa.macosx
			# Darwin has problems with echo -n?
			PT_ECHO="/bin/echo -n"
			;;
		Linux)	ECLIPSE_SWT_JAR=eclipse.swt.gtk.linux
			;;
		*)	ECLIPSE_SWT_JAR=eclipse.swt.win32.win32.x86_
		        ECLIPSE_JDT_UI_JAR=eclipse.jdt.ui_
			PT_ECHO=echo
			;;
		esac
	        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Eclipse jars used with javadoc" >&5
$as_echo_n "checking for Eclipse jars used with javadoc... " >&6; }
		docjars="eclipse.core.commands_ eclipse.equinox.registry_ eclipse.jface_ eclipse.jface.text_ eclipse.ui.workbench_ eclipse.ui.workbench.texteditor_ eclipse.ui.console_ eclipse.ui.editors_ eclipse.text_ eclipse.ui.forms_ eclipse.ui.ide_ $ECLIPSE_SWT_JAR $ECLIPSE_JDT_UI_JAR"
		# eclipse.core.runtime_ org.eclipse.equinox.common_ org.eclipse.core.resources_ org.eclipse.core.jobs_
	        PTBACKTRACK_ECLIPSE_DOC_JARS=
	        for jar in $docjars
	        do
	    	    if test "${PTVERBOSE:-none}" = "none"; then
	                $PT_ECHO $ECHO_N "."
	            else
                        $PT_ECHO $ECHO_N "$jar "
                    fi
		    # In more recent versions of eclipse, the jdt jars are in dropins/, the other jars are in plugins/
	            jarpath=`$FIND "$ECLIPSE_DIR" -name "*${jar}*.jar" | head -1`
   	            if test -f "$jarpath"; then
	                # Keep track of the jars so we can use them while
		        # building with ant and make.
			ANT_ECLIPSE_CLASSPATH="$ANT_ECLIPSE_CLASSPATH <pathelement location=\"$jarpath\"/> "
	                PTBACKTRACK_ECLIPSE_DOC_JARS="$PTBACKTRACK_ECLIPSE_DOC_JARS$CLASSPATHSEPARATOR$jarpath"
#			case "`uname -s`" in
#			Darwin) updateClasspath "$jarpath";;
#	   		esac
 	            else
  		        # If the jar name contains swt, then try just eclipse.swt_
		        # FIXME: Duplicated code here and below.
		        echo "$jar" | egrep swt >& /dev/null
		        status=$?
		        if test "$status" -eq 0; then
		            tmpjar="eclipse.swt_"
		            jarpath=`$FIND "$ECLIPSE_DIR" -name "*${tmpjar}*.jar" | grep -v source_ | head -1`
   	                    if test -f "$jarpath"; then
			        ANT_ECLIPSE_CLASSPATH="$ANT_ECLIPSE_CLASSPATH <pathelement location=\"$jarpath\"/> "
	                        PTBACKTRACK_ECLIPSE_DOC_JARS="$PTBACKTRACK_ECLIPSE_DOC_JARS$CLASSPATHSEPARATOR$jarpath"
			    else
                                ECLIPSE_DIR_JARS=`$FIND $ECLIPSE_DIR -name "*.jar"`
		                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $jar or $tmpjar in $ECLIPSE_DIR: $jarpath
    $ECLIPSE_DIR contains the following jars:
    $ECLIPSE_DIR_JARS" >&5
$as_echo "$as_me: WARNING: Failed to find $jar or $tmpjar in $ECLIPSE_DIR: $jarpath
    $ECLIPSE_DIR contains the following jars:
    $ECLIPSE_DIR_JARS" >&2;}
			        failedToFindEclipseDocJars=1
		                break
			    fi
		        else
			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $jar in $ECLIPSE_DIR: $jarpath" >&5
$as_echo "$as_me: WARNING: Failed to find $jar in $ECLIPSE_DIR: $jarpath" >&2;}
			    failedToFindEclipseDocJars=1
		            break
                        fi
	            fi
	        done
                if test ! -z "$PTBACKTRACK_ECLIPSE_DOC_JARS" -a -z "$failedToFindEclipseDocJars"; then
                    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
                else
                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Eclipse jar file for docs.
    As a result, building the javadoc documentation might show warnings.
    $eclipseMessage" >&5
$as_echo "$as_me: WARNING: Failed to find Eclipse jar file for docs.
    As a result, building the javadoc documentation might show warnings.
    $eclipseMessage" >&2;}
                fi

	        startdir=$PTII
	        cd "$srcdir/config"
	        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ITreeSelection from Eclipse" >&5
$as_echo_n "checking for ITreeSelection from Eclipse... " >&6; }
	        if "$JAVAC" -classpath "$PTBACKTRACK_ECLIPSE_DOC_JARS" EclipseITreeSelection.java ; then
                    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
		    ANT_CLASSPATH="$ANT_CLASSPATH $ANT_ECLIPSE_CLASSPATH"
		    # Set to eclipse and used in
		    # $PTII/ptolemy/backtrack/makefile if Eclipse jar
		    # files were found
		    PTBACKTRACK_ECLIPSE_DIR=eclipse
		    # PTBACKTRACK_ECLIPSE_PACKAGES is used in ptII/doc/makefile
		    PTBACKTRACK_ECLIPSE_PACKAGES="ptolemy.backtrack.eclipse.ast ptolemy.backtrack.eclipse.ast.transform ptolemy.backtrack.eclipse.plugin ptolemy.backtrack.eclipse.plugin.actions ptolemy.backtrack.eclipse.plugin.editor ptolemy.backtrack.eclipse.plugin.preferences ptolemy.backtrack.eclipse.plugin.util"
		    PTBACKTRACK_ECLIPSE_JARS=$eclipsejarpath
                else
 	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to compile config/EclipseITreeSelection.java with
    (cd \"$PTII/config\"; \"$JAVAC\" -classpath $PTBACKTRACK_ECLIPSE_DOC_JARS EclipseITreeSelection.java)
    $eclipseMessage" >&5
$as_echo "$as_me: WARNING: Failed to compile config/EclipseITreeSelection.java with
    (cd \"$PTII/config\"; \"$JAVAC\" -classpath $PTBACKTRACK_ECLIPSE_DOC_JARS EclipseITreeSelection.java)
    $eclipseMessage" >&2;}
                    eclipsejarpath=
                fi
	        cd "$startdir"
             fi
        fi


        if test "$ECLIPSE_DIR" != "no" -a "$PTBACKTRACK_ECLIPSE_DIR" = ""; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Eclipse
    perhaps Eclipse is not installed?
    $eclipseMessage" >&5
$as_echo "$as_me: WARNING: Failed to find Eclipse
    perhaps Eclipse is not installed?
    $eclipseMessage" >&2;}
	    PTBACKTRACK_ECLIPSE_JARS=
        fi
    fi
fi

if test -z "$PTBACKTRACK_ECLIPSE_DIR"; then
   updateExcludes "ptolemy/apps/eclipse/awt/"
   updateExcludes "ptolemy/backtrack/"
   updateExcludes "ptolemy/backtrack/ast/"
fi

#--------------------------------------------------------------------
#       Garbage Collector (GC)
#       The C code generator can use the Boehm Garbage Collector
#       See http://www.hpl.hp.com/personal/Hans_Boehm/gc/
#--------------------------------------------------------------------
#
# GC_LD_DIRECTIVE is set to the values to pass to cc or ld if
# GC_malloc() can be found either in the default compiler location
# or in $PTII/lib.
# GC_LD_DIRECTIVE is used in ptolemy/copernicus/c/
GC_LD_DIRECTIVE=

# GC_DIR is set to the directory where GC can be found
GC_DIR=

if test ! -d "$PTII/ptolemy/copernicus/c"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/copernicus/c is not present,
    so we need not find the Boehm GC." >&5
$as_echo "$PTII/ptolemy/copernicus/c is not present,
    so we need not find the Boehm GC." >&6; }; fi
else
    # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCC="$PTCC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCC=$ac_cv_path_PTCC
if test -n "$PTCC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCC" >&5
$as_echo "$PTCC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test "${PTCC:-none}" = "none"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc" >&5
$as_echo "$as_me: WARNING: Failed to find gcc" >&2;}
        # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCC="$PTCC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCC=$ac_cv_path_PTCC
if test -n "$PTCC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCC" >&5
$as_echo "$PTCC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "${PTCC:-none}" != "none"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCC" >&5
$as_echo "$PTCC" >&6; }; fi
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc or cc, so we will
    not be able use GC in $PTII/ptolemy/copernicus/c" >&5
$as_echo "$as_me: WARNING: Failed to find gcc or cc, so we will
    not be able use GC in $PTII/ptolemy/copernicus/c" >&2;};
        fi
    fi

    if test "${PTCC:-none}" != "none"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Garbage Collector" >&5
$as_echo_n "checking for Garbage Collector... " >&6; }
       ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="gcc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
          if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  fi
fi
if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_CC="cc"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# != 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl.exe
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_CC" && break
done

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi

fi


test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }

# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"

ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  esac
done
rm -f $ac_rmfiles

if { { ac_try="$ac_link_default"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :
  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files ''
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else
  ac_file=''
fi
if test -z "$ac_file"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
$as_echo_n "checking for C compiler default output file name... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext

rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
FILE *f = fopen ("conftest.out", "w");
 return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
  { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
  if { ac_try='./conftest$ac_cv_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
    fi
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
$as_echo "$cross_compiling" >&6; }

rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if ${ac_cv_objext+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :
  for ac_file in conftest.o conftest.obj conftest.*; do
  test -f "$ac_file" || continue;
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if ${ac_cv_c_compiler_gnu+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
if ${ac_cv_prog_cc_g+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_prog_cc_g=no
   CFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_g=yes
else
  CFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
  CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if ${ac_cv_prog_cc_c89+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdarg.h>
#include <stdio.h>
struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}

/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
   function prototypes and stuff, but not '\xHH' hex character constants.
   These don't provoke an error unfortunately, instead are silently treated
   as 'x'.  The following induces an error, until -std is added to get
   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
   array size at least.  It's necessary to write '\x00'==0 to get something
   that's true only with -std.  */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];

int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC

fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
  x)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
  xno)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c89"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :

fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5
$as_echo_n "checking for GC_malloc in -lgc... " >&6; }
if ${ac_cv_lib_gc_GC_malloc+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgc  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char GC_malloc ();
int
main ()
{
return GC_malloc ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_gc_GC_malloc=yes
else
  ac_cv_lib_gc_GC_malloc=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5
$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; }
if test "x$ac_cv_lib_gc_GC_malloc" = xyes; then :
  PT_GC=yes
else
  PT_GC=no
fi

       if test "$PT_GC" = "yes"; then
           if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; fi
       else
           if test -f "$PTII/lib/libgc.a"; then
	      # FIXME: what about Windows?
	      GC_LD_DIRECTIVE='"-L${PTII}/lib" -lgc'
	      if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: use $GC_LD_DIRECTIVE" >&5
$as_echo "use $GC_LD_DIRECTIVE" >&6; }; fi
           else
	      # FIXME: This will not work if $PTII has spaces
	      dirs="$PTII/vendors/gc/gc6.4 $PTII/vendors/gc/gc6.1 $PTII/vendors/gc/gc"
	      for dir in $dirs
	      do
	          if test -d "$dir"; then
                      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find GC_malloc(), but
    $dir exists.  See \$PTII/vendors/gc/README.txt
    if you would like to use the Garbage Collector with the C code generator" >&5
$as_echo "$as_me: WARNING: Failed to find GC_malloc(), but
    $dir exists.  See \$PTII/vendors/gc/README.txt
    if you would like to use the Garbage Collector with the C code generator" >&2;}
                  fi
	      done
           fi
       fi
    fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gc.h" >&5
$as_echo_n "checking for gc.h... " >&6; }

# Check whether --with-gc-include was given.
if test "${with_gc_include+set}" = set; then :
  withval=$with_gc_include; GC_INCLUDE_DIR=$withval
else
  GC_INCLUDE_DIR=$PTII/vendors/gc/gc/include
fi


   if test -f "$GC_INCLUDE_DIR/gc.h"; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GC_INCLUDE_DIR/gc.h" >&5
$as_echo "$GC_INCLUDE_DIR/gc.h" >&6; }; fi
   else
       # FIXME: This will not work if $PTII has spaces
       dirs="$PTII/vendors/gc/gc6.4 $PTII/vendors/gc/gc6.1 $PTII/vendors/gc/gc"
       for dir in $dirs
       do
           if test -f "$dir/include/gc.h"; then
               GC_INCLUDE_DIR=$PTII/vendors/gc/gc6.4/include
	       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GC_INCLUDE_DIR/gc.h" >&5
$as_echo "$GC_INCLUDE_DIR/gc.h" >&6; }; fi
           fi
       done
       if test ! -f "$GC_INCLUDE_DIR/gc.h"; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gc.h.
    Checked the following directories:
    $dirs
    The Boehm Garbage Collector can be downloaded from
    http://www.hpl.hp.com/personal/Hans_Boehm/gc/
    if you wish to use it with the the older copernicus C code generator.
    The newer codegenerator in codegen does _not_ require the Boehm GC." >&5
$as_echo "$as_me: WARNING: Failed to find gc.h.
    Checked the following directories:
    $dirs
    The Boehm Garbage Collector can be downloaded from
    http://www.hpl.hp.com/personal/Hans_Boehm/gc/
    if you wish to use it with the the older copernicus C code generator.
    The newer codegenerator in codegen does _not_ require the Boehm GC." >&2;}
       fi
   fi
fi



#--------------------------------------------------------------------
#       gcc-arm is a GNU compiler for the Arm processor used by
#	the mbed code generator in ptolemy/cg/adapter/generic/program/procedural/c/mbed
#--------------------------------------------------------------------

# Set to mbed and used in
# $PTII/ptolemy/cg/adapter/generic/program/procedural/c/makefile
# if vendors/mbed/gcc-arm/bin/arm-none-eabi-gcc was found
PTMBED_DIR=

# We only need to look for vendors/mbed/gcc-arm/bin/arm-none-eabi-gcc if
# $PTII/ptolemy/cg/adapter/generic/program/procedural/c/mbed exists
MBED_USER_DIR="$PTII/ptolemy/cg/adapter/generic/program/procedural/c/mbed"
if test ! -d "$MBED_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MBED_USER_DIR is not present,
    so we need not find $PTII/ptolemy/cg/adapter/generic/program/procedural/c/mbed" >&5
$as_echo "$MBED_USER_DIR is not present,
    so we need not find $PTII/ptolemy/cg/adapter/generic/program/procedural/c/mbed" >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arm-none-eabi-gcc" >&5
$as_echo_n "checking for arm-none-eabi-gcc... " >&6; }

# Check whether --with-gcc-arm was given.
if test "${with_gcc_arm+set}" = set; then :
  withval=$with_gcc_arm; PTGCC_ARM=$withval
else
  PTGCC_ARM=$PTII/vendors/mbed/gcc-arm/bin/arm-none-eabi-gcc
fi


    if test -f "$PTGCC_ARM"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTGCC_ARM" >&5
$as_echo "$PTGCC_ARM" >&6; }; fi
        # Set to mbed and used in
        # $PTII/ptolemy/cg/adapter/generic/program/procedural/c/makefile
        # if vendors/mbed/gcc-arm/bin/arm-none-eabi-gcc was found
	PTMBED_DIR=mbed
    fi

    if test "$PTMBED_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTII/vendors/mbed/gcc-arm/bin/arm-none-eabi-gcc
    so the Mbed CG facility will not be run." >&5
$as_echo "$as_me: WARNING: Failed to find $PTII/vendors/mbed/gcc-arm/bin/arm-none-eabi-gcc
    so the Mbed CG facility will not be run." >&2;}
    fi
fi

if test -z "$PTMBED_DIR"; then
   updateExcludes "ptolemy/cg/adapter/generic/program/procedural/c/mbed"
fi

#--------------------------------------------------------------------
#       iText PDF is a "a library that allows you to generate PDF files on the fly."
#	http://itextpdf.com/
#	However, itextpdf is GPL'd, so we don't ship it.
#--------------------------------------------------------------------

# Set to itextpdf and used in
# $PTII/ptolemy/vergil/basic/export/makefile if iText.jar was found
PTITEXTPDF_DIR=

# iText PDF jar file.  iText is from
# http://itextpdf.com
PTITEXTPDF_JAR=

# We only need to look for iText.jar if $ITEXTPDF_USER_DIR exists
ITEXTPDF_USER_DIR="$PTII/ptolemy/vergil/basic/export/itextpdf"
if test ! -d "$ITEXTPDF_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ITEXT_USER_DIR is not present,
    so we need not find the iText PDF interface." >&5
$as_echo "$ITEXT_USER_DIR is not present,
    so we need not find the iText PDF interface." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the iText PDF jar" >&5
$as_echo_n "checking for the iText PDF jar... " >&6; }

# Check whether --with-itextpdf was given.
if test "${with_itextpdf+set}" = set; then :
  withval=$with_itextpdf; PTITEXTPDF_JAR=$withval
else
  PTITEXTPDF_JAR=$PTII/vendors/misc/itext/iText.jar
fi


    if test -f "$PTITEXTPDF_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTITEXTPDF_JAR" >&5
$as_echo "$PTITEXTPDF_JAR" >&6; }; fi
	# Set to itextpdf and used in
	# $PTII/ptolemy/vergil/basic/export/makefile if iText.jar is found
	PTITEXTPDF_DIR=itextpdf
        # PTITEXTPDF_PACKAGES is used in ptII/doc/makefile
	PTITEXTPDF_PACKAGES=ptolemy.vergil.basic.export.itextpdf
    fi

    if test "$PTITEXTPDF_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find iText.jar
    as $PTITEXTPDF_JAR.
    Perhaps the iText is not installed?
    You need not download the iText interface unless you
    would like to export PDF from Vergil.
    Note that the iText jar file has the Affero General Public License (AGPL),
    which is an extension of the GNU Public License.
    To use the iText interface, download iText from http://itextpdf.com
    place iText.jar in $PTII/vendors/misc/itext/ and then rerun configure." >&5
$as_echo "$as_me: WARNING: Failed to find iText.jar
    as $PTITEXTPDF_JAR.
    Perhaps the iText is not installed?
    You need not download the iText interface unless you
    would like to export PDF from Vergil.
    Note that the iText jar file has the Affero General Public License (AGPL),
    which is an extension of the GNU Public License.
    To use the iText interface, download iText from http://itextpdf.com
    place iText.jar in $PTII/vendors/misc/itext/ and then rerun configure." >&2;}
	# Note that we don't substitute in the ${PTII} here
	PTITEXTPDF_JAR='${PTII}/vendors/misc/itext/iText.jar'
    fi
fi

if test -z "$PTITEXTPDF_DIR"; then
   updateExcludes "ptolemy/vergil/basic/export/itextpdf/"
else
   updateClasspath "$PTITEXTPDF_JAR"
fi

#--------------------------------------------------------------------
#       g4ltl "G4LTL is a standalone tool and a Java library for
#       automatically generating controllers realizing linear temporal
#       logic (LTL).
#	http://www6.in.tum.de/~chengch/g4ltl
#--------------------------------------------------------------------
# PTG4LTL_DIR is set to g4ltl if the g4ltl jar file was found
# $PTII/ptolemy/vergil/actor/makefile uses PTG4LTL_DIR
PTG4LTL_DIR=

# PTG4LTL_PACKAGES is used in doc/makefile
PTG4LTL_PACKAGES=

# The location of the g4ltl jar file, typically $PTII/lib/g4ltl.jar
PTG4LTL_JAR=

# PTSTRUCTURALCODER_JAR is set if $PTII/lib/StructuralCoder.jar was found
# and used in ptolemy/vergil/actor/g4ltl/makefile
PTSTRUCTURALCODER_JAR=

# We only need look for g4ltl if $PTII/ptolemy/vergil/basic/imprt/g4ltl exists
G4LTL_USER_DIR="$PTII/ptolemy/vergil/basic/imprt/g4ltl"
if test ! -d "$G4LTL_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $G4LTL_USER_DIR is not present, so we need not find G4LTL." >&5
$as_echo "$G4LTL_USER_DIR is not present, so we need not find G4LTL." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking G4LTL" >&5
$as_echo_n "checking G4LTL... " >&6; }
    if test -f "$PTII/lib/g4ltl.jar" -a -f "$PTII/lib/StructuralCoder.jar"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/lib/g4ltl.jar" >&5
$as_echo "$PTII/lib/g4ltl.jar" >&6; }; fi
	PTG4LTL_JAR="$PTII/lib/g4ltl.jar"
        updateClasspath "$PTG4LTL_JAR"

	PTG4LTL_DIR=g4ltl
	PTG4LTL_PACKAGES="ptolemy.vergil.basic.imprt.g4ltl"

        PTSTRUCTURALCODER_JAR="$PTII/lib/StructuralCoder.jar"
        updateClasspath "$PTSTRUCTURALCODER_JAR"

    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTII/lib/g4ltl.jar or $PTII/lib/StructuralCoder.jar,
	which means that importing an FSMActor using LTL synthesis (G4LTL) will not be supported." >&5
$as_echo "$as_me: WARNING: Failed to find $PTII/lib/g4ltl.jar or $PTII/lib/StructuralCoder.jar,
	which means that importing an FSMActor using LTL synthesis (G4LTL) will not be supported." >&2;};
        updateExcludes "ptolemy/vergil/actor/g4ltl/"
    fi
fi

#--------------------------------------------------------------------
#       GMP - GNU arbitrary precision arithmetic library, needed only by mescal
#
#--------------------------------------------------------------------
# We only need to look for GMP if mescal/relsat is present
MESCAL_RELSAT_USER_DIR="$PTII/mescal/relsat"

PTGMP=no
if test ! -d "$MESCAL_RELSAT_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MESCAL_RELSAT_USER_DIR is not present,
    so we need not find GMP." >&5
$as_echo "$MESCAL_RELSAT_USER_DIR is not present,
    so we need not find GMP." >&6; }; fi
else
    case "`uname -s`" in
	Linux) ARCH=linux;;
        *) ARCH=unknown;;
    esac

    if test "$PTGMP" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP in \$PTII/mescal/include/gmp.h" >&5
$as_echo_n "checking for GMP in \$PTII/mescal/include/gmp.h... " >&6; }
	if test -f "$PTII/mescal/include/gmp.h"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
	    PTGMP_INCLUDE="-I$PTII/mescal/include"
	    PTGMP_LIB="-L$PTII/mescal/lib"
	    PTGMP_LD_FLAGS="-Wl,-R$PTII/mescal/lib"
	    PTGMP=yes
        else
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, keep looking" >&5
$as_echo "not found, keep looking" >&6; }; fi
	fi
    fi

    if test "$PTGMP" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP in /usr/local/include/gmp.h" >&5
$as_echo_n "checking for GMP in /usr/local/include/gmp.h... " >&6; }
        if test -f "/usr/local/include/gmp.h"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
	    if test "$ARCH" != "linux"; then
	        PTGMP_INCLUDE=-I/usr/local/include
		PTGMP_LIB=-L/usr/local/lib
	        PTGMP_LD_FLAGS="-Wl,-R/usr/local/lib"
            fi
	    PTGMP=yes
        else
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, keep looking" >&5
$as_echo "not found, keep looking" >&6; }; fi
        fi
    fi

    if test "$PTGMP" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP" >&5
$as_echo_n "checking for GMP... " >&6; }
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if ${ac_cv_prog_CPP+:} false; then :
  $as_echo_n "(cached) " >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

else
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :

else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if ${ac_cv_path_GREP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -z "$GREP"; then
  ac_path_GREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in grep ggrep; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_echo 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_GREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_GREP"; then
    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_GREP=$GREP
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if ${ac_cv_path_EGREP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     if test -z "$EGREP"; then
  ac_path_EGREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in egrep; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
  # Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
  ac_count=0
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_echo 'EGREP' >> "conftest.nl"
    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP="$ac_path_EGREP"
      ac_path_EGREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_EGREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_EGREP"; then
    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_EGREP=$EGREP
fi

   fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_stdc=yes
else
  ac_cv_header_stdc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "memchr" >/dev/null 2>&1; then :

else
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "free" >/dev/null 2>&1; then :

else
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  if test "$cross_compiling" = yes; then :
  :
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
		   (('a' <= (c) && (c) <= 'i') \
		     || ('j' <= (c) && (c) <= 'r') \
		     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
	|| toupper (i) != TOUPPER (i))
      return 2;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

else
  ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then

$as_echo "#define STDC_HEADERS 1" >>confdefs.h

fi

# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
		  inttypes.h stdint.h unistd.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


for ac_header in gmp.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
if test "x$ac_cv_header_gmp_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GMP_H 1
_ACEOF
 PTGMP=yes
else
  PTGMP=no
fi

done

    fi

    if test "$PTGMP" = "yes"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5
$as_echo_n "checking for gcc... " >&6; }
        # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCC="$PTCC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCC=$ac_cv_path_PTCC
if test -n "$PTCC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCC" >&5
$as_echo "$PTCC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "${PTCC:-none}" = "none"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc" >&5
$as_echo "$as_me: WARNING: Failed to find gcc" >&2;}
	    # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCC="$PTCC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCC=$ac_cv_path_PTCC
if test -n "$PTCC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCC" >&5
$as_echo "$PTCC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	    if test "${PTCC:-none}" = "none"; then
	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc or cc, so we will
    not be able to compile the mescal output" >&5
$as_echo "$as_me: WARNING: Failed to find gcc or cc, so we will
    not be able to compile the mescal output" >&2;};
            fi
	fi

	PTGMP_OK=no
	startdir=$PTII
	# Make sure that we check for CXX before cding in to config
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
$as_echo "$CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
$as_echo "$ac_ct_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
if ${ac_cv_cxx_compiler_gnu+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
if ${ac_cv_prog_cxx_g+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_prog_cxx_g=yes
else
  CXXFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

else
  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
$as_echo "$ac_cv_prog_cxx_g" >&6; }
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

        cd "$srcdir/config"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking gmp by compiling a C small program" >&5
$as_echo_n "checking gmp by compiling a C small program... " >&6; }
	if "$PTCC" gmpTest.c $PTGMP_INCLUDE -o gmpTest $PTGMP_LD_FLAGS $PTGMP_LIB -lgmp ; then
	    ./gmpTest
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
	else
	    RESULTS=`"$PTCC" gmpTest.c $PTGMP_INCLUDE -o gmpTest $PTGMP_LD_FLAGS$PTGMP_LIB -lgmp`
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to compile config/gmpTest.c,
    \"$PTCC\" gmpTest.c $PTGMP_INCLUDE -o gmpTest $PTGMP_LIB -lgmp
    $RESULTS" >&5
$as_echo "$as_me: WARNING: Failed to compile config/gmpTest.c,
    \"$PTCC\" gmpTest.c $PTGMP_INCLUDE -o gmpTest $PTGMP_LIB -lgmp
    $RESULTS" >&2;}
	fi

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking gmp by compiling a C++ small program" >&5
$as_echo_n "checking gmp by compiling a C++ small program... " >&6; }
	if "$CXX" gmpTest2.cc $PTGMP_INCLUDE -o gmpTest2 $PTGMP_LD_FLAGS $PTGMP_LIB -lgmpxx -lgmp ; then
	    ./gmpTest2
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
	else
	    RESULTS=`"$CXX" gmpTest2.cc $PTGMP_INCLUDE -o gmpTest2 $PTGMP_LD_FLAGS $PTGMP_LIB -lgmpcxx -lgmp`
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to compile config/gmpTest2.cc,
    \"$CXX\" gmpTest2.cc $PTGMP_INCLUDE -o gmpTest2 $PTGMP_LD_FLAG $PTGMP_LIB -lgmpxx -lgmp
    $RESULTS
    Under Cygwin, perhaps you need to add $PTII/bin/mescal to your PATH,
    Under Linux, perhaps you need to add $PTII/bin/mescal to
    your LD_LIBRARY_PATH" >&5
$as_echo "$as_me: WARNING: Failed to compile config/gmpTest2.cc,
    \"$CXX\" gmpTest2.cc $PTGMP_INCLUDE -o gmpTest2 $PTGMP_LD_FLAG $PTGMP_LIB -lgmpxx -lgmp
    $RESULTS
    Under Cygwin, perhaps you need to add $PTII/bin/mescal to your PATH,
    Under Linux, perhaps you need to add $PTII/bin/mescal to
    your LD_LIBRARY_PATH" >&2;}
	fi

        cd "$startdir"
    fi

    if test "$PTGMP" = "no"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gmp.h, which is only
    needed to compile $MESCAL_RELSAT_USER_DIR
    gmp can be found at http://www.swox.com/gmp/
    Mescal uses c++, and configure will look in /usr/local
    and $PTII/mescal/include and $PTII/mescal/lib for gmp,
    so gmp should be configured with
       ./configure --enable-cxx --prefix=$PTII/mescal" >&5
$as_echo "$as_me: WARNING: Failed to find gmp.h, which is only
    needed to compile $MESCAL_RELSAT_USER_DIR
    gmp can be found at http://www.swox.com/gmp/
    Mescal uses c++, and configure will look in /usr/local
    and $PTII/mescal/include and $PTII/mescal/lib for gmp,
    so gmp should be configured with
       ./configure --enable-cxx --prefix=$PTII/mescal" >&2;}
    fi
fi

#--------------------------------------------------------------------
#       $PTII/ptolemy/homer is a gui builder used by HandSimDroid
#	to allow complex models to be run on handheld devices
#	http://chess.eecs.berkeley.edu/handsimdroid
#
#--------------------------------------------------------------------

# PTHOMER_DIR is set to homer and used in
# $PTII/ptolemy/makefile if the netbeans visual gui code is found
PTHOMER_DIR=

# Jar files necessary for compilation of homer
PTHOMER_JARS=

# We only need to look for Hessian if $HOMER_USER_DIR is present
HOMER_USER_DIR="$PTII/ptolemy/homer"
if test ! -d "$HOMER_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOMER_USER_DIR is not present,
    so we need not find the Netbeans visual gui interface." >&5
$as_echo "$HOMER_USER_DIR is not present,
    so we need not find the Netbeans visual gui interface." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for org-openide-util.jar, used by homer " >&5
$as_echo_n "checking for org-openide-util.jar, used by homer ... " >&6; }

# Check whether --with-openideutil was given.
if test "${with_openideutil+set}" = set; then :
  withval=$with_openideutil; PTOPENIDEUTIL_JAR=$withval
else
  PTOPENIDEUTIL_JAR=$PTII/lib/org-openide-util.jar
fi


    if test  -f "$PTOPENIDEUTIL_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTOPENIDEUTIL_JAR" >&5
$as_echo "$PTOPENIDEUTIL_JAR" >&6; }; fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for org-openide-util-lookup.jar, used by homer " >&5
$as_echo_n "checking for org-openide-util-lookup.jar, used by homer ... " >&6; }

# Check whether --with-openideutillookup was given.
if test "${with_openideutillookup+set}" = set; then :
  withval=$with_openideutillookup; PTOPENIDEUTILLOOKUP_JAR=$withval
else
  PTOPENIDEUTILLOOKUP_JAR=$PTII/lib/org-openide-util-lookup.jar
fi

        if test  -f "$PTOPENIDEUTILLOOKUP_JAR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTOPENIDEUTILLOOKUP_JAR" >&5
$as_echo "$PTOPENIDEUTILLOOKUP_JAR" >&6; }; fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for org-netbeans-api-visual.jar, used by homer " >&5
$as_echo_n "checking for org-netbeans-api-visual.jar, used by homer ... " >&6; }

# Check whether --with-netbeansapivisual was given.
if test "${with_netbeansapivisual+set}" = set; then :
  withval=$with_netbeansapivisual; PTNETBEANSAPIVISUAL_JAR=$withval
else
  PTNETBEANSAPIVISUAL_JAR=$PTII/lib/org-netbeans-api-visual.jar
fi

            if test  -f "$PTNETBEANSAPIVISUAL_JAR"; then
	        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTNETBEANSAPIVISUAL_JAR" >&5
$as_echo "$PTNETBEANSAPIVISUAL_JAR" >&6; }; fi

	        # Set to homer and used in $PTII/ptolemy/makefile
	        PTHOMER_DIR=homer
                # PTHOMER_PACKAGES is used in ptII/doc/makefile
		PTHOMER_PACKAGES="ptolemy.homer.events ptolemy.homer.gui ptolemy.homer ptolemy.homer.kernel ptolemy.homer.widgets"
            fi
        fi
    fi

    if test "$PTHOMER_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the jar files necessary to compile injection.
    The injection code interface is used to support Ptolemy running on the Android.
    For further instructions, see $PTII/ptolemy/actor/injection/package.html " >&5
$as_echo "$as_me: WARNING: Failed to find the jar files necessary to compile injection.
    The injection code interface is used to support Ptolemy running on the Android.
    For further instructions, see $PTII/ptolemy/actor/injection/package.html " >&2;}
    else
        PTHOMER_JARS="${PTOPENIDEUTIL_JAR}${CLASSPATHSEPARATOR}${PTOPENIDEUTILLOOKUP_JAR}${CLASSPATHSEPARATOR}${PTNETBEANSAPIVISUAL_JAR}"
    fi
fi

if test -z "$PTHOMER_JARS"; then
   updateExcludes "ptolemy/homer/"
else
   updateClasspath "$PTOPENIDEUTIL_JAR"
   updateClasspath "$PTOPENIDEUTILLOOKUP_JAR"
   updateClasspath "$PTNETBEANSAPIVISUAL_JAR"
fi



#--------------------------------------------------------------------
#       JAI is the Java Advanced Imaging Framework
#	For more information,
#       see https://jai.dev.java.net/
#       See if there was a command-line option for where JAI is.
#--------------------------------------------------------------------

# PTJAI_DIR is set to jai and used in
# $PTII/ptolemy/actor/makefile if jai was found
PTJAI_DIR=

# Used in ptolemy/actor/lib/jai/makefile
JAI_JARS=

# We only need to look for JAI if the actor/lib/jai directory is present
JAI_USER_DIR="$PTII/ptolemy/actor/lib/jai"

if test ! -d "$JAI_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAI_USER_DIR is not present,
    so we need not find JAI - The Java Advanced Imaging API." >&5
$as_echo "$JAI_USER_DIR is not present,
    so we need not find JAI - The Java Advanced Imaging API." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java Advanced Imaging (JAI) API" >&5
$as_echo_n "checking for Java Advanced Imaging (JAI) API... " >&6; }
    # We need to run javac in the config directory so that javac from jdk1.1.6
    # under NT and cygwin works properly
    startdir=$PTII
    cd "$srcdir/config"
    # Don't use 'env $JAVAC . . .' here, it will not work under Cygwin
    if "$JAVAC" JAITest.java ; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: JAI found in the default classpath" >&5
$as_echo "JAI found in the default classpath" >&6; }; fi
        PTJAI_OK=1
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JAI not found in the default classpath" >&5
$as_echo "$as_me: WARNING: JAI not found in the default classpath" >&2;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAI in $PTII/vendors" >&5
$as_echo_n "checking for JAI in $PTII/vendors... " >&6; }
        TMP_JAI_DIR="`find $PTII/vendors -type d -name "jai*" | sort -nr | grep -v imageio | head -1`"
        if test -f "$TMP_JAI_DIR/lib/jai_core.jar"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found jai* directory $TMP_JAI_DIR" >&5
$as_echo "Found jai* directory $TMP_JAI_DIR" >&6; }; fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAI using jars in $TMP_JAI_DIR/lib" >&5
$as_echo_n "checking for JAI using jars in $TMP_JAI_DIR/lib... " >&6; }
            if "$JAVAC" -classpath "$TMP_JAI_DIR/lib/*" JAITest.java ; then
                if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: JAI found in $TMP_JAI_DIR" >&5
$as_echo "JAI found in $TMP_JAI_DIR" >&6; }; fi
                PTJAI_OK=1
                JAI_DIR="$TMP_JAI_DIR"
            else
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JAI not found in $TMP_JAI_DIR" >&5
$as_echo "$as_me: WARNING: JAI not found in $TMP_JAI_DIR" >&2;}
            fi
        fi
    fi

    if ! test -z "$PTJAI_OK" ; then
        PTJAI_DIR=jai
        # PTJAI_PACKAGES is used in ptII/doc/makefile
        PTJAI_PACKAGES=ptolemy.actor.lib.jai


        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the JAI jar files, possibly again" >&5
$as_echo_n "checking for the JAI jar files, possibly again... " >&6; }
        if "$JAVAC" FindClass.java ; then
            # Usually jai-core.jar will be in the CLASSPATH
            JAI_JAR=`"$JAVA" -classpath "$PTII/config${CLASSPATHSEPARATOR}${JAI_DIR}/lib/*" FindClass javax.media.jai.RenderedOp`
            if test -f "$JAI_JAR" ; then
                JAI_JARS_DIR=`dirname "$JAI_JAR"`
                jars=`ls $JAI_JARS_DIR/*.jar`
                for jar in $jars
                do
                    JAI_JARS="$jar${CLASSPATHSEPARATOR}${JAI_JARS}"
                    updateClasspath "$jar"
                done
                if test -z "$JAI_JARS"; then
                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found $JAI_JARS_DIR, but no jars were found in lib/?" >&5
$as_echo "$as_me: WARNING: Found $JAI_JARS_DIR, but no jars were found in lib/?" >&2;}
                else
                    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAI_JARS" >&5
$as_echo "$JAI_JARS" >&6; }; fi
                fi
            else
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Either we could not find
    javax.media.jai.RenderOp or else it was already in the JRE.
    Searching for jai-core.jar returned:
      $JAI_JAR
    If the class cannot be found, then Eclipse might not be able to find
    the JAI files.
    This is only a problem if you are using Eclipse.
    If the class was in the JRE, then Eclipse should compile the JAI files
    without problems" >&5
$as_echo "$as_me: WARNING: Either we could not find
    javax.media.jai.RenderOp or else it was already in the JRE.
    Searching for jai-core.jar returned:
      $JAI_JAR
    If the class cannot be found, then Eclipse might not be able to find
    the JAI files.
    This is only a problem if you are using Eclipse.
    If the class was in the JRE, then Eclipse should compile the JAI files
    without problems" >&2;}
                JAI_JAR=
            fi

        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVAC\" -classpath \"$PTII/config${CLASSPATHSEPARATOR}${JAI_DIR}/lib\" FindClass javax.media.jai.RenderedOp\`
    failed.
    This means that Eclipse might not be able to find the JAI files.
    This is only a problem if you are using Eclipse" >&5
$as_echo "$as_me: WARNING: '\"$JAVAC\" -classpath \"$PTII/config${CLASSPATHSEPARATOR}${JAI_DIR}/lib\" FindClass javax.media.jai.RenderedOp\`
    failed.
    This means that Eclipse might not be able to find the JAI files.
    This is only a problem if you are using Eclipse" >&2;}
        fi

    else
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVAC\" JAITest.java' failed and JAI jars were not found
    in $PTII/vendors
    perhaps the Java Advanced Imaging API is not installed?

    Note that JAI does not work in Java 9 and later because Java 9 removed
    internal classes used by JAI.
    See https://wiki.eecs.berkeley.edu/ptexternal/Main/JAI

    You need not download Jai unless you plan on using the video
    actors in $JAI_USER_DIR
    The JAI API can be downloaded from
    http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-client-419417.html" >&5
$as_echo "$as_me: WARNING: '\"$JAVAC\" JAITest.java' failed and JAI jars were not found
    in $PTII/vendors
    perhaps the Java Advanced Imaging API is not installed?

    Note that JAI does not work in Java 9 and later because Java 9 removed
    internal classes used by JAI.
    See https://wiki.eecs.berkeley.edu/ptexternal/Main/JAI

    You need not download Jai unless you plan on using the video
    actors in $JAI_USER_DIR
    The JAI API can be downloaded from
    http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-client-419417.html" >&2;}
    fi

    cd "$startdir"
fi

if test -z "$PTJAI_DIR"; then
   updateExcludes "ptolemy/actor/lib/jai/"
   updateExcludeTests "**/ptolemy/actor/lib/jai/*"
   updateExcludeTests "**/ptolemy/actor/lib/jai/test/junit/JUnitTclTest.*"
fi

#--------------------------------------------------------------------
#       "CERTI is an Open Source HLA RTI. HLA (High-Level Architecture) is a general purpose architecture for distributed computer simulation systems."
#	See https://savannah.nongnu.org/projects/certi
#       JCerti is used by org/hlacerti
#--------------------------------------------------------------------

# JCERTI jar files used by org/hlacerti
PTJCERTI_JAR=

# We only need to look for JCERTetty if $HLACERT_USER_DIR is present
HLACERTI_USER_DIR="$PTII/org/hlacerti"

if test ! -d "$HLACERTI_USER_DIR" ; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLACERTI_USER_DIR is not present,
    so we need not find jcerti.jar." >&5
$as_echo "$HLACERTI_USER_DIR is not present,
    so we need not find jcerti.jar." >&6; }; fi
else
    if test "$PRE_JDK18" = "yes" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: org/hlacerti requires Java 1.8 or later" >&5
$as_echo "$as_me: WARNING: org/hlacerti requires Java 1.8 or later" >&2;}
        updateExcludes "org/hlacerti/"
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Jcerti, used by hlacerti " >&5
$as_echo_n "checking for Jcerti, used by hlacerti ... " >&6; }

# Check whether --with-jcerti was given.
if test "${with_jcerti+set}" = set; then :
  withval=$with_jcerti; PTJCERTI_JAR=$withval
else
  PTJCERTI_JAR=$PTII/lib/jcerti.jar
fi

        if test  -f "$PTJCERTI_JAR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJCERTI_JAR" >&5
$as_echo "$PTJCERTI_JAR" >&6; }; fi
	    # Set to mail and used in
	    # $PTII/ptolemy/apps/makefile if jcerti.jar was found.
	    PTHLACERTI_DIR=hlacerti
            # PTHLACERTI_PACKAGES is used in ptII/doc/makefile
	    PTHLACERTI_PACKAGES="org.hlacerti.lib"
	    updateClasspath "$PTJCERTI_JAR"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find jcerti.jar necessary to compile org/hlacerti
    hlacerti is optional" >&5
$as_echo "$as_me: WARNING: Failed to find jcerti.jar necessary to compile org/hlacerti
    hlacerti is optional" >&2;}
           updateExcludes "org/hlacerti/"
        fi
    fi
fi

#--------------------------------------------------------------------
#       JavaMail is a Java interface that sends email
#	https://java.net/projects/javamail/pages/Home
#--------------------------------------------------------------------

# PTJAVAMAIL_DIR is set to mail
# $PTII/ptolemy/domains/makefile if JavaMail was found
PTJAVAMAIL_DIR=

# JavaMail Directory.  JavaMail is available from
# https://java.net/projects/javamail/pages/Home
JAVAMAIL_DIR='${PTII}/lib'

# JavaMail jar files.   Used to compile the mail actors.
PTJAVAMAIL_JARS=

JAVAMAIL_USER_DIR="$PTII/ptolemy/actor/lib/mail"
# We only need to look for JavaMail if $JAVAMAIL_USER_DIR
if test ! -d "$JAVAMAIL_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAMAIL_USER_DIR is not present,
    so we need not find the JavaMail interface." >&5
$as_echo "$JAVAMAIL_USER_DIR is not present,
    so we need not find the JavaMail interface." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JavaMail directory" >&5
$as_echo_n "checking for JavaMail directory... " >&6; }

# Check whether --with-javamail was given.
if test "${with_javamail+set}" = set; then :
  withval=$with_javamail; JAVAMAIL_DIR=$withval
else
  JAVAMAIL_DIR=$PTII/lib
fi


    if test -f "$JAVAMAIL_DIR/javax.mail.jar"; then
	# Set to mail and used in
	# $PTII/ptolemy/actor/lib/makefile if javax.mail.jar was found.
	PTJAVAMAIL_DIR=mail
        # PTJAVAMAIL_PACKAGES is used in ptII/doc/makefile
	PTJAVAMAIL_PACKAGES="ptolemy.actor.lib.mail"

	PTJAVAMAIL_JARS="${JAVAMAIL_DIR}/javax.mail.jar"
        updateClasspath "$JAVAMAIL_DIR/javax.mail.jar"
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAMAIL_DIR" >&5
$as_echo "$JAVAMAIL_DIR" >&6; }; fi
    fi

    if test "$PTJAVAMAIL_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find javax.mail.jar
    in $JAVAMAIL_DIR
    perhaps the JavaMail interface is not installed?
    You need not download the JavaMail interface unless you
    plan on using the Ptolemy actors that send email.
    The JavaMail interface can be downloaded from
    https://java.net/projects/javamail/pages/Home with
      cd $PTII/lib
      wget --no-check-certificate http://java.net/projects/javamail/downloads/download/javax.mail.jar
      cd $PTII
      ./configure" >&5
$as_echo "$as_me: WARNING: Failed to find javax.mail.jar
    in $JAVAMAIL_DIR
    perhaps the JavaMail interface is not installed?
    You need not download the JavaMail interface unless you
    plan on using the Ptolemy actors that send email.
    The JavaMail interface can be downloaded from
    https://java.net/projects/javamail/pages/Home with
      cd $PTII/lib
      wget --no-check-certificate http://java.net/projects/javamail/downloads/download/javax.mail.jar
      cd $PTII
      ./configure" >&2;}
	# Note that we don't substitute in the ${PTII} here
	JAVAMAIL_DIR='${PTII}/lib'
    fi
fi

if test -z "$PTJAVAMAIL_DIR"; then
   updateExcludes "ptolemy/actor/lib/mail/"
fi

#--------------------------------------------------------------------
#       Ptolemy includes one or more FMUs that use JModelica
#
#--------------------------------------------------------------------

# PTJMODELICA_DIR is set to jmodelica if JModelica was found
# $PTII/ptolemy/actor/lib/fmi/fmus/makefile uses PTJMODELICA_DIR
PTJMODELICA_DIR=

# Directory that contains JModelica.
JMODELICA_HOME=

# PTJMODELICA_PACKAGES is used in doc/makefile
PTJMODELICA_PACKAGES=

# We only beed look for JModelica if $PTII/ptolemy/actor/lib/fmi exists
JMODELICA_USER_DIR="$PTII/ptolemy/actor/lib/fmi/fmus/jmodelica"
if test ! -d "$JMODELICA_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JMODELICA_USER_DIR is not present,
    so we need not find JModelica." >&5
$as_echo "$JMODELICA_USER_DIR is not present,
    so we need not find JModelica." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JModelica" >&5
$as_echo_n "checking for JModelica... " >&6; }
    if test -f "/usr/local/jmodelica/include/jmi.h"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/local/jmodelica/include/jmi.h" >&5
$as_echo "/usr/local/jmodelica/include/jmi.h" >&6; }; fi
	JMODELICA_HOME="/usr/local/jmodelica"
	PTJMODELICA_DIR=jmodelica
	PTJMODELICA_PACKAGES=""
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find /usr/local/jmodelica/include/jmi.h
    which is part of JModelica.
    Ptolemy optionally includes one or more FMUs that use JModelica.
    To install JModelica, see https://svn.jmodelica.org/trunk/INSTALL" >&5
$as_echo "$as_me: WARNING: Failed to find /usr/local/jmodelica/include/jmi.h
    which is part of JModelica.
    Ptolemy optionally includes one or more FMUs that use JModelica.
    To install JModelica, see https://svn.jmodelica.org/trunk/INSTALL" >&2;}
    fi
fi

#--------------------------------------------------------------------
#       JavaFX is used the the audio ClipPlayer demo under CapeCode
#
#--------------------------------------------------------------------

# PTJAVAFX_DIR is used in ptolemy/actor/lib/jjs/modules
PTJAVAFX_DIR=

# PTJAVAFX_PACKAGES is used in ptII/doc/makefile
PTJAVAFX_PACKAGES=

# We only need look for JavaFX if this directory exists
JAVAFX_USER_DIR="$PTII/ptolemy/actor/lib/jjs/modules/audio"
if test ! -d "$JAVAFX_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAFX_USER_DIR is not present,
    so we need not check for JavaFX." >&5
$as_echo "$JAVAFX_USER_DIR is not present,
    so we need not check for JavaFX." >&6; }; fi
else

    # We need to run javac in the config directory so that javac
    # from jdk1.1.6 under NT and cygwin works properly
    startdir=$PTII
    cd "$srcdir/config"

    TMP_JAVAFX_DIR="`ls -d $PTII/vendors/javafx/* | head -1`"

    echo "TMP_JAVAFX_DIR=$TMP_JAVAFX_DIR"
    echo "$PTII/vendors/javafx: `ls -l $PTII/vendors/javafx`"

    if  test -z "$TMP_JAVAFX_DIR" ; then
       TMP_JAVAFX_DIR=$PTII/vendors/javafx
    fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JavaFX" >&5
$as_echo_n "checking for JavaFX... " >&6; }

# Check whether --with-javafx-jar was given.
if test "${with_javafx_jar+set}" = set; then :
  withval=$with_javafx_jar; JAVAFX_DIR=$TMP_JAVAFX_DIR
fi


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for JavaFX in the default classpath" >&5
$as_echo_n "checking checking for JavaFX in the default classpath... " >&6; }
    # Don't use 'env $JAVAC . . .' here, it will not work under Cygwin
    if "$JAVAC" JavaFXTest.java ; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: JavaFX found in the default classpath" >&5
$as_echo "JavaFX found in the default classpath" >&6; }; fi
       # PTJAVAFX_DIR is used in ptolemy/actor/lib/jjs/modules
       PTJAVAFX_DIR=audio
       # PTJAVAFX_PACKAGES is used in ptII/doc/makefile
       PTJAVAFX_PACKAGES=ptolemy.actor.lib.jjs.modules
    fi

    if test "$MODULE_SYSTEM" = "yes" -a -z "$PTJAVAFX_DIR" -a -d "$TMP_JAVAFX_DIR/lib"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JavaFX not yet found" >&5
$as_echo "$as_me: WARNING: JavaFX not yet found" >&2;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for JavaFX in a module" >&5
$as_echo_n "checking checking for JavaFX in a module... " >&6; }
        # Don't use 'env $JAVAC . . .' here, it will not work under Cygwin

        JAVAFX_ADD_MODULES="javafx.controls,javafx.swing,javafx.media"
        JAVAFX_MODULE_PATH="$TMP_JAVAFX_DIR/lib"

        if "$JAVAC" --module-path $JAVAFX_MODULE_PATH --add-modules $JAVAFX_ADD_MODULES JavaFXTest.java ; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAFX_MODULE_PATH" >&5
$as_echo "$JAVAFX_MODULE_PATH" >&6; }; fi
            # PTJAVAFX_DIR is used in ptolemy/actor/lib/jjs/modules
            PTJAVAFX_DIR=audio
            # PTJAVAFX_PACKAGES is used in ptII/doc/makefile
            PTJAVAFX_PACKAGES=ptolemy.actor.lib.jjs.modules

            if test -z "$PTADD_MODULES"; then
                PTADD_MODULES="$JAVAFX_ADD_MODULES,$PTADD_MODULES"
            else
                PTADD_MODULES="$JAVAFX_ADD_MODULES"
            fi

            if test -z "$PTMODULE_PATH"; then
                PTMODULE_PATH="$JAVAFX_MODULE_PATH$CLASSPATHSEPARATOR$PTMODULE_PATH"
            else
                PTMODULE_PATH="$JAVAFX_MODULE_PATH"
            fi

        fi
    fi


    if test -z "$PTJAVAFX_DIR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find JavaFX.

    Perhaps you are running an OpenJDK JDK instead of an Oracle JDK?
    Or, perhaps you are using an Oracle JDK later than JDK 10 that
    no longer includes JavaFX.
    To download JavaFX, see https://openjfx.io/

    The ./configure script searches for $JAVAFX_DIRS
    so please install OpenFX at one of those locations or use
    --with-javafx-jar=JARFILE

    If OpenFX is not present, then the audio accessors will not work under CapeCode.
    " >&5
$as_echo "$as_me: WARNING: Failed to find JavaFX.

    Perhaps you are running an OpenJDK JDK instead of an Oracle JDK?
    Or, perhaps you are using an Oracle JDK later than JDK 10 that
    no longer includes JavaFX.
    To download JavaFX, see https://openjfx.io/

    The ./configure script searches for $JAVAFX_DIRS
    so please install OpenFX at one of those locations or use
    --with-javafx-jar=JARFILE

    If OpenFX is not present, then the audio accessors will not work under CapeCode.
    " >&2;}
       updateExcludes "ptolemy/actor/lib/jjs/modules/audio/"
    fi

    cd "$startdir"

fi

#--------------------------------------------------------------------
#       JMF is the Java Media Framework
#	For more information,
#       see http://www.oracle.com/technetwork/java/javase/tech/index-jsp-140239.html
#       See if there was a command-line option for where JMF is.
#--------------------------------------------------------------------

# PTJMF_DIR is set to jmf and used in
# $PTII/ptolemy/actor/lib/makefile if jmf was found
PTJMF_DIR=

# Used in ptolemy/actor/lib/jmf/makefile
JMF_JARS=

# We only need to look for jmf if $PTII/ptolemy/actor/lib exists
JMF_USER_DIR="$PTII/ptolemy/actor/lib/jmf"
if test ! -d "$JMF_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JMF_USER_DIR is not present,
    so we need not find the JMF - The Java Media Framework." >&5
$as_echo "$JMF_USER_DIR is not present,
    so we need not find the JMF - The Java Media Framework." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java Media Framework (JMF) in the default classpath" >&5
$as_echo_n "checking for Java Media Framework (JMF) in the default classpath... " >&6; }
    # We need to run javac in the config directory so that javac
    # from jdk1.1.6 under NT and cygwin works properly
    startdir=$PTII
    cd "$srcdir/config"
    # Don't use 'env $JAVAC . . .' here, it will not work under Cygwin
    if "$JAVAC" JMFTest.java ; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: JMF found in the default classpath." >&5
$as_echo "JMF found in the default classpath." >&6; }; fi
        PTJMF_OK=1
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JMF not found in the default classpath, will check elsewhere next." >&5
$as_echo "$as_me: WARNING: JMF not found in the default classpath, will check elsewhere next." >&2;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JMF in $PTII/vendors/JMF*" >&5
$as_echo_n "checking for JMF in $PTII/vendors/JMF*... " >&6; }
        TMP_JMF_DIR=`find $PTII/vendors -type d \( -name "JMF*" -o -name "jmf*" \) -print  | head -1`
        if test -f "$TMP_JMF_DIR/lib/jmf.jar"; then
            if "$JAVAC" -classpath "$TMP_JMF_DIR/lib/jmf.jar" JMFTest.java ; then
               JMF_DIR="$TMP_JMF_DIR"
               if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: JMF found in $TMP_JMF_DIR" >&5
$as_echo "JMF found in $TMP_JMF_DIR" >&6; }; fi
               PTJMF_OK=1
               JMF_DIR="$TMP_JMF_DIR"
            fi
        fi
    fi

    if ! test -z "$PTJMF_OK"; then
        PTJMF_DIR=jmf
	# PTJMF_PACKAGES is used in ptII/doc/makefile
	PTJMF_PACKAGES=ptolemy.actor.lib.jmf
	# Usually, JMF gets installed in C:/Program Files/JMF2.1.1
	# and CLASSPATH gets that C:/Program Files/JMF2.1.1/lib/jmf.jar
	# and C:/Program Files/JMF2.1.1/lib/sound.jar appended to it
	# We need to figure out where it was found so that Eclipse
	# can find it
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the JMF directory" >&5
$as_echo_n "checking for the JMF directory... " >&6; }
	if "$JAVAC" FindClass.java ; then
	    # Usually jmf.jar will be in the CLASSPATH
	    JMF_JAR=`"$JAVA" -classpath "$PTII/config$CLASSPATHSEPARATOR$CLASSPATH${JMF_DIR}/lib/*" FindClass javax.media.CaptureDeviceInfo`
	    if test -f "$JMF_JAR" ; then
	       JMF_JARS_DIR=`dirname "$JMF_JAR"`
	       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JMF_JARS_DIR" >&5
$as_echo "$JMF_JARS_DIR" >&6; }; fi
	       # Here, we should not be adding JMF_JAR to Eclipse
	       # if jmf.jar was in the jre
	       updateClasspath "$JMF_JAR"
	       JMF_JARS="$JMF_JAR"
	       if test -f "$JMF_JARS_DIR/sound.jar" ; then
	       	    updateClasspath "$JMF_JARS_DIR/sound.jar"
                   JMF_JARS="$JMF_JARS$CLASSPATHSEPARATOR$JMF_JARS_DIR/sound.jar"
               fi
	    else
       	       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Either we could not find
    javax.media.CaptureDeviceInfo or else it was already in the JRE.
    Searching for jmf.jar returned:
      $JMF_JAR
    If the class cannot be found, then Eclipse might not be able to find
    the JMF files.
    This is only a problem if you are using Eclipse.
    If the class was in the JRE, then Eclipse should compile the JMF files
    without problems" >&5
$as_echo "$as_me: WARNING: Either we could not find
    javax.media.CaptureDeviceInfo or else it was already in the JRE.
    Searching for jmf.jar returned:
      $JMF_JAR
    If the class cannot be found, then Eclipse might not be able to find
    the JMF files.
    This is only a problem if you are using Eclipse.
    If the class was in the JRE, then Eclipse should compile the JMF files
    without problems" >&2;}
		JMF_JAR=
            fi
	else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVAC\" FindClass.java' failed.
    This means that Eclipse might not be able to find the JMF files.
    This is only a problem if you are using Eclipse" >&5
$as_echo "$as_me: WARNING: '\"$JAVAC\" FindClass.java' failed.
    This means that Eclipse might not be able to find the JMF files.
    This is only a problem if you are using Eclipse" >&2;}
        fi
    else
        case "`uname -s`" in
            Darwin) JMF_MESSAGE="
    Under Mac OS X, download the Cross-Platform Java version, unzip it,
    run:
        mkdir -p ~/Library/Java/Extensions/
        cp ~yourlogin/src/jmf/JMF-2.1.1e/lib/* ~/Library/Java/Extensions/
    and then rerun ./configure.";;
            *) JMF_MESSAGE="";;
        esac
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVAC\" JMFTest.java' failed.
    perhaps the Java Media Framework (JMF) is not installed?
    You need not download the JMF unless you plan on using the video
    actors in $JMF_USER_DIR
    The JMF SDK can be downloaded from
    http://www.oracle.com/technetwork/java/javase/download-142937.html $JMF_MESSAGE" >&5
$as_echo "$as_me: WARNING: '\"$JAVAC\" JMFTest.java' failed.
    perhaps the Java Media Framework (JMF) is not installed?
    You need not download the JMF unless you plan on using the video
    actors in $JMF_USER_DIR
    The JMF SDK can be downloaded from
    http://www.oracle.com/technetwork/java/javase/download-142937.html $JMF_MESSAGE" >&2;}
    fi
    cd "$startdir"
fi

if test -z "$PTJMF_DIR"; then
   updateExcludes "ptolemy/actor/lib/jmf/"
fi


#--------------------------------------------------------------------
#       The Java Native Access (JNA) facility is used to call native code without JNI
#	https://github.com/twall/jna
#
#--------------------------------------------------------------------

# PTFMI_DIR is set to fmi if jna.jar was found
# $PTII/ptolemy/actor/lib/makefile uses PTFMI_DIR
PTFMI_DIR=

# PTFMI_PACKAGES is used in doc/makefile
PTFMI_PACKAGES=

# The location of the jna.jar file, typically $PTII/lib/jna.jar
JNA_JAR=

# The jar file to default to.  FIXME: the ./configure --help message may be wrong.
JNA_DEFAULT_JAR=jna-4.0.0-variadic.jar
#JNA_DEFAULT_JAR=jna-4.1.0.jar
#JNA_DEFAULT_JAR=jna-4.1.0-variadic.jar

# We only need look for jmf if $PTII/ptolemy/actor/lib/fmi exists
JNA_USER_DIR_FMI="$PTII/ptolemy/actor/lib/fmi"

if test ! -d "$JNA_USER_DIR_FMI" ;  then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JNA_USER_DIR_FMI are not present,
    so we need not find the JNA - The Java Native Access utility." >&5
$as_echo "$JNA_USER_DIR_FMI are not present,
    so we need not find the JNA - The Java Native Access utility." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java Native Access (JNA) jar" >&5
$as_echo_n "checking for Java Native Access (JNA) jar... " >&6; }

# Check whether --with-jna-jar was given.
if test "${with_jna_jar+set}" = set; then :
  withval=$with_jna_jar; JNA_JAR=$withval
else
  JNA_JAR=$PTII/lib/$JNA_DEFAULT_JAR
fi

    if test -f "$JNA_JAR"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JNA_JAR" >&5
$as_echo "$JNA_JAR" >&6; }; fi
	if test -d "$PTII/ptolemy/actor/lib/fmi"; then
		PTFMI_DIR=fmi
		PTFMI_PACKAGES="ptolemy.actor.lib.fmi org.ptolemy.fmi org.ptolemy.fmi.driver org.ptolemy.fmi.type ptolemy.vergil.basic.imprt.fmu"
        fi
        updateClasspath "$JNA_JAR"
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTII/lib/jna-4.0.0-variadic.jar,
    JNA is the Java Native Access interfaced, used by the
    Functional Mock-up Inteface actors in
    ptolemy/actor/lib/fmi
    These actors are optional, but require JNA.
    For more information about JNA, see https://github.com/twall/jna" >&5
$as_echo "$as_me: WARNING: Failed to find $PTII/lib/jna-4.0.0-variadic.jar,
    JNA is the Java Native Access interfaced, used by the
    Functional Mock-up Inteface actors in
    ptolemy/actor/lib/fmi
    These actors are optional, but require JNA.
    For more information about JNA, see https://github.com/twall/jna" >&2;}
        updateExcludes "ptolemy/actor/lib/fmi/"
    fi
fi

#--------------------------------------------------------------------
#       The Joystick interface is a Java interface to Joysticks, see
#	http://sourceforge.net/projects/javajoystick/
#       See if there was a command-line option for where Joystick interface is
#       If not, look for $PTII/vendors/misc/joystick
#--------------------------------------------------------------------

# PTJOYSTICK_DIR is set to joystick and used in
# $PTII/ptolemy/actor/lib/makefile if Joystick.jar was found
PTJOYSTICK_DIR=

# Joystick Jar file
JOYSTICK_JAR='${PTII}/vendors/misc/joystick/Joystick.jar'

# We only need to look for joystick if $PTII/ptolemy/actor/lib/joystick exists
if test ! -d "$PTII/ptolemy/actor/lib/joystick"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/actor/lib/joystick is not present,
    so we need not find the Joystick interface." >&5
$as_echo "$PTII/ptolemy/actor/lib/joystick is not present,
    so we need not find the Joystick interface." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joystick jar file" >&5
$as_echo_n "checking for joystick jar file... " >&6; }

# Check whether --with-joystick-jar was given.
if test "${with_joystick_jar+set}" = set; then :
  withval=$with_joystick_jar; JOYSTICK_JAR=$withval
else
  JOYSTICK_JAR=$PTII/vendors/misc/joystick/Joystick.jar
fi


    if test -f "$JOYSTICK_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOYSTICK_JAR" >&5
$as_echo "$JOYSTICK_JAR" >&6; }; fi
	# Set to joystick and used in
	# $PTII/ptolemy/actor/lib/joystick if joystick was found
	PTJOYSTICK_DIR=joystick
        # PTJOYSTICK_PACKAGES is used in ptII/doc/makefile
	PTJOYSTICK_PACKAGES=ptolemy.actor.lib.joystick
    fi

    if test "$PTJOYSTICK_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $JOYSTICK_JAR
    perhaps the Joystick is not installed?
    You need not download the Joystick interface unless you
    plan on using a Joystick with Ptolemy II.
    The Joystick interface can be downloaded from
    http://sourceforge.net/projects/javajoystick/" >&5
$as_echo "$as_me: WARNING: Failed to find $JOYSTICK_JAR
    perhaps the Joystick is not installed?
    You need not download the Joystick interface unless you
    plan on using a Joystick with Ptolemy II.
    The Joystick interface can be downloaded from
    http://sourceforge.net/projects/javajoystick/" >&2;}
	# Note that we don't substitute in the ${PTII} here
	JOYSTICK_JAR='${PTII}/vendors/misc/joystick/Joystick.jar'
    fi
fi

if test -z "$PTJOYSTICK_DIR"; then
   updateExcludes "ptolemy/actor/lib/joystick/"
else
   updateClasspath "$JOYSTICK_JAR"
fi

#--------------------------------------------------------------------
#	See if there was a command-line option for where Jacl is
#       Jacl is a 100% Java implementation of a subset of Tcl.
#       We use Jacl for unit tests.
#--------------------------------------------------------------------

# We only need to find Jacl if $PTII/util/testsuite
# exists.  If we are shipping ptplot, then this directory might not
# exist
PTJACL_JAR=$PTII/lib/ptjacl.jar
# JTCLSH uses JAVAFLAGS for use with the
# vergil/test/VergilConfiguration.tcl test
# We set the ptolemy.ptII.dir property for use in the
# actor.lib.test.auto.FileWriter{1,2}.xml tests
# JTCLSHFLAGS gets set to -Dptolemy.ptII.isRunningNightlyBuild=true
# when we are running the nightlybuild
# Codegen uses up lots of memory while running
# Set ptolemy.ptII.batchMode to true so that when $PTII/org/terraswarm/accessor/test/auto/AccessViolation.xml is run, we don't hang with "Overwrite local changes? (yes or no)"
JTCLSH='"$(JAVA)" -Xmx1000M $(JAVAFLAGS) "-Dptolemy.ptII.dir=$(PTII)" -Dptolemy.ptII.batchMode=true $(JTCLSHFLAGS) tcl.lang.Shell'
# PTJACL_DIR is set to ptjacl and used in $PTII/ptolemy/actor/gui/makefile
# if the ptjacl.jar file was found
PTJACL_DIR=

if test ! -d "$PTII/util/testsuite"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/util/testsuite is not present,
    so we need not find Jacl." >&5
$as_echo "$PTII/util/testsuite is not present,
    so we need not find Jacl." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ptjacl.jar" >&5
$as_echo_n "checking for ptjacl.jar... " >&6; }

# Check whether --with-ptjacl_jar was given.
if test "${with_ptjacl_jar+set}" = set; then :
  withval=$with_ptjacl_jar; PTJACL_JAR=$withval
else
  PTJACL_JAR=$PTII/lib/ptjacl.jar
fi


    if test -f "$PTJACL_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJACL_JAR" >&5
$as_echo "$PTJACL_JAR" >&6; }; fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for how to run jacl with \"$JAVA\"" >&5
$as_echo_n "checking for how to run jacl with \"$JAVA\"... " >&6; }
	# This command starts up Jacl
	if echo "set java::jdkVersion; exit" | "$JAVA" -classpath "$PTJACL_JAR" tcl.lang.Shell; then
		if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJACL_JAR" >&5
$as_echo "$PTJACL_JAR" >&6; }; fi
		PTJACL_DIR=ptjacl
	else
		if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$JAVA\" -classpath \"$PTJACL_JAR\" tcl.lang.Shell failed" >&5
$as_echo "\"$JAVA\" -classpath \"$PTJACL_JAR\" tcl.lang.Shell failed" >&6; }; fi
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for how to run jacl with \"$JAVA\" \"$PTJACL_FLAG\"" >&5
$as_echo_n "checking for how to run jacl with \"$JAVA\" \"$PTJACL_FLAG\"... " >&6; }
		if echo "set java::jdkVersion; exit" | "$JAVA" -classpath "$PTJACL_JAR" tcl.lang.Shell; then
			if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJACL_JAR" >&5
$as_echo "$PTJACL_JAR" >&6; }; fi
		else
			if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$JAVA\" -classpath \"$PTJACL_JAR\" tcl.lang.Shell' failed,
	use '\"$JAVA\" -classpath \"$PTJACL_JAR\" tcl.lang.Shell'
	instead. ptjacl is used by the test suite, so you may be able to
	ignore this error." >&5
$as_echo "\"$JAVA\" -classpath \"$PTJACL_JAR\" tcl.lang.Shell' failed,
	use '\"$JAVA\" -classpath \"$PTJACL_JAR\" tcl.lang.Shell'
	instead. ptjacl is used by the test suite, so you may be able to
	ignore this error." >&6; }; fi
		fi
		JTCLSH='"$(JAVA)" $(JAVAFLAGS) "-Dptolemy.ptII.dir=$(PTII)" $(JTCLFLAGS tcl.lang.Shell'
	fi
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The ptjacl.jar file was not found at '$PTJACL_JAR'
    ptjacl.jar is only necessary if you plan on running the test suite.
    You can download ptjacl.jar from
    http://ptolemy.eecs.berkeley.edu/~cxh/java/jacl/ptjacl.html" >&5
$as_echo "$as_me: WARNING: The ptjacl.jar file was not found at '$PTJACL_JAR'
    ptjacl.jar is only necessary if you plan on running the test suite.
    You can download ptjacl.jar from
    http://ptolemy.eecs.berkeley.edu/~cxh/java/jacl/ptjacl.html" >&2;}
    fi
fi

if test -z "$PTJACL_DIR"; then
   updateExcludes "ptolemy/actor/gui/ptjacl/"
else
   updateClasspath "$PTJACL_JAR"
fi

#--------------------------------------------------------------------
#       "jsoup: Java HTML Parser"
#	See http://www.jsoup.org
#       Jsoup is used by the export html facility
#--------------------------------------------------------------------

# JSoup jar files used by export html facility
PTJSOUP_JAR=

# Set to jsoup if jsoup is found and used in $PTII/ptolemy/vergil/basic/export/makefile
PTJSOUP_DIR=

# We only need to look for Jsoup if $PTJSOUP_USER_DIR is present
PTJSOUP_USER_DIR="$PTII/ptolemy/vergil/basic/export/html"

if test ! -d "$PTJSOUP_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJSOUP_USER_DIR is not present,
    so we need not find Jsoup." >&5
$as_echo "$PTJSOUP_USER_DIR is not present,
    so we need not find Jsoup." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JSoup, used when exporting html pages. " >&5
$as_echo_n "checking for JSoup, used when exporting html pages. ... " >&6; }

# Check whether --with-jsoup was given.
if test "${with_jsoup+set}" = set; then :
  withval=$with_jsoup; PTJSOUP_JAR=$withval
else
  PTJSOUP_JAR=$PTII/lib/jsoup-1.14.2.jar
fi


    if test  -f "$PTJSOUP_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJSOUP_JAR" >&5
$as_echo "$PTJSOUP_JAR" >&6; }; fi
        updateClasspath "$PTJSOUP_JAR"
        PTJSOUP_DIR=jsoup
        # PTJSOUP_PACKAGES is used in ptII/doc/makefile
	PTJSOUP_PACKAGES=ptolemy.vergil.basic.export.html.jsoup
    else
        updateExcludes "ptolemy/vergil/basic/export/html/"
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the JSoup jar files necessary to
    to compile the export html facility.
    Typically, JSoup is found at $PTII/lib/jsoup-1.14.2.jar." >&5
$as_echo "$as_me: WARNING: Failed to find the JSoup jar files necessary to
    to compile the export html facility.
    Typically, JSoup is found at $PTII/lib/jsoup-1.14.2.jar." >&2;}
    fi
fi


#--------------------------------------------------------------------
#       JUnit is the Java Unit testing framework
#--------------------------------------------------------------------

# PTJUNIT_DIR is set to junit and used in
# $PTII/util/testsuite/makefile if junit was found
PTJUNIT_DIR=

# Used in many test/makefiles
JUNITS_JAR=

# We only need to look for JUnit if this directory is present
# and if Jacl is presnt
JUNIT_USER_DIR="$PTII/ptolemy/util/test/junit"

if test ! -d "$JUNIT_USER_DIR" -o ! -f "$PTJACL_JAR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Either '$JUNIT_USER_DIR' is not present,
    or the Jacl jar file '$PTJACL_JAR' was not found,
    so we need not find JUnit - the Java Unit Testing Framework." >&5
$as_echo "Either '$JUNIT_USER_DIR' is not present,
    or the Jacl jar file '$PTJACL_JAR' was not found,
    so we need not find JUnit - the Java Unit Testing Framework." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the JUnit - the Java Unit Testing Framework" >&5
$as_echo_n "checking for the JUnit - the Java Unit Testing Framework... " >&6; }

# Check whether --with-junit was given.
if test "${with_junit+set}" = set; then :
  withval=$with_junit; JUNIT_JAR=$withval
else
  JUNIT_JAR=$PTII/lib/junit-4.8.2.jar
fi


    if test -f "$JUNIT_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJUNIT_JAR" >&5
$as_echo "$PTJUNIT_JAR" >&6; }; fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the JUnitParams, needed by our JUnit tests" >&5
$as_echo_n "checking for the JUnitParams, needed by our JUnit tests... " >&6; }

# Check whether --with-junitparams was given.
if test "${with_junitparams+set}" = set; then :
  withval=$with_junitparams; JUNITPARAMS_JAR=$withval
else
  JUNITPARAMS_JAR=$PTII/lib/JUnitParams-0.4.0.jar
fi

        if test -f "$JUNITPARAMS_JAR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJUNITPARAMS_JAR" >&5
$as_echo "$PTJUNITPARAMS_JAR" >&6; }; fi
            JUNIT_JARS="${JUNIT_JAR}${CLASSPATHSEPARATOR}${JUNITPARAMS_JAR}"
	    PTJUNIT_DIR=junit
            # PTJUNIT_PACKAGES is used in ptII/doc/makefile
	    PTJUNIT_PACKAGES=ptolemy.util.test.junit
        fi
    fi

    if test "$PTJUNIT_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find junit-4.8.2.jar and/or JUnitParams-0.4.0.jar
    Perhaps the JUnit Java Unit Testing Framework is not installed?
    You need not download JUnit unless you want to run the unit tests." >&5
$as_echo "$as_me: WARNING: Failed to find junit-4.8.2.jar and/or JUnitParams-0.4.0.jar
    Perhaps the JUnit Java Unit Testing Framework is not installed?
    You need not download JUnit unless you want to run the unit tests." >&2;}
	# Note that we don't substitute in the ${PTII} here
	JUNIT_JARS='${PTII}/lib/junit-4.8.2.jar${CLASSPATHSEPARATOR}${PTII}/lib/JUnitParams-0.4.0.jar'
    fi
fi

if test -z "$PTJUNIT_DIR"; then
   updateExcludes "ptolemy/util/test/junit/"
   updateExcludes "**/junit/"
else
   updateClasspath "$JUNIT_JAR"
   updateClasspath "$JUNITPARAMS_JAR"
fi

#--------------------------------------------------------------------
#       JXL is the Java Excel library, which is GNU Lesser General Public License v3
#	For more information, see
#       http://jexcelapi.sourceforge.net/
#--------------------------------------------------------------------

# PTEXCEL_DIR is set to excel and used in
# $PTII/ptolemy/actor/lib/makefile if jxl was found
PTEXCEL_DIR=

# Used in ptolemy/actor/lib/excel/makefile
PTJXL_JAR=

# We only need to look for JXL if the actor/lib/excel directory is present
EXCEL_USER_DIR="$PTII/ptolemy/actor/lib/excel"

if test ! -d "$EXCEL_USER_DIR" -a ! -d "$HLACERT_USER_DIR/lib"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXCEL_USER_DIR and $HLACERTI_USER_DIR/lib are not present,
    so we need not find JXL - The Java Excel API." >&5
$as_echo "$EXCEL_USER_DIR and $HLACERTI_USER_DIR/lib are not present,
    so we need not find JXL - The Java Excel API." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Java Excel API (JXL)" >&5
$as_echo_n "checking for the Java Excel API (JXL)... " >&6; }

# Check whether --with-jxl was given.
if test "${with_jxl+set}" = set; then :
  withval=$with_jxl; PTJXL_JAR=$withval
else
  PTJXL_JAR=$PTII/ptolemy/actor/lib/excel/jxl.jar
fi


    if test -f "$PTJXL_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJXL_JAR" >&5
$as_echo "$PTJXL_JAR" >&6; }; fi
	# Set to excel and used in
	# $PTII/ptolemy/actor/lib/makefile if iText.jar is found
	PTEXCEL_DIR=excel
        # PTJXL_PACKAGES is used in ptII/doc/makefile
	PTEXCEL_PACKAGES=ptolemy.actor.lib.excel
    fi

    if test "$PTEXCEL_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find jxl.jar
    as $PTEXCEL_JAR.
    Perhaps the Java Excel API (JXL)  is not installed?
    You need not download the JXL interface unless you
    would like to use the Excel actor or hlacerti." >&5
$as_echo "$as_me: WARNING: Failed to find jxl.jar
    as $PTEXCEL_JAR.
    Perhaps the Java Excel API (JXL)  is not installed?
    You need not download the JXL interface unless you
    would like to use the Excel actor or hlacerti." >&2;}
	# Note that we don't substitute in the ${PTII} here
	PTJXL_JAR='${PTII}/ptolemy/actor/lib/excel/jxl.jar'
    fi
fi

if test -z "$PTEXCEL_DIR"; then
   updateExcludes "ptolemy/actor/lib/excel/"
   updateExcludes "org/hlacerti"
   # PTHLACERTI_PACKAGES is used in ptII/doc/makefile
   PTHLACERTI_PACKAGES="org.hlacerti.lib"
else
   updateClasspath "$PTJXL_JAR"
fi

#--------------------------------------------------------------------
#       Jython is an implementation of Python in Java
#	For more information,
#       see http://www.jython.org
#       See if there was a command-line option for where Jython is.
#--------------------------------------------------------------------

# PTJYTHON_DIR is set to python (FIXME: should be jython) and used in
# $PTII/ptolemy/actor/lib/makefile if Jython was found.
PTJYTHON_DIR=

# Directory that contains the jython jar files
JYTHON_DIR='${PTII}/lib'

# We only need to look for jython if $PTII/ptolemy/actor/lib/python exists
# FIXME: Note that the package is called jython, but the directory is python
JYTHON_USER_DIR="$PTII/ptolemy/actor/lib/python"
if test ! -d "$JYTHON_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JYTHON_USER_DIR is not present,
    so we need not find the Jython, the java implementation of Python." >&5
$as_echo "$JYTHON_USER_DIR is not present,
    so we need not find the Jython, the java implementation of Python." >&6; }; fi
else
    # Extract the first word of "jython", so it can be a program name with args.
set dummy jython; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTJYTHON+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTJYTHON in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTJYTHON="$PTJYTHON" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTJYTHON="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTJYTHON=$ac_cv_path_PTJYTHON
if test -n "$PTJYTHON"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJYTHON" >&5
$as_echo "$PTJYTHON" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test "${PTJYTHON:-none}" != "none"; then
        JYTHON_PROG_PARENT_DIR=`dirname "$PTJYTHON"`
   	if test -f "$JYTHON_PROG_PARENT_DIR/jython.jar"; then
	    if test "$JYTHON_DIR" != "$JYTHON_PROG_PARENT_DIR"; then
		# Use changequote to protect the square brackets in sed
		# Remove /cygdrive so we can compile with MSVC
		JYTHON_TMP_DIR=`echo "$JYTHON_PROG_PARENT_DIR" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found $PTJYTHON,
    using $JYTHON_TMP_DIR/jython.jar instead of
          $JYTHON_DIR/jython.jar" >&5
$as_echo "$as_me: WARNING: Found $PTJYTHON,
    using $JYTHON_TMP_DIR/jython.jar instead of
          $JYTHON_DIR/jython.jar" >&2;}
		JYTHON_DIR="$JYTHON_TMP_DIR"
	    fi
        fi
    else
        # Extract the first word of "jython.bat", so it can be a program name with args.
set dummy jython.bat; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTJYTHON_BAT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTJYTHON_BAT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTJYTHON_BAT="$PTJYTHON_BAT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTJYTHON_BAT="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTJYTHON_BAT=$ac_cv_path_PTJYTHON_BAT
if test -n "$PTJYTHON_BAT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJYTHON_BAT" >&5
$as_echo "$PTJYTHON_BAT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	if test "${PTJYTHON_BAT:-none}" != "none"; then
	    JYTHON_PROG_PARENT_DIR=`dirname "$PTJYTHON_BAT"`
   	    if test -f "$JYTHON_PROG_PARENT_DIR/jython.jar"; then
	        if test "$JYTHON_DIR" != "$JYTHON_PROG_PARENT_DIR"; then
		    # Use changequote to protect the square brackets in sed
		    # Remove /cygdrive so we can compile with MSVC
		    JYTHON_TMP_DIR=`echo "$JYTHON_PROG_PARENT_DIR" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found $PTJYTHON_BAT,
    using $JYTHON_TMP_DIR/jython.jar instead of
          $JYTHON_DIR/jython.jar" >&5
$as_echo "$as_me: WARNING: Found $PTJYTHON_BAT,
    using $JYTHON_TMP_DIR/jython.jar instead of
          $JYTHON_DIR/jython.jar" >&2;}
		    JYTHON_DIR="$JYTHON_TMP_DIR"
                fi
            fi
        fi
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Jython, the Java implementation of Python" >&5
$as_echo_n "checking for Jython, the Java implementation of Python... " >&6; }

# Check whether --with-jython was given.
if test "${with_jython+set}" = set; then :
  withval=$with_jython; JYTHON_DIR=$withval
else
  JYTHON_DIR=$JYTHON_DIR
fi


    if test -f "$JYTHON_DIR/jython.jar"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JYTHON_DIR" >&5
$as_echo "$JYTHON_DIR" >&6; }; fi
	# FIXME: This is ugly, but we set to python instead of jython
	# $PTII/ptolemy/actor/lib/makefile if jython was found
	PTJYTHON_DIR=python
	# PTJYTHON_PACKAGES is used in ptII/doc/makefile
	PTJYTHON_PACKAGES="ptolemy.actor.lib.python ptolemy.actor.gui.python"
    fi

    if test "$PTJYTHON_DIR" = ""; then
        if test -f "$PTII/vendors/jython/jython.jar"; then
	    JYTHON_DIR="$PTII/vendors/jython"
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JYTHON_DIR" >&5
$as_echo "$JYTHON_DIR" >&6; }; fi
	    # FIXME: This is ugly, but we set to python instead of jython
 	    # $PTII/ptolemy/actor/lib/makefile if jython was found
	    PTJYTHON_DIR=python
	    PTJYTHON_PACKAGES="ptolemy.actor.lib.python ptolemy.actor.gui.python"
	else
	    if test -f "$PTII/lib/jython.jar"; then
	       JYTHON_DIR="$PTII/lib"
	       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JYTHON_DIR" >&5
$as_echo "$JYTHON_DIR" >&6; }; fi
	       # FIXME: This is ugly, but we set to python instead of jython
	       # $PTII/ptolemy/actor/lib/makefile if jython was found
	       PTJYTHON_DIR=python
	       PTJYTHON_PACKAGES="ptolemy.actor.lib.python ptolemy.actor.gui.python"
            else
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find
    $PTII/lib/jython.jar and
    $PTII/vendors/jython/jython.jar
    perhaps Jython is not installed?
    Jython is a java implementation of Python.
    You need not download Jython unless you plan on using the Jython
    actors in ptolemy/actor/lib/python
    The Jython can be downloaded http://www.jython.org/download.html" >&5
$as_echo "$as_me: WARNING: Failed to find
    $PTII/lib/jython.jar and
    $PTII/vendors/jython/jython.jar
    perhaps Jython is not installed?
    Jython is a java implementation of Python.
    You need not download Jython unless you plan on using the Jython
    actors in ptolemy/actor/lib/python
    The Jython can be downloaded http://www.jython.org/download.html" >&2;}
	# Note that we don't substitute in the ${PTII} here
	JYTHON_DIR='${PTII}/vendors/jython'
            fi
        fi
    fi
fi

if test -z "$PTJYTHON_DIR"; then
   updateExcludes "ptolemy/actor/lib/jython/"
else
   updateClasspath "$JYTHON_DIR/jython.jar"
fi

#--------------------------------------------------------------------
#	Classes used to layout entities and relations in Vergil that use the
#       KIELER layout algorithm.
#	http://www.informatik.uni-kiel.de/rtsys/kieler/
#
#--------------------------------------------------------------------

# We only need to look for kieler if $PTII/ptolemy/vergil/basic/layout/kieler is present
KIELER_USER_DIR="$PTII/ptolemy/vergil/basic/layout/kieler"
# PTKIELER_DIR is set to kieler and used in
# $PTII/ptolemy/vergil/basic/layout/makefile if kieler was found
PTKIELER_DIR=

# Directory that contains the kieler jar files
KIELER_JAR='${PTII}/lib/kieler.jar'

if test ! -d "$KIELER_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KIELER_USER_DIR is not present,
    so we need not find KIELER." >&5
$as_echo "$KIELER_USER_DIR is not present,
    so we need not find KIELER." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kieler jar file used by layout " >&5
$as_echo_n "checking for kieler jar file used by layout ... " >&6; }

# Check whether --with-kieler-jar was given.
if test "${with_kieler_jar+set}" = set; then :
  withval=$with_kieler_jar; KIELER_JAR=$withval
else
  KIELER_JAR=$PTII/lib/kieler.jar
fi


    if test -f "$KIELER_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KIELER_JAR" >&5
$as_echo "$KIELER_JAR" >&6; }; fi
        # Set to kieler and used in
	# $PTII/ptolemy/vergil/basic/layout/makefile if kieler was found
	PTKIELER_DIR=kieler
    fi

    if test "$PTKIELER_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $KIELER_JAR
    perhaps KIELER is not installed?
    You need not use KIELER unless you plan on using the KIELER layout
    facility in $KIELER_USER_DIR
    The KIELER jar is usually found at $PTII/lib/kieler.jar" >&5
$as_echo "$as_me: WARNING: Failed to find $KIELER_JAR
    perhaps KIELER is not installed?
    You need not use KIELER unless you plan on using the KIELER layout
    facility in $KIELER_USER_DIR
    The KIELER jar is usually found at $PTII/lib/kieler.jar" >&2;}
	# Note that we don't substitute in the ${PTII} here
	KIELER_JAR='${PTII}/lib/kieler.jar'
    fi
fi

if test -z "$PTKIELER_DIR"; then
   updateExcludes "ptolemy/vergil/basic/layout/kieler/"
else
   updateClasspath "$KIELER_JAR"
fi

#--------------------------------------------------------------------
#       npm is the Node.js package manager, which is
#       used by CapeCode.
#       npm5 has a critical bug in that it removed files
#       from node_modules.
#       See https://www.icyphy.org/accessors/wiki/Notes/Npm5
#--------------------------------------------------------------------

# We only need to look for npm if this directory is present
NPM_USER_DIR="$PTII/org/terraswarm/accessor/accessors"

if test ! -d "$NPM_USER_DIR" ; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NPM_USER_DIR is not present,
    so we need not check for npm 5, the Node.js Package Manager" >&5
$as_echo "$NPM_USER_DIR is not present,
    so we need not check for npm 5, the Node.js Package Manager" >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for node" >&5
$as_echo_n "checking for node... " >&6; }
    # Extract the first word of "node", so it can be a program name with args.
set dummy node; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTNODE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTNODE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTNODE="$PTNODE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTNODE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTNODE=$ac_cv_path_PTNODE
if test -n "$PTNODE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTNODE" >&5
$as_echo "$PTNODE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test "${PTNODE:-none}" = "none"; then
       if test -f "$PTII/bin/node" ; then
           NODE_VERSION=`"$PTII/bin/node" --version`
           status=$?
           if test "$status" -eq 2; then
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the node executable in your path, $PTII/bin/node also failed." >&5
$as_echo "$as_me: WARNING: Failed to find the node executable in your path, $PTII/bin/node also failed." >&2;}
           else
               PTNODE="$PTII/bin/node"
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the node executable in your path, but $PTII/bin/node worked.  Please add $PTII/bin to your PATH." >&5
$as_echo "$as_me: WARNING: Failed to find the node executable in your path, but $PTII/bin/node worked.  Please add $PTII/bin to your PATH." >&2;}
           fi
       fi
    fi

    if test -f "$PTNODE" ; then
        NODE_VERSION=`"$PTNODE" --version`
        status=$?
        if test "$status" -eq 2; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $PTNODE was found, but \"$PTNODE --version\" returned 2." >&5
$as_echo "$as_me: WARNING: $PTNODE was found, but \"$PTNODE --version\" returned 2." >&2;};
            PTNODE="";
        fi
    fi

    case "`uname -s`" in
        Darwin) npmArch=darwin;;
        CYGWIN*) npmArch=win;;
        Linux) npmArch=linux;;
        *) npmArch=FIXME-Insert-Your-Architecture-Here;;
    esac

    NODE7_INSTRUCTIONS="To install Node 7.x:

    mkdir \$PTII/vendors/node
    cd \$PTII/vendors/node

    wget https://nodejs.org/download/release/v7.10.1/node-v7.10.1-$npmArch-x64.tar.gz
    tar -zxf node-v7.10.1-$npmArch-x64.tar.gz

    cd \$PTII
    export PATH=$PTII/bin:\${PATH}"

    if test "${PTNODE:-none}" = "none"; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the node executable, which means that the Node.js Accessor Host
    To install Node.js, see https://nodejs.org/en/download/

    If node is installed in $PTII/vendors/node, for example
    $PTII/vendors/node.bak/node-v7.10.1-darwin-x64/bin/node
    then $PTII/bin/node will use it.

    Note that npm 5.x has a critical flaw that prevents
    its use, so install Node 7.x, not Node 8.x

    Without Node, it is still possible to run the CapeCode Accessor Host,
    but generating Swarmlets and running them using Node
    will only work if the node executable is the path.

    $NODE7_INSTRUCTIONS" >&5
$as_echo "$as_me: WARNING: Failed to find the node executable, which means that the Node.js Accessor Host
    To install Node.js, see https://nodejs.org/en/download/

    If node is installed in $PTII/vendors/node, for example
    $PTII/vendors/node.bak/node-v7.10.1-darwin-x64/bin/node
    then $PTII/bin/node will use it.

    Note that npm 5.x has a critical flaw that prevents
    its use, so install Node 7.x, not Node 8.x

    Without Node, it is still possible to run the CapeCode Accessor Host,
    but generating Swarmlets and running them using Node
    will only work if the node executable is the path.

    $NODE7_INSTRUCTIONS" >&2;}

    FINAL_WARNING="$FINAL_WARNING
node was not found, which means that accessors probably won't work.  See above."

    else
       if test -f "$PTNODE" ; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for npm" >&5
$as_echo_n "checking for npm... " >&6; }
           # Extract the first word of "npm", so it can be a program name with args.
set dummy npm; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTNPM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTNPM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTNPM="$PTNPM" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTNPM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTNPM=$ac_cv_path_PTNPM
if test -n "$PTNPM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTNPM" >&5
$as_echo "$PTNPM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


           if test "${PTNPM:-none}" = "none"; then
               if test -f "$PTII/bin/npm" ; then
                   NODE_VERSION=`"$PTII/bin/npm" --version`
                   status=$?
                   if test "$status" -eq 2; then
                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the npm executable in your path, $PTII/bin/npm also failed." >&5
$as_echo "$as_me: WARNING: Failed to find the npm executable in your path, $PTII/bin/npm also failed." >&2;}
                   else
                       PTNODE="$PTII/bin/node"
                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the node executable in your path, but $PTII/bin/npm worked.  Please add $PTII/bin to your PATH." >&5
$as_echo "$as_me: WARNING: Failed to find the node executable in your path, but $PTII/bin/npm worked.  Please add $PTII/bin to your PATH." >&2;}
                   fi
               else
                   if test -f "$PTNPM" ; then
                       NODE_VERSION=`"$PTNPM" --version`
                       status=$?
                       if test "$status" -eq 2; then
                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $PTNPM was found in the path, but \"$PTNPM --version\" returned 2." >&5
$as_echo "$as_me: WARNING: $PTNPM was found in the path, but \"$PTNPM --version\" returned 2." >&2;}
                           PTNPM=""
                       fi
                   fi
               fi
           fi
       fi
       if test "${PTNPM:-none}" = "none"; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find npm, which means that the Node.js Accessor Host
    probably won't work.
    To npm is part of Node.js, see https://nodejs.org/en/download/

    If node is installed in $PTII/vendors/node, for example
    $PTII/vendors/node.bak/node-v7.10.1-darwin-x64/bin/node
    then $PTII/bin/node will use it.

    Note that npm 5.x has a critical flaw that prevents
    its use, so install Node 7.x, not Node 8.x." >&5
$as_echo "$as_me: WARNING: Failed to find npm, which means that the Node.js Accessor Host
    probably won't work.
    To npm is part of Node.js, see https://nodejs.org/en/download/

    If node is installed in $PTII/vendors/node, for example
    $PTII/vendors/node.bak/node-v7.10.1-darwin-x64/bin/node
    then $PTII/bin/node will use it.

    Note that npm 5.x has a critical flaw that prevents
    its use, so install Node 7.x, not Node 8.x." >&2;}
       else
           upgradeNpm=0
           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for npm before 5.x" >&5
$as_echo_n "checking for npm before 5.x... " >&6; }
           NPM_VERSION=`"$PTNPM" --version`
           status=$?
           if test "$status" -ne 0; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$PTNPM\" --version returned $status, which is non-zero.
    Please install Node 7.x, not Node 8.x or later." >&5
$as_echo "$as_me: WARNING: \"$PTNPM\" --version returned $status, which is non-zero.
    Please install Node 7.x, not Node 8.x or later." >&2;}
              FINAL_WARNING="$FINAL_WARNING

$PTNPM --version returned $status, which indicates a problem.  Please install Node 7.x from https://nodejs.org/download/release/v7.10.1/.  If npm does not work, then building the JavaScript Documentation will fail."
             upgradeNpm=1
           fi

           echo "$NPM_VERSION" | egrep '^5-9\.'
           status=$?
           if test "$status" -eq 1; then
              if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, npm is version $NPM_VERSION" >&5
$as_echo "ok, npm is version $NPM_VERSION" >&6; }; fi
           else
              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: npm is version $NPM_VERSION, which is 5.x or greater.
    npm 5.x removes files in node_modules so it should not be used.
    See https://www.icyphy.org/accessors/wiki/Notes/Npm5
    It is still possible to run the CapeCode Accessor Host,
    but generating Swarmlets and running them using Node Accessor Host
    will likely fail in mysterious ways" >&5
$as_echo "$as_me: WARNING: npm is version $NPM_VERSION, which is 5.x or greater.
    npm 5.x removes files in node_modules so it should not be used.
    See https://www.icyphy.org/accessors/wiki/Notes/Npm5
    It is still possible to run the CapeCode Accessor Host,
    but generating Swarmlets and running them using Node Accessor Host
    will likely fail in mysterious ways" >&2;}
             FINAL_WARNING="$FINAL_WARNING

The npm 5.x or greater binary is found in the path, which will cause problems with the Node Accessor host because npm 5.x removes files in node_modules/.  However, the CapeCode accessor host will likely not be affected by npm5.x.  See above for details."
             upgradeNpm=1
           fi

           if test $upgradeNpm -eq 1; then
               case "`uname -s`" in
                   Darwin) npmArch=darwin;;
                   CYGWIN*) npmArch=win;;
                   Linux) npmArch=linux;;
                   *) npmArch=FIXME-Insert-Your-Architecture-Here;;
               esac

               FINAL_WARNING="$FINAL_WARNING

The Node Accessor Host requires Node 7.x.  Node 8.x and later will not
work because npm 5.x removes files from the node_modules directory.
See https://www.icyphy.org/accessors/wiki/Notes/Npm5

The CapeCode Accessor Host does not use Node at runtime.

With Node 8.x and greater, it is still possible to run the Node
Accessor Host, but generating Swarmlets and running them using Node
Accessor Host will likely fail in mysterious ways])

However, node and npm are used to build the JavaScript docs, so you
may want to install Node 7.x if you want to view the CapeCode
JavaScript documentation.  Building the documentation is optional.

$NODE7_INSTRUCTIONS"


          fi

        fi
    fi
fi

#--------------------------------------------------------------------
#       OpenCV is the Computer Vision platform
#	For more information, see http://opencv.org
#       There used to be actors in ptolemy/actor/lib/opencv,
#       but they used an older version of the Java interface to OpenCV
#       and were removed in March, 2016.
#--------------------------------------------------------------------

# PTOPENCV_DIR is set to opencv.
PTOPENCV_DIR=

# The OpenCV Jar file.
OPENCV_JAR=

# We only need to look for OpenCVif the org/ptolemy/opencv directory is present
OPENCV_USER_DIR="$PTII/org/ptolemy/opencv"

if test ! -d "$OPENCV_USER_DIR" ; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENCV_USER_DIR is not present,
    so we need not find OpenCV - The Open Computer Vision API." >&5
$as_echo "$OPENCV_USER_DIR is not present,
    so we need not find OpenCV - The Open Computer Vision API." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenCV Java API" >&5
$as_echo_n "checking for OpenCV Java API... " >&6; }
    # We need to run javac in the config directory so that javac from jdk1.1.6
    # under NT and cygwin works properly

    # If you update $PTII/lib/opencv-*.jar, then please update these files
    # .classpath.default
    # adm/gen-11.0/capecode1_0_devel_setup_windows.xml
    # build.default.xml
    # config/OpenCVTest.java


# Check whether --with-opencv-jar was given.
if test "${with_opencv_jar+set}" = set; then :
  withval=$with_opencv_jar; OPENCV_JAR=$withval
else
  OPENCV_JAR=$PTII/lib/opencv-320.jar
fi


    OPENCV_CLASSPATH="-classpath $OPENCV_JAR${CLASSPATHSEPARATOR}."
    startdir=$PTII
    cd "$srcdir/config"

    # Try the jar file that was included in the ptII tree or via the command line.
    if test -f "$OPENCV_JAR"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenCV found at $OPENCV_JAR." >&5
$as_echo "OpenCV found at $OPENCV_JAR." >&6; }; fi
        OPENCV_CLASSPATH="-classpath $OPENCV_JAR${CLASSPATHSEPARATOR}."
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenCV by compiling and running a small OpenCV program" >&5
$as_echo_n "checking for OpenCV by compiling and running a small OpenCV program... " >&6; }
        if "$JAVAC" $OPENCV_CLASSPATH OpenCVTest.java ; then
            if "$JAVA" $OPENCV_CLASSPATH OpenCVTest; then
                if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENCV_JAR" >&5
$as_echo "$OPENCV_JAR" >&6; }; fi
                PTOPENCV_DIR=opencv
                updateClasspath "$OPENCV_JAR"
            else
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run OpenCV test program in $PTII/config with
    $JAVA $OPENCV_CLASSPATH OpenCVTest
    so we will try other jars." >&5
$as_echo "$as_me: WARNING: Failed to run OpenCV test program in $PTII/config with
    $JAVA $OPENCV_CLASSPATH OpenCVTest
    so we will try other jars." >&2;}
                OPENCV_BAD_JAR=$OPENCV_JAR
                OPENCV_JAR=
            fi
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to compile OpenCV test program in $PTII/config with
    $JAVAC $OPENCV_CLASSPATH OpenCVTest.java
    so we will search other directories." >&5
$as_echo "$as_me: WARNING: Failed to compile OpenCV test program in $PTII/config with
    $JAVAC $OPENCV_CLASSPATH OpenCVTest.java
    so we will search other directories." >&2;};
            OPENCV_BAD_JAR=$OPENCV_JAR
            OPENCV_JAR=
        fi
    fi

    # If we did not find the jar, then look in few directories.
    if ! test -f "$OPENCV_JAR"; then
        OPENCV_JARS=""
        OPENCV_DIRS="$PTII/vendors/opencv/share/OpenCV/java $PTII/lib /opt/local/share/OpenCV/java /usr/share/OpenCV/java /usr/local/share/OpenCV/java"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opencv-*.jar in $OPENCV_DIRS" >&5
$as_echo_n "checking for opencv-*.jar in $OPENCV_DIRS... " >&6; }
        for OPENCV_DIR in $OPENCV_DIRS
        do
            if test -d $OPENCV_DIR; then
                TMP_OPENCV_JARS=`find $OPENCV_DIR -name "opencv-*.jar"`
                for TMP_OPENCV_JAR in $TMP_OPENCV_JARS
                do
                    # If the file is not the bad jar we already tried, then add it to the list
                    if test "$TMP_OPENCV_JAR" != "$OPENCV_BAD_JAR"; then
                        OPENCV_JARS=" $OPENCV_JARS $TMP_OPENCV_JAR"
                    fi
                done
            fi
        done
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenCV jars: $OPENCV_JARS" >&5
$as_echo "OpenCV jars: $OPENCV_JARS" >&6; }; fi

        for TMP_OPENCV_JAR in $OPENCV_JARS
        do
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking $TMP_OPENCV_JAR" >&5
$as_echo_n "checking $TMP_OPENCV_JAR... " >&6; }

            OPENCV_CLASSPATH="-classpath $TMP_OPENCV_JAR${CLASSPATHSEPARATOR}."
            # Don't use 'env $JAVAC . . .' here, it will not work under Cygwin
            if "$JAVAC" $OPENCV_CLASSPATH OpenCVTest.java ; then
                if "$JAVA" $OPENCV_CLASSPATH OpenCVTest; then
                    OPENCV_JAR=$TMP_OPENCV_JAR
                    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenCV found at $OPENCV_JAR." >&5
$as_echo "OpenCV found at $OPENCV_JAR." >&6; }; fi
                    PTOPENCV_DIR=opencv
                    # PTOPENCV_PACKAGES is used in ptII/doc/makefile
                    PTOPENCV_PACKAGES="org.ptolemy.opencv"
                    updateClasspath "$OPENCV_JAR"
                    break;
                else
                    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenCVTest failed to run using $TMP_OPENCV_JAR." >&5
$as_echo "OpenCVTest failed to run using $TMP_OPENCV_JAR." >&6; }; fi
                fi
            else
                if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenCVTest failed to compile using $TMP_OPENCV_JAR." >&5
$as_echo "OpenCVTest failed to compile using $TMP_OPENCV_JAR." >&6; }; fi
            fi
         done
         if ! test -f "$OPENCV_JAR"; then
	     if ! test -z "$OPENCV_JARS"; then
	         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Checked $OPENCV_JARS,
    but the OpenCV test program failed to compile or run.

    Under Linux, try:

    export LD_LIBRARY_PATH=\${PTII}/vendors/opencv/lib:\${PTII}/vendors/opencv/share/OpenCV/java:\${LD_LIBRARY_PATH}
    ./configure
    " >&5
$as_echo "$as_me: WARNING: Checked $OPENCV_JARS,
    but the OpenCV test program failed to compile or run.

    Under Linux, try:

    export LD_LIBRARY_PATH=\${PTII}/vendors/opencv/lib:\${PTII}/vendors/opencv/share/OpenCV/java:\${LD_LIBRARY_PATH}
    ./configure
    " >&2;}
             fi
         fi
     fi

    if ! test -f "$OPENCV_JAR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Either we could not find
    org.opencv.core.Core or else it was already in the JRE.
    Searching for OpenCV.jar returned:
      $OPENCV_JAR
    If the class cannot be found, then Eclipse might not be able to find
    the OpenCV files.

    This is only a problem if you are using Eclipse.
    If the class was in the JRE, then Eclipse should compile the OpenCV files
    without problems.
    For details, see $PTII/org/ptolemy/opencv/package.html" >&5
$as_echo "$as_me: WARNING: Either we could not find
    org.opencv.core.Core or else it was already in the JRE.
    Searching for OpenCV.jar returned:
      $OPENCV_JAR
    If the class cannot be found, then Eclipse might not be able to find
    the OpenCV files.

    This is only a problem if you are using Eclipse.
    If the class was in the JRE, then Eclipse should compile the OpenCV files
    without problems.
    For details, see $PTII/org/ptolemy/opencv/package.html" >&2;}

    fi

    if ! test -f OpenCVTest.class; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVAC\" OpenCVTest.java' failed.
    perhaps the OpenCV Computer Vision API is not installed?
    You need not download OpenCV unless you plan on using the video
    actors in $OPENCV_USER_DIR
    The OpenCV API can be downloaded from http://opencv.org.
    Under Mac OS X, try:
       $PTII/org/ptolemy/opencv/travis_build_opencv.sh
    or
       sudo port install opencv +python27 +java
    (Note that Macport will likely build a jar file that uses .class files that are
    later than JDK 1.8 and thus incompatible with JDK 1.8, see
    https://trac.macports.org/ticket/60193.)
    Then rerun ./configure.
    See org/ptolemy/opencv/package.html for installation help." >&5
$as_echo "$as_me: WARNING: '\"$JAVAC\" OpenCVTest.java' failed.
    perhaps the OpenCV Computer Vision API is not installed?
    You need not download OpenCV unless you plan on using the video
    actors in $OPENCV_USER_DIR
    The OpenCV API can be downloaded from http://opencv.org.
    Under Mac OS X, try:
       $PTII/org/ptolemy/opencv/travis_build_opencv.sh
    or
       sudo port install opencv +python27 +java
    (Note that Macport will likely build a jar file that uses .class files that are
    later than JDK 1.8 and thus incompatible with JDK 1.8, see
    https://trac.macports.org/ticket/60193.)
    Then rerun ./configure.
    See org/ptolemy/opencv/package.html for installation help." >&2;}

    fi

    cd "$startdir"
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if org/ptolemy/opencv will be compiled." >&5
$as_echo_n "checking if org/ptolemy/opencv will be compiled.... " >&6; }
if test -z "$PTOPENCV_DIR"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenCV was not found, so org/ptolemy/opencv will not be compiled.
   Try running $PTII/org/ptolemy/opencv/travis_build_opencv.sh; ./configure
   " >&5
$as_echo "$as_me: WARNING: OpenCV was not found, so org/ptolemy/opencv will not be compiled.
   Try running $PTII/org/ptolemy/opencv/travis_build_opencv.sh; ./configure
   " >&2;}
   updateExcludes "org/ptolemy/opencv/"
else
   # Print a message to summarize what's happening and make any extraneous "ok" lines less confusing.
   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
fi

#--------------------------------------------------------------------
#       oscP5 Open Sound Control/processing.org interface
#	http://www.sojamo.de/libraries/oscP5/
#       oscP5 is used by actors in org/ptolemy/osc
#--------------------------------------------------------------------

# lib/oscp5.jar
PTOSCP5_JAR=

# Set to osc if oscp5.jar is found and used in $PTII/org/ptolemy/makefile
PTOSCP5_DIR=

# Set to org.ptolemy.osc and used int $PTII/doc/makefile if oscp5 is found
PTOSCP5_PACKAGES=

# We only need to look for Jsoup if $PTOSCP5_USER_DIR is present
PTOSCP5_USER_DIR="$PTII/org/ptolemy/osc"

if test ! -d "$PTOSCP5_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTOSCP5_USER_DIR is not present,
    so we need not find the Open Sound Control/Processing.org interface." >&5
$as_echo "$PTOSCP5_USER_DIR is not present,
    so we need not find the Open Sound Control/Processing.org interface." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Open Sound Control/Processing.org interface (oscP5). " >&5
$as_echo_n "checking for Open Sound Control/Processing.org interface (oscP5). ... " >&6; }

# Check whether --with-oscp5 was given.
if test "${with_oscp5+set}" = set; then :
  withval=$with_oscp5; PTOSCP5_JAR=$withval
else
  PTOSCP5_JAR=$PTII/lib/oscP5.jar
fi


    if test  -f "$PTOSCP5_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTOSCP5_JAR" >&5
$as_echo "$PTOSCP5_JAR" >&6; }; fi
	updateClasspath "$PTOSCP5_JAR"
	PTOSCP5_DIR=osc
	PTOSCP5_PACKAGES=org.ptolemy.osc
    fi
fi

if test -z "$PTOSCP5_DIR"; then
    updateExcludes "org/ptolemy/osc/"

    # Only print the message if the directory was found.
    if test -d "$PTOSCP5_USER_DIR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the Open Sound Control/Processing.org (oscP5) interface necessary
    to compile org/ptolemy/osc.
    Typically, the oscp5.jar file is found at $PTII/lib/oscP5.jar." >&5
$as_echo "$as_me: WARNING: Failed to find the Open Sound Control/Processing.org (oscP5) interface necessary
    to compile org/ptolemy/osc.
    Typically, the oscp5.jar file is found at $PTII/lib/oscP5.jar." >&2;}
    fi
fi

#--------------------------------------------------------------------
#       RXTX is the Serial Port interface that replaces
#       Sun's commapi.
#       We are using nrjavaserial from https://github.com/NeuronRobotics/nrjavaserial/
#--------------------------------------------------------------------
# We only need to look for rxtx if $PTII/ptolemy/actor/lib/io/comm is present
RXTX_USER_DIR="$PTII/ptolemy/actor/lib/io/comm"
RXTX_JAR_DEFAULT='${PTII}/lib/nrjavaserial-3.11.0.devel.jar'
RXTX_PRESENT=no
# PTLEGO_DIR is set to lego
# $PTII/ptolemy/apps/makefile if the Java Communications API was found
#
PTLEGO_DIR=
# PTCOMM_DIR is set to comm and used in
# $PTII/ptolemy/actor/lib/io/makefile if the Java Communications API was found
#
PTCOMM_DIR=

# PTSERIAL_DIR is set to serial and used in
# $PTII ptolemy/actor/lib/jjs/modules/makefile if the Java Communications API was found
PTSERIAL_DIR=

# PTIMUSENSOR_DIR is set to IMUSensor and used in ptolemy/actor/lib/jjs/modules/makefile if the Java Communications API was found
PTIMUSENSOR_DIR=

if test ! -d "$RXTX_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RXTX_USER_DIR is not present,
    so we need not find rxtx." >&5
$as_echo "$RXTX_USER_DIR is not present,
    so we need not find rxtx." >&6; }; fi
    # Use curly brackets around PTII so that if rxtx is not present
    # then ${PTII} will appear in ptinvoke.
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rxtx serial port interface" >&5
$as_echo_n "checking for rxtx serial port interface... " >&6; }

# Check whether --with-rxtx was given.
if test "${with_rxtx+set}" = set; then :
  withval=$with_rxtx; RXTX_JAR=$withval
else
  RXTX_JAR=$PTII/lib/nrjavaserial-3.11.0.devel.jar
fi


    if test -f "$RXTX_JAR"; then
	if test "`uname -s`" = "Darwin"; then
            if test -f /Library/Java/Extensions/RXTXcomm.jar ; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: /Library/Java/Extensions/RXTXcomm.jar exists, which
    will cause problems compiling IMUSensor.java:
        error: incompatible types: CommPort cannot be converted to SerialPort
    As a result, classes that use the serial port will not be compiled.
    To fix this remove the file:
        sudo rm /Library/Java/Extensions/RXTXcomm.jar
    If you can't remove it, it is because of macOS SIP
    (https://support.apple.com/en-us/HT204899).
    Search the web for how to disable SIP temporarily by rebooting.
    After removing the file, rerun ./configure" >&5
$as_echo "$as_me: WARNING: /Library/Java/Extensions/RXTXcomm.jar exists, which
    will cause problems compiling IMUSensor.java:
        error: incompatible types: CommPort cannot be converted to SerialPort
    As a result, classes that use the serial port will not be compiled.
    To fix this remove the file:
        sudo rm /Library/Java/Extensions/RXTXcomm.jar
    If you can't remove it, it is because of macOS SIP
    (https://support.apple.com/en-us/HT204899).
    Search the web for how to disable SIP temporarily by rebooting.
    After removing the file, rerun ./configure" >&2;}
            else
                if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RXTX_JAR" >&5
$as_echo "$RXTX_JAR" >&6; }; fi
   	        RXTX_PRESENT=yes
	        updateClasspath "$RXTX_JAR"
            fi
        else
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RXTX_JAR" >&5
$as_echo "$RXTX_JAR" >&6; }; fi
   	    RXTX_PRESENT=yes
	    updateClasspath "$RXTX_JAR"
        fi
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Did not find
	'$RXTX_JAR'" >&5
$as_echo "Did not find
	'$RXTX_JAR'" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rxtx classes in CLASSPATH" >&5
$as_echo_n "checking for rxtx classes in CLASSPATH... " >&6; }
        startdir=$PTII
        cd "$srcdir/config"

        if "$JAVAC" FindClass.java ; then
	    # Usually RXTXcomm.jar will be in the CLASSPATH
	    RXTX_JAR=`"$JAVA" -classpath "$PTII/config$CLASSPATHSEPARATOR$CLASSPATH" FindClass gnu.io.SerialPort`
	    if test -f "$RXTX_JAR" ; then
	       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RXTC_JAR" >&5
$as_echo "$RXTC_JAR" >&6; }; fi
	       RXTX_PRESENT=yes
	       # Here, we should not be adding RXTX_JAR to Eclipse
	       # if RXTXcomm.jar was in the jre
               case "`uname -s`" in
	       Darwin)
  	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not including
   $RXTX_JAR
   to the Eclipse classpath under Darwin because it is already present." >&5
$as_echo "$as_me: WARNING: Not including
   $RXTX_JAR
   to the Eclipse classpath under Darwin because it is already present." >&2;};;
               *)
		   updateClasspath "$RXTX_JAR"
		   ;;
               esac
            else
	       # RXTX_JAR might contain a warning message from FindClass
	       RXTX_JAR=""
	       "$JAVA" -classpath "$PTII/config$CLASSPATHSEPARATOR$CLASSPATH" FindClass gnu.io.SerialPort > /dev/null
	       retval=$?
	       if test "$retval" = "0"; then
	       	       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, RXTX is probably in the jre directory" >&5
$as_echo "ok, RXTX is probably in the jre directory" >&6; }; fi
		       RXTX_PRESENT=yes
	       fi
	    fi
        cd "$startdir"
        fi
    fi
    if test "$RXTX_PRESENT" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Perhaps rxtx is not installed?
    You need not download rxtx unless you plan the actors in actor.lib.comm.
    or serial accessors.
    The rxtx package can be found at
    https://github.com/NeuronRobotics/nrjavaserial/releases and the jar
    file placed at $PTII/lib/nrjavaserial-3.11.0.devel.jar and configure rerun." >&5
$as_echo "$as_me: WARNING: Perhaps rxtx is not installed?
    You need not download rxtx unless you plan the actors in actor.lib.comm.
    or serial accessors.
    The rxtx package can be found at
    https://github.com/NeuronRobotics/nrjavaserial/releases and the jar
    file placed at $PTII/lib/nrjavaserial-3.11.0.devel.jar and configure rerun." >&2;}
    fi
fi

if test "$RXTX_PRESENT" = "yes"; then
    # Subdirectories that contains Java Communications API specific code
    PTLEGO_DIR=lego
    PTCOMM_DIR=comm
    PTSERIAL_DIR=serial
    PTIMUSENSOR_DIR=IMUSensor
    # PTRXTX_PACKAGES is used in ptII/doc/makefile
    PTRXTX_PACKAGES="ptolemy.actor.lib.io.comm ptolemy.actor.lib.jjs.modules.IMUSensor ptolemy.actor.lib.jjs.modules.serial"
else
    RXTX_JAR="$RXTX_JAR_DEFAULT"
    updateExcludes "ptolemy/actor/lib/io/comm/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/IMUSensor/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/serial/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/xbee/"
fi

#--------------------------------------------------------------------
#       Lejos is a Java Virtual machine that runs on the Lego Mindstorm
#	For more information, see http://lejos.sourceforge.net
#	See if there was a command-line option for rxtxi is
#       If not, check to see if $PTII/vendors/lejos/lejos/lejosBeta3
#--------------------------------------------------------------------

# We only need to look for rxtx if $PTII/ptolemy/apps/lejos
LEJOS_USER_DIR="$PTII/ptolemy/apps/lejos"
LEJOS_PRESENT=no
# PTLEJOS_DIR is set to lejos
# $PTII/ptolemy/apps/makefile if the Java Communications API was found
PTLEJOS_DIR=
if test ! -d "$LEJOS_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEJOS_USER_DIR is not present,
    so we need not find lejos." >&5
$as_echo "$LEJOS_USER_DIR is not present,
    so we need not find lejos." >&6; }; fi
    # Use curly brackets around PTII so that if lejos is not present
    # then ${PTII} will appear in ptinvoke.
    LEJOS_DIR='${PTII}/vendors/lejos/lejosBeta3'
else
    if test "$RXTX_PRESENT" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Lejos requires rxtx, which was not found." >&5
$as_echo "$as_me: WARNING: Lejos requires rxtx, which was not found." >&2;}
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lejos directory" >&5
$as_echo_n "checking for lejos directory... " >&6; }

# Check whether --with-lejos was given.
if test "${with_lejos+set}" = set; then :
  withval=$with_lejos; LEJOS_DIR=$withval
else
  LEJOS_DIR=$PTII/vendors/lejos/lejosBeta3
fi


	if test -d "$LEJOS_DIR/classes/josx"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEJOS_DIR" >&5
$as_echo "$LEJOS_DIR" >&6; }; fi
	    # Subdirectory that contains Java Communications API specific code
	    PTLEJOS_DIR=lejos
	    LEJOS_PRESENT=yes
	else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $LEJOS_DIR/classes/josx/" >&5
$as_echo "$as_me: WARNING: Failed to find $LEJOS_DIR/classes/josx/" >&2;}
	    LEJOS_DIR='${PTII}/vendors/lejos'
	fi
    fi
    if test "$LEJOS_PRESENT" = "no"; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Perhaps Lejos is not installed?
	You need not download Lejos unless you plan on use the Lego Mindstorm
	demos in \$PTII/ptolemy/apps/lejos. Lejos can be downloaded from
	http://lejos.sourceforge.net
	and placed  in \$PTII/vendors/lejos/lejosBeta3" >&5
$as_echo "$as_me: WARNING: Perhaps Lejos is not installed?
	You need not download Lejos unless you plan on use the Lego Mindstorm
	demos in \$PTII/ptolemy/apps/lejos. Lejos can be downloaded from
	http://lejos.sourceforge.net
	and placed  in \$PTII/vendors/lejos/lejosBeta3" >&2;}
    fi
fi


#--------------------------------------------------------------------
#	See if there was a command-line option for where javacc is;  if
#	not, check to see if $PTII/vendors/sun/JavaCC exists
#       if it is does not, look for javacc on the path.
#  Note that JavaCC-4.2 will not work, there are problems with
#  ReInit() being static or not static
#--------------------------------------------------------------------

# We only need to look for JavaCC if $PTII/ptolemy/data/expr exists
if test ! -d "$PTII/ptolemy/data/expr"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/data/expr is not present,
    so we need not find JavaCC." >&5
$as_echo "$PTII/ptolemy/data/expr is not present,
    so we need not find JavaCC." >&6; }; fi
    JAVACC_DIR=$PTII/vendors/sun/javacc-5.0
    JAVACC=javacc
    JJTREE=jjtree
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JavaCC" >&5
$as_echo_n "checking for JavaCC... " >&6; }

# Check whether --with-javacc was given.
if test "${with_javacc+set}" = set; then :
  withval=$with_javacc; JAVACC_DIR=$withval
else
  JAVACC_DIR=$PTII/vendors/sun/javacc-5.0
fi


    if test "`uname -s`" = "CYGWIN_NT-4.0" -o \
		"`uname -s`" = "CYGWIN_NT-5.0" ; then
	JJTREE='"$(JAVA)" COM.sun.labs.jjtree.Main'
	JAVACC='"$(JAVA)" COM.sun.labs.javacc.Main'
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Be sure that your CLASSPATH includes JavaCC.zip, which is located in" >&5
$as_echo "$as_me: WARNING:
Be sure that your CLASSPATH includes JavaCC.zip, which is located in" >&2;};
    else
	if test ! -d "$JAVACC_DIR"; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find directory
    '${JAVACC_DIR}'
    so we search for the jjtree command." >&5
$as_echo "$as_me: WARNING: Could not find directory
    '${JAVACC_DIR}'
    so we search for the jjtree command." >&2;}
	    # Extract the first word of "jjtree", so it can be a program name with args.
set dummy jjtree; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JJTREE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JJTREE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JJTREE="$JJTREE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JJTREE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JJTREE=$ac_cv_path_JJTREE
if test -n "$JJTREE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JJTREE" >&5
$as_echo "$JJTREE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	    if test -x "$JJTREE"; then
		if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JJTREE" >&5
$as_echo "$JJTREE" >&6; }; fi ;
		JAVACCBIN=`dirname $JJTREE`
		JAVACC_DIR=`dirname $JAVACCBIN`
	    else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find jjtree" >&5
$as_echo "$as_me: WARNING: Failed to find jjtree" >&2;};
	    fi
	fi
	if test -d "$JAVACC_DIR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVACC_DIR" >&5
$as_echo "$JAVACC_DIR" >&6; }; fi
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jjtree" >&5
$as_echo_n "checking for jjtree... " >&6; }
	    if test -x "$JAVACC_DIR/bin/jjtree"; then
		# Note that we don't substitute in the $(JAVACC_DIR) here
		JJTREE='$(JAVACC_DIR)/bin/jjtree'
		if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JJTREE" >&5
$as_echo "$JJTREE" >&6; }; fi
		JJTREE_OPTIONS=-STATIC=false
	    else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find jjtree in '$JAVACC_DIR/bin'" >&5
$as_echo "$as_me: WARNING: Failed to find jjtree in '$JAVACC_DIR/bin'" >&2;};
	    fi
	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javacc" >&5
$as_echo_n "checking for javacc... " >&6; }
	    if test -x "$JAVACC_DIR/bin/javacc"; then
		# Note that we don't substitute in the $(JAVACC_DIR) here
		JAVACC='$(JAVACC_DIR)/bin/javacc'
		if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVACC" >&5
$as_echo "$JAVACC" >&6; }; fi
		JAVACC_OPTIONS=-STATIC=false
	    else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find javacc in '$JAVACC_DIR/bin'" >&5
$as_echo "$as_me: WARNING: Failed to find javacc in '$JAVACC_DIR/bin'" >&2;};
	    fi
	fi
    fi

    if test ! -d "$JAVACC_DIR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find javacc, perhaps JavaCC is not installed?
    You need not download JavaCC unless you plan on modifying .jjt files
    in ptolemy/data/expr.
    JavaCC is available from
    https://javacc.org

    Note that the zip file that gets downloaded is actually an installer
    that must be run to install the JavaCC.zip file that contains the classes.

    Note that JavaCC-4.1 and 4.2 will not work, there are problems with
    ReInit() being static or not static.

    JavaCC-6.0 seems to not include the jjtree and javacc scripts, so
    we recommend JavaCC-5.0.

    Try:
    cd $PTII/vendors/sun
    wget https://javacc.org/downloads/javacc-5.0.tar.gz
    tar -zxf javacc-5.0.tar.gz
    cd $PTII
    ./configure

    Configure looks for JavaCC in $PTII/vendors/sun/javacc-5.0
    so either install JavaCC in that location or use the --with-javacc= flag
    and then rerun configure.'" >&5
$as_echo "$as_me: WARNING: Failed to find javacc, perhaps JavaCC is not installed?
    You need not download JavaCC unless you plan on modifying .jjt files
    in ptolemy/data/expr.
    JavaCC is available from
    https://javacc.org

    Note that the zip file that gets downloaded is actually an installer
    that must be run to install the JavaCC.zip file that contains the classes.

    Note that JavaCC-4.1 and 4.2 will not work, there are problems with
    ReInit() being static or not static.

    JavaCC-6.0 seems to not include the jjtree and javacc scripts, so
    we recommend JavaCC-5.0.

    Try:
    cd $PTII/vendors/sun
    wget https://javacc.org/downloads/javacc-5.0.tar.gz
    tar -zxf javacc-5.0.tar.gz
    cd $PTII
    ./configure

    Configure looks for JavaCC in $PTII/vendors/sun/javacc-5.0
    so either install JavaCC in that location or use the --with-javacc= flag
    and then rerun configure.'" >&2;}
	JJTREE=touch
	JAVACC=touch
    fi
fi

#--------------------------------------------------------------------
#	Test for javax.media.j3d (Java 3D)
#       http://www.oracle.com/technetwork/java/javase/overview/index-jsp-138252.html
#--------------------------------------------------------------------
# PTJAVA3D_DIR is set to gr and used in
# $PTII/ptolemy/actor/lib/makefile if Java 3D was found
PTJAVA3D_DIR=

# Name of the jar file that includes the GR domain if Java 3D was found
# Used in domains/makefile
PTGRDOMAIN_JAR=

# The full path (ptolemy/domains/gr/gr.jar) to the gr.jar file.  Used in mk/jnlp.mk
PTGRDOMAIN_JAR_FULL=

# We only need to look for Java3D if the gr domain is present
JAVA3D_USER_DIR="$PTII/ptolemy/domains/gr"

if test ! -d "$JAVA3D_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA3D_USER_DIR is not present,
    so we need not find Java3D." >&5
$as_echo "$JAVA3D_USER_DIR is not present,
    so we need not find Java3D." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java3D" >&5
$as_echo_n "checking for Java3D... " >&6; }

# Check whether --with-java3D was given.
if test "${with_java3D+set}" = set; then :
  withval=$with_java3D; JAVA3D_DIR=$withval
else
  JAVA3D_DIR=
fi


    # We want to use -classpath, which overrides $CLASSPATH
    if test -z "$CLASSPATH"; then
        tmpClasspath="."
    else
        tmpClasspath="$CLASSPATH"
    fi

    if test -z "$JAVA3D_DIR" ; then
       # Special version of Java3D for Mac OS X, see https://wiki.eecs.berkeley.edu/ptexternal/Main/Java3D

       # Note that under Travis, we want to select the Java3D from
       # vendors/j3d/lib so that when we create Vergil.app,
       # bin/Vergil.app/Contents/Info.plist refers to vendors/j3d/lib
       # and not /usr/share/java/j3d*.

       systemName="`uname -s`"
       directory=`ls -d $PTII/vendors/j3d/lib/$systemName`

       if test -d "$directory"; then
       	  JAVA3D_DIR="$directory"
       else
          if test -f /usr/share/java/j3dcore.jar; then
              JAVA3D_DIR=/usr/share/java
          fi
       fi
    fi
    if test -f "$JAVA3D_DIR/j3dcore.jar" -a -f "$JAVA3D_DIR/j3dutils.jar" -a -f "$JAVA3D_DIR/vecmath.jar"; then
        JAVA3D_JARS="$JAVA3D_DIR/j3dcore.jar$CLASSPATHSEPARATOR$JAVA3D_DIR/j3dutils.jar$CLASSPATHSEPARATOR$JAVA3D_DIR/vecmath.jar$CLASSPATHSEPARATOR"
	Java3DClasspath="$JAVA3D_JARS"
	updateClasspath "$JAVA3D_DIR/j3dcore.jar"
	updateClasspath "$JAVA3D_DIR/j3dutils.jar"
	updateClasspath "$JAVA3D_DIR/vecmath.jar"

            if test -f /System/Library/Java/Extensions/j3dcore.jar; then
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: /System/Library/Java/Extensions/j3dcore.jar exists.

    Under Mac OS X 10.9 (Mavericks) and later with Java 1.8, Java 3D
    will probably not work if
    /System/Library/Java/Extensions/j3dcore.jar and other files exist.
    Instead, Ptolemy II uses a version of Java 3D in
    $PTII/vendors/j3d.  If you run Ptolemy with the version of Java3D
    installed in /System/Library/Java/Extensions, the the demo will
    fail to render the 3D viewer and you may see messages like:
       JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
       AWT not found
    The fix is to remove the files from /System/Library/Java/Extensions:
       sudo rm /System/Library/Java/Extensions/{*J3D*,*j3d*}
    WARNING: Sadly, El Capitan has a new feature called
    System Integrity Protection (SIP), that prevents root from removing files.
    So to remove these files, you will need to reboot into recovery mode,
    disable SIP, reboot, remove the files and reboot again to enable SIP:

    1. Reboot by restarting and holding down Command+R until the Apple logo appears
    2. Click on Utilities -> Terminals and run:
          csrutil disable
    3. Reboot
    4. Login, start a terminal, run:
          sudo rm /System/Library/Java/Extensions/{*J3D*,*j3d*}
    5. Reconfigure and build: (cd $PTII;./configure; ant build build-bin)
       Note that you have not yet done so, you will need to install Jogl.
    6. Verify that Java3D runs:
          $PTII/bin/vergil ptolemy/domains/gr/demo/Pendulum/Pendulum.xml
    7. Reboot by restarting and holding down Command+R until the Apple logo appears
    8. Click on Utilities -> Terminals and run:
          csrutil enable
    9. Reboot

    For details, see
    https://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Java3D" >&5
$as_echo "$as_me: WARNING: /System/Library/Java/Extensions/j3dcore.jar exists.

    Under Mac OS X 10.9 (Mavericks) and later with Java 1.8, Java 3D
    will probably not work if
    /System/Library/Java/Extensions/j3dcore.jar and other files exist.
    Instead, Ptolemy II uses a version of Java 3D in
    $PTII/vendors/j3d.  If you run Ptolemy with the version of Java3D
    installed in /System/Library/Java/Extensions, the the demo will
    fail to render the 3D viewer and you may see messages like:
       JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
       AWT not found
    The fix is to remove the files from /System/Library/Java/Extensions:
       sudo rm /System/Library/Java/Extensions/{*J3D*,*j3d*}
    WARNING: Sadly, El Capitan has a new feature called
    System Integrity Protection (SIP), that prevents root from removing files.
    So to remove these files, you will need to reboot into recovery mode,
    disable SIP, reboot, remove the files and reboot again to enable SIP:

    1. Reboot by restarting and holding down Command+R until the Apple logo appears
    2. Click on Utilities -> Terminals and run:
          csrutil disable
    3. Reboot
    4. Login, start a terminal, run:
          sudo rm /System/Library/Java/Extensions/{*J3D*,*j3d*}
    5. Reconfigure and build: (cd $PTII;./configure; ant build build-bin)
       Note that you have not yet done so, you will need to install Jogl.
    6. Verify that Java3D runs:
          $PTII/bin/vergil ptolemy/domains/gr/demo/Pendulum/Pendulum.xml
    7. Reboot by restarting and holding down Command+R until the Apple logo appears
    8. Click on Utilities -> Terminals and run:
          csrutil enable
    9. Reboot

    For details, see
    https://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Java3D" >&2;}
            fi


    else
	Java3DClasspath="$tmpClasspath"
    fi

    # We need to run javac in the config directory so that javac from jdk1.1.6
    # under NT and cygwin works properly
    startdir=$PTII
    cd "$srcdir/config"
    # Don't use 'env $JAVAC . . .' here, it will not work under Cygwin
    if "$JAVAC" -classpath "$Java3DClasspath" java3dTest.java ; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $Java3DClasspath" >&5
$as_echo "$Java3DClasspath" >&6; }; fi

	if test "`uname -s`" = "Darwin"; then
 	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Jogl" >&5
$as_echo_n "checking for Jogl... " >&6; }

# Check whether --with-jogl was given.
if test "${with_jogl+set}" = set; then :
  withval=$with_jogl; JOGL_DIR=$withval
else
  JOGL_DIR=$PTII/vendors/jogl
fi


	    if test -d "$JOGL_DIR" ; then
                directory=`ls -d $PTII/vendors/jogl/lib`
                if test -d "$directory"; then
       	            JOGL_JAR_DIR="$directory"
		    PTJOGL_DIR=`dirname $JOGL_JAR_DIR`
                fi
		if test -f "$JOGL_JAR_DIR/Darwin/jogamp-fat.jar" ; then
		     if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOGL_JAR_DIR/Darwin/jogamp-fat.jar" >&5
$as_echo "$JOGL_JAR_DIR/Darwin/jogamp-fat.jar" >&6; }; fi
		    JAVA3D_JARS="$JAVA3D_JARS${CLASSPATHSEPARATOR}$JOGL_JAR_DIR/Darwin/jogamp-fat.jar"
		    updateClasspath "$JOGL_JAR_DIR/Darwin/jogamp-fat.jar"
		else
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find the Jogl directory.
   This could be problem at runtime for Mac OS X with Java 3D.

   See http://forum.jogamp.org/Crash-on-Macos-using-Java-9-td4038267.html
   To install,
       mkdir -p $PTII/vendors/jogl/lib
       cd $PTI/vendors/jogl/lib
       wget http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/jogamp-fat.jar

       mkdir natives
       wget -m -np http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/natives/macosx-universal
       mv show.docjava.com/book/cgij/code/jnlp/libs/jogl/natives/macosx-universal/ natives

       cd $PTII
       ./configure

       " >&5
$as_echo "$as_me: WARNING: Could not find the Jogl directory.
   This could be problem at runtime for Mac OS X with Java 3D.

   See http://forum.jogamp.org/Crash-on-Macos-using-Java-9-td4038267.html
   To install,
       mkdir -p $PTII/vendors/jogl/lib
       cd $PTI/vendors/jogl/lib
       wget http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/jogamp-fat.jar

       mkdir natives
       wget -m -np http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/natives/macosx-universal
       mv show.docjava.com/book/cgij/code/jnlp/libs/jogl/natives/macosx-universal/ natives

       cd $PTII
       ./configure

       " >&2;}

               fi
           fi
       fi

	if test "`uname -s`" = "Linux"; then
 	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Jogl" >&5
$as_echo_n "checking for Jogl... " >&6; }

# Check whether --with-jogl was given.
if test "${with_jogl+set}" = set; then :
  withval=$with_jogl; JOGL_DIR=$withval
else
  JOGL_DIR=$PTII/vendors/jogl
fi


	    if test -d "$JOGL_DIR" ; then
                JOGL_JAR_DIR="$JOGL_DIR"
    	        #PTJOGL_DIR is used in ptinvoke.in to set the Mac DYLD_LIBRARY_PATH
		#PTJOGL_DIR=`dirname $JOGL_JAR_DIR`

		jars=`ls -d $JOGL_DIR/lib/Linux/*.jar`
		for jar in $jars
		do
		     if test -f "$jar" ; then
		         if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jar" >&5
$as_echo "$jar" >&6; }; fi
		         JAVA3D_JARS="$JAVA3D_JARS${CLASSPATHSEPARATOR}$jar"
		         updateClasspath "$jar"
                     fi
		done

		jars=`ls -d $JOGL_DIR/lib/natives/linux-amd64/*.jar`
		for jar in $jars
		do
		     if test -f "$jar" ; then
		         if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jar" >&5
$as_echo "$jar" >&6; }; fi
		         JAVA3D_JARS="$JAVA3D_JARS${CLASSPATHSEPARATOR}$jar"
		         updateClasspath "$jar"
                     fi
		done
             fi

	     if test -z "$JOGL_JAR_DIR"; then
	         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find the Jogl directory.
   This could be a problem under Linux and JDK 9 or 10 and later

   To install,
       mkdir -p $PTII/vendors/jogl/lib/natives/linux-amd64
       cd $PTII/vendors/jogl/lib/natives/linux-amd64
       wget https://jogamp.org/deployment/v2.3.2/jar/jogl-all-natives-linux-amd64.jar
       wget https://jogamp.org/deployment/v2.3.2/jar/gluegen-rt-natives-linux-amd64.jar

       cd $PTII
       ./configure

       " >&5
$as_echo "$as_me: WARNING: Could not find the Jogl directory.
   This could be a problem under Linux and JDK 9 or 10 and later

   To install,
       mkdir -p $PTII/vendors/jogl/lib/natives/linux-amd64
       cd $PTII/vendors/jogl/lib/natives/linux-amd64
       wget https://jogamp.org/deployment/v2.3.2/jar/jogl-all-natives-linux-amd64.jar
       wget https://jogamp.org/deployment/v2.3.2/jar/gluegen-rt-natives-linux-amd64.jar

       cd $PTII
       ./configure

       " >&2;}

             fi
       fi

       PTJAVA3D_DIR=gr
       PTGRDOMAIN_JAR=gr/gr.jar
       PTGRDOMAIN_JAR_FULL=ptolemy/domains/gr/gr.jar
       # PTGR_PACKAGES is used in ptII/doc/makefile
       PTGR_PACKAGES="ptolemy.domains.gr.kernel ptolemy.domains.gr.lib"
    else
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVAC\" -classpath \"$Java3DClasspath\" java3dTest.java' failed.
    Java 3D may be found at http://www.oracle.com/technetwork/java/javase/overview/index-jsp-138252.html
    Java 3D is only needed if you want to build in
    $JAVA3D_USER_DIR,
    otherwise the build will proceed fine without Java 3D.
    Configure looks for jar files in $PTII/vendors/j3d/*/lib/ext/.
    If your Java 3D installation is in a non-standard place, use  --with-java3d=DIR
    where DIR contains j3dcore.jar, j3dutils.jar and vecmath.jar, for example:
    ./configure --with-java3D=/usr/java/j3d-1_5_2-linux-amd64/lib/ext
    Under Mac OS X" >&5
$as_echo "$as_me: WARNING: '\"$JAVAC\" -classpath \"$Java3DClasspath\" java3dTest.java' failed.
    Java 3D may be found at http://www.oracle.com/technetwork/java/javase/overview/index-jsp-138252.html
    Java 3D is only needed if you want to build in
    $JAVA3D_USER_DIR,
    otherwise the build will proceed fine without Java 3D.
    Configure looks for jar files in $PTII/vendors/j3d/*/lib/ext/.
    If your Java 3D installation is in a non-standard place, use  --with-java3d=DIR
    where DIR contains j3dcore.jar, j3dutils.jar and vecmath.jar, for example:
    ./configure --with-java3D=/usr/java/j3d-1_5_2-linux-amd64/lib/ext
    Under Mac OS X" >&2;}

    fi

    cd "$startdir"
fi

if test -z "$PTJAVA3D_DIR"; then
    updateExcludes "ptolemy/domains/gr/"
fi

#--------------------------------------------------------------------
#       Jini is connection technology from Sun, see http://www.jini.org
#       See if there was a command-line option for where Jini is
#       If not, look in $PTII/lib
#--------------------------------------------------------------------

# We only need to look for jini if the distributed directory is present
JINI_USER_DIR="$PTII/ptolemy/distributed"
JINI_PRESENT=no
# PTDISTRIBUTED_DIR is set to distributed and used in
# $PTII/ptolemy/makefile if jini was found.
PTDISTRIBUTED_DIR=
if test ! -d "$JINI_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JINI_USER_DIR is not present,
    so we need not find Jini." >&5
$as_echo "$JINI_USER_DIR is not present,
    so we need not find Jini." >&6; }; fi
    # We don't use JINI_VERSION here so that we don't expand PTII
    # in the makefile
    JINI_DIR='$PTII/ptolemy/distributed/jini'
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jini directory" >&5
$as_echo_n "checking for jini directory... " >&6; }

# Check whether --with-jini was given.
if test "${with_jini+set}" = set; then :
  withval=$with_jini; JINI_DIR=$withval
else
  JINI_DIR=$PTII/ptolemy/distributed/jini
fi


    JINI_JARS="jini-core.jar jini-ext.jar sun-util.jar"

    if test -d "$JINI_DIR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JINI_DIR" >&5
$as_echo "$JINI_DIR" >&6; }; fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jars used by jini" >&5
$as_echo_n "checking for jars used by jini... " >&6; }
	JINI_PRESENT=yes
	jinijarpath=
	for jar in $JINI_JARS
	do
	    if test "${PTVERBOSE:-none}" = "none"; then
	        $PT_ECHO $ECHO_N "."
	    else
                $PT_ECHO $ECHO_N "$jar "
            fi
	    jarpath=`$FIND "$JINI_DIR" -name $jar | head -1`
   	    if test -f "$jarpath"; then
  	        jinijarpath="$jinijarpath$CLASSPATHSEPARATOR$jarpath"
		# FIXME: we should not be adding to ECLIPSE_CLASSPATHENTRY_LIBS
		# unless we are sure that we can find all the jars
                updateClasspath "$jarpath"
 	    else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $jar in $JINI_DIR: $jarpath" >&5
$as_echo "$as_me: WARNING: Failed to find $jar in $JINI_DIR: $jarpath" >&2;}
	        jinijarpath=
		break
	    fi
        done
	if test ! -z "$jinijarpath"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
	    JINI_PRESENT="yes"
	    # PTDISTRIBUTED_DIR is set to distributed and used in
	    # $PTII/ptolemy/makefile if jini was found
	    PTDISTRIBUTED_DIR=distributed
   	    # PTDISTRIBUTED_PACKAGES is used in ptII/doc/makefile
	    PTDISTRIBUTED_PACKAGES="ptolemy.distributed.actor.lib ptolemy.distributed.actor ptolemy.distributed.client ptolemy.distributed.common ptolemy.distributed.domains.sdf.kernel ptolemy.distributed.rmi ptolemy.distributed.util"
	    PTDISTRIBUTED_JARS=$jinijarpath
        fi
    else
	JINI_DIR='$PTII/vendors/sun/jini/$JINI_VERSION'
    fi

    if test "$JINI_PRESENT" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Perhaps Jini is not installed?
    You need not download Jini unless you plan on use the
    distributed Ptolemy feature in ptolemy/distributed.
    Jini can be downloaded from http://www.jini.org, the
    $JINI_JARS copied to
    \$PTII/ptolemy/distributed/jini/jars
    and configure rerun." >&5
$as_echo "$as_me: WARNING: Perhaps Jini is not installed?
    You need not download Jini unless you plan on use the
    distributed Ptolemy feature in ptolemy/distributed.
    Jini can be downloaded from http://www.jini.org, the
    $JINI_JARS copied to
    \$PTII/ptolemy/distributed/jini/jars
    and configure rerun." >&2;}
    fi

fi



#--------------------------------------------------------------------
#       Java Native Interface (JNI)
#       Ptolemy II can interface to user provided native code using JNI
#	Ptolemy II can interface to Matlab using JNI
#--------------------------------------------------------------------
# Set to jni if we can compile Java Native Interface code and used in ptolemy/actor/lib/fmi/makefile
PTJNI_DIR=

if test ! -d "$PTII/ptolemy/matlab/" -a ! -d "$PTII/lbnl/lib/matlab/" ; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/matlab and $PTII/lbnl/lib/matlab are not present,
    so we need not find gcc or cc." >&5
$as_echo "$PTII/ptolemy/matlab and $PTII/lbnl/lib/matlab are not present,
    so we need not find gcc or cc." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper JNI architecture" >&5
$as_echo_n "checking for the proper JNI architecture... " >&6; }
    case "`uname -s`" in
        CYGWIN_*) PTJNI_ARCHITECTURE=win32;;
	Linux) PTJNI_ARCHITECTURE=linux;;
	SunOS) PTJNI_ARCHITECTURE=solaris;;
	Darwin) PTJNI_ARCHITECTURE=darwin;;
	*) PTJNI_ARCHITECTURE=unknown;;
    esac

    case "`uname -s`" in
        CYGWIN_*)
            for ac_prog in mingw32-gcc i686-pc-mingw32-gcc x86_64-w64-mingw32-gcc.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCCJNI+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCCJNI in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCCJNI="$PTCCJNI" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCCJNI="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCCJNI=$ac_cv_path_PTCCJNI
if test -n "$PTCCJNI"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCCJNI" >&5
$as_echo "$PTCCJNI" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$PTCCJNI" && break
done

	    if test "${PTCCJNI:-none}" = "none"; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find mingw32-gcc, i686-pc-mingw32-gcc or x86_64-w64-mingw32-gcc.exe.
    Under Windows, Mingw or VisualStudio are required to create shared
    libraries that work with Java.
    Cygwin gcc will compile the dll, but it will not run.  To install
    Mingw, see http://www.mingw.org or
    http://ptolemy.org/ptolemyII/ptIIlatest/cygwin.htm" >&5
$as_echo "$as_me: WARNING: Failed to find mingw32-gcc, i686-pc-mingw32-gcc or x86_64-w64-mingw32-gcc.exe.
    Under Windows, Mingw or VisualStudio are required to create shared
    libraries that work with Java.
    Cygwin gcc will compile the dll, but it will not run.  To install
    Mingw, see http://www.mingw.org or
    http://ptolemy.org/ptolemyII/ptIIlatest/cygwin.htm" >&2;}
            fi;;
        *) # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCCJNI+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCCJNI in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCCJNI="$PTCCJNI" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCCJNI="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCCJNI=$ac_cv_path_PTCCJNI
if test -n "$PTCCJNI"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCCJNI" >&5
$as_echo "$PTCCJNI" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	   if test "${PTCCJNI:-none}" != "none"; then
               # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCCJNI+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCCJNI in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCCJNI="$PTCCJNI" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCCJNI="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCCJNI=$ac_cv_path_PTCCJNI
if test -n "$PTCCJNI"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCCJNI" >&5
$as_echo "$PTCCJNI" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


           else
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc or cc, so we will
    not be able to compile the JNI interface in $PTII/jni" >&5
$as_echo "$as_me: WARNING: Failed to find gcc or cc, so we will
    not be able to compile the JNI interface in $PTII/jni" >&2;};
           fi
           ;;
    esac

    # Extract the first word of "javah", so it can be a program name with args.
set dummy javah; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVAH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVAH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
JAVAH=$ac_cv_path_JAVAH
if test -n "$JAVAH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
$as_echo "$JAVAH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    # Under MacOS X, JAVAH might be a link
    if test ! -e "$JAVAH"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  Failed to find javah at '$JAVAH', perhaps Java is not installed?" >&5
$as_echo "$as_me: WARNING:  Failed to find javah at '$JAVAH', perhaps Java is not installed?" >&2;}
    fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the cc for JNI" >&5
$as_echo_n "checking for the cc for JNI... " >&6; }
    if test "${PTCCJNI:-none}" != "none"; then
        # PT_MSG_RESULT([$PTJNICC])
        PTJNI_DIR=jni

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for that the pieces for JNI have been found" >&5
$as_echo_n "checking for that the pieces for JNI have been found... " >&6; }
        if test ! -z $PTJNI_DIR; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_ARCHITECTURE'" >&5
$as_echo "'$PTJNI_ARCHITECTURE'" >&6; }; fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper JNI architecture include directory" >&5
$as_echo_n "checking for the proper JNI architecture include directory... " >&6; }
       	    if test $PTJNI_ARCHITECTURE = "darwin"; then
	        if test -f "$PTJAVA_HOME/../Headers/jni.h"; then
		    PTJNI_INCLUDE="$PTJAVA_HOME/../Headers"
                else
		    if test -f "$PTJAVA_HOME/../include/jni.h"; then
		       # Java 1.7.0_04-ea
		       PTJNI_INCLUDE="$PTJAVA_HOME/../include"
                    else
	                if test -f "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h"; then
		            PTJNI_INCLUDE="/System/Library/Frameworks/JavaVM.framework/Headers"
                        else
		            APPLE_JNI_PROBLEM="$PTJAVA_HOME/{Headers,include}/jni.h not found.
    Apple made a poor decision when shipping Java 1.6
    and decided to *not* to include jni.h in the 1.6 installation, even though they
    include javah, which generates a .h that includes jni.h.
    http://developer.apple.com/library/mac/#releasenotes/Java/JavaSnowLeopardUpdate3LeopardUpdate8RN/Introduction/Introduction.html says:
       If you do JNI development, you must install the Java Developer
       package, since it contains updated headers for the native
       JavaVM.framework and its sub-frameworks (8421130). The Java
       Developer package is available from http://connect.apple.com."
		            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $APPLE_JNI_PROBLEM" >&5
$as_echo "$as_me: WARNING: $APPLE_JNI_PROBLEM" >&2;}
                        fi
                     fi
                fi
	    else
		PTJNI_INCLUDE="$PTJAVA_HOME/../include"
	    fi

	    if test ! -d "$PTJNI_INCLUDE"; then
	    	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $PTJNI_INCLUDE was not found.  As a result, compilation of JNI actors will fail." >&5
$as_echo "$as_me: WARNING: $PTJNI_INCLUDE was not found.  As a result, compilation of JNI actors will fail." >&2;}
	    else
	    	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTJNI_INCLUDE" >&5
$as_echo "$PTJNI_INCLUDE" >&6; }; fi
            fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper JNI library architecture" >&5
$as_echo_n "checking for the proper JNI library architecture... " >&6; }
            case "`uname -p`" in
	        *86) PTJNI_LIB_ARCHITECTURE=i386;;
	        sparc) PTJNI_LIB_ARCHITECTURE=sparc;;
	        unknown) # Some platforms do not properly implement uname -p
                     if test $PTJNI_ARCHITECTURE = "win32" -o $PTJNI_ARCHITECTURE = "linux"; then
		         PTJNI_LIB_ARCHITECTURE=i386
		     else
		         PTJNI_LIB_ARCHITECTURE=unknown
		     fi
                     ;;
	        x86_64) PTJNI_LIB_ARCHITECTURE=amd64;;
	        *) PTJNI_LIB_ARCHITECTURE=unknown;;
            esac

            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_LIB_ARCHITECTURE'" >&5
$as_echo "'$PTJNI_LIB_ARCHITECTURE'" >&6; }; fi




            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if the -mno-cygwin flag is available" >&5
$as_echo_n "checking for if the -mno-cygwin flag is available... " >&6; }
            case "`uname -s`" in
                CYGWIN_ME-*) PTJNI_NO_CYGWIN=-mno-cygwin;;
	        CYGWIN_NT-*) PTJNI_NO_CYGWIN=-mno-cygwin;;
	        CYGWIN_98-*) PTJNI_NO_CYGWIN=-mno-cygwin;;
	        *) PTJNI_NO_CYGWIN=;;
            esac
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_NO_CYGWIN'" >&5
$as_echo "'$PTJNI_NO_CYGWIN'" >&6; }; fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper shared library gcc flag" >&5
$as_echo_n "checking for the proper shared library gcc flag... " >&6; }
            case "`uname -s`" in
	        Darwin) PTJNI_GCC_SHARED_FLAG=-dynamiclib;;
	        *) PTJNI_GCC_SHARED_FLAG=-shared;
            esac
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_GCC_SHARED_FLAG'" >&5
$as_echo "'$PTJNI_GCC_SHARED_FLAG'" >&6; }; fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper shared library cc flag" >&5
$as_echo_n "checking for the proper shared library cc flag... " >&6; }
	    # Under Cygwin with gcc, we need -D__int64="long long"
	    # FIXME: we should have a test for this instead of setting it explictly
            case "`uname -s`" in
                CYGWIN_*) PTJNI_SHAREDLIBRARY_CFLAG="-D__int64=\"long long\"";;
	        Linux)	 PTJNI_SHAREDLIBRARY_CFLAG=-fPIC;;
	        SunOS)	 PTJNI_SHAREDLIBRARY_CFLAG=-fPIC;;
	        *) PTJNI_SHAREDLIBRARY_CFLAG=;;
            esac
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_SHAREDLIBRARY_CFLAG'" >&5
$as_echo "'$PTJNI_SHAREDLIBRARY_CFLAG'" >&6; }; fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper shared library link flag" >&5
$as_echo_n "checking for the proper shared library link flag... " >&6; }
            case "`uname -s`" in
                CYGWIN_*) PTJNI_SHAREDLIBRARY_LDFLAG=-Wl,--add-stdcall-alias;;
		Darwin)  if test "`uname -m`" = "x86_64"; then
		             PTJNI_SHAREDLIBRARY_LDFLAG=-m64
			 fi;;
	        Linux)	 PTJNI_SHAREDLIBRARY_LDFLAG=-fPIC;;
	        SunOS)	 PTJNI_SHAREDLIBRARY_LDFLAG=-fPIC;;
	        *) PTJNI_SHAREDLIBRARY_LDFLAG=;;
            esac
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_SHAREDLIBRARY_LDFLAG'" >&5
$as_echo "'$PTJNI_SHAREDLIBRARY_LDFLAG'" >&6; }; fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper shared library prefix" >&5
$as_echo_n "checking for the proper shared library prefix... " >&6; }
            case "`uname -s`" in
                CYGWIN_ME-*) PTJNI_SHAREDLIBRARY_PREFIX=;;
	        CYGWIN_NT-*) PTJNI_SHAREDLIBRARY_PREFIX=;;
	        CYGWIN_98-*) PTJNI_SHAREDLIBRARY_PREFIX=;;
	        SunOS)	 PTJNI_SHAREDLIBRARY_PREFIX=lib;;
	        *) PTJNI_SHAREDLIBRARY_PREFIX=lib;;
            esac
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_SHAREDLIBRARY_PREFIX'" >&5
$as_echo "'$PTJNI_SHAREDLIBRARY_PREFIX'" >&6; }; fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the proper shared library suffix" >&5
$as_echo_n "checking for the proper shared library suffix... " >&6; }
	    # PTJNI_SHAREDLIBRARY_SUFFIX2 can use glob wildcards like *
	    PTJNI_SHAREDLIBRARY_SUFFIX2=""
            case "`uname -s`" in
                CYGWIN_*)    PTJNI_SHAREDLIBRARY_SUFFIX=dll
	    		     PTJNI_SHAREDLIBRARY_SUFFIX2=dll.a;;
	        SunOS)	     PTJNI_SHAREDLIBRARY_SUFFIX=so;;
	        Linux)       PTJNI_SHAREDLIBRARY_SUFFIX=so
			     PTJNI_SHAREDLIBRARY_SUFFIX2=so.*;;
	        Darwin)      PTJNI_SHAREDLIBRARY_SUFFIX=jnilib
	    	  	     PTJNI_SHAREDLIBRARY_SUFFIX2=dylib;;
	        *) PTJNI_SHAREDLIBRARY_SUFFIX=unknown
            esac
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_SHAREDLIBRARY_SUFFIX'" >&5
$as_echo "'$PTJNI_SHAREDLIBRARY_SUFFIX'" >&6; }; fi

            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI libraries needed to link JNI" >&5
$as_echo_n "checking for JNI libraries needed to link JNI... " >&6; }
            PTJNI_DL_LIBRARY=
            case "`uname -s`" in
	        CYGWIN_*) PTJNI_LIBRARIES=-lcygwin;;
	        Linux)    PTJNI_LIBRARIES=
	                  PTJNI_DL_LIBRARY=-ldl;;
	        *)        PTJNI_LIBRARIES=;;
            esac
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$PTJNI_LIBRARIES'" >&5
$as_echo "'$PTJNI_LIBRARIES'" >&6; }; fi
        fi
    fi
fi

#--------------------------------------------------------------------
#      	Jode is a java decompiler.  It is useful for looking at the contents
#       of class files.  It can be downloaded from
#	http://jode.sourceforge.net/download.php
#	Jode is full GPL, so we can't distribute it without making Ptolemy
#	GPL'd as well.
#--------------------------------------------------------------------

# PTJODE_DIR is set to jode and used in
# $PTII/ptolemy/apps/makefile if jode was found
#PTJODE_DIR=

# Note that we don't substitute in the ${PTII} or $(JODE_DIR) here
# Defaults for ptII.mk and bin/ptinvoke.in
# Use {} here instead of () because bin/ptinvoke uses JODE_DIR and JODE_CLASSES
# and under /bin/sh $(FOO) does not work, but ${FOO} does
JODE_DIR='${PTII}/vendors/jode/1.1.2-pre1'
JODE_CLASSES='${JODE_DIR}/jode.jar'

# We only need to look for jode if $PTII/ptolemy/apps/jode exists
if test ! -d "$PTII/vendors/jode"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/vendors/jode is not present,
    so we need not find Jode, which is a java disassembler." >&5
$as_echo "$PTII/vendors/jode is not present,
    so we need not find Jode, which is a java disassembler." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jode directory" >&5
$as_echo_n "checking for jode directory... " >&6; }

# Check whether --with-jode was given.
if test "${with_jode+set}" = set; then :
  withval=$with_jode; JODE_DIR=$withval
else
  JODE_DIR=$PTII/vendors/jode/1.1.2-pre1
fi


    if test -d "$JODE_DIR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JODE_DIR" >&5
$as_echo "$JODE_DIR" >&6; }; fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$JODE_DIR/jode.jar" >&5
$as_echo_n "checking for \$JODE_DIR/jode.jar... " >&6; }
	if test -f "$JODE_DIR/jode.jar"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JODE_DIR/jode.jar" >&5
$as_echo "$JODE_DIR/jode.jar" >&6; }; fi
	    JODE_CLASSES=$JODE_DIR/jode.jar
        else
	    JODE_CLASSES=no
        fi
    fi

    if test "$JODE_CLASSES" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find jode/jode.jar
    perhaps Jode is not installed?
    Jode is used to disassemble Java .class files and is only necessary
    if you plan on debugging the byte code based code generator.
    Jode can be downloaded from http://jode.sourceforge.net/download.php" >&5
$as_echo "$as_me: WARNING: Failed to find jode/jode.jar
    perhaps Jode is not installed?
    Jode is used to disassemble Java .class files and is only necessary
    if you plan on debugging the byte code based code generator.
    Jode can be downloaded from http://jode.sourceforge.net/download.php" >&2;}
	# Note that we don't substitute in the ${PTII} or $(JODE_DIR) here
	JODE_DIR='${PTII}/vendors/jode/1.1.2-pre1'
   	JODE_CLASSES='${JODE_DIR}/jode.jar'
    #else
	# Set to jode and used in
	# $PTII/ptolemy/apps/makefile if jode was found
	#PTJODE_DIR=jode
    fi
fi

#--------------------------------------------------------------------
#      	The JavaScript Object Notation (JSON) package.
#	JSON can be downloaded from http://www.json.org
#	JSON is used by ptolemy/actor/lib/conversions/json/ and ptolemy/cg/syntactic
#--------------------------------------------------------------------

# PTJSON_DIR is set to json and used in
# ptolemy/actor/lib/conversions/json/ and $PTII/ptolemy/cg/lib/syntatic if json was found
PTJSON_DIR=

# Note that we don't substitute in the ${PTII} or $(JSON_DIR) here
# Defaults for ptII.mk and bin/ptinvoke.in
# Use {} here instead of () because bin/ptinvoke uses JSON_DIR and JSON_CLASSES
# and under /bin/sh $(FOO) does not work, but ${FOO} does
#JSON_DIR='${PTII}/vendors/jode/1.1.2-pre1'
#JSON_CLASSES='${JSON_DIR}/jode.jar'

# We only need to look for jode if either of these directories exists:
JSON_USER_DIR1="$PTII/ptolemy/actor/lib/conversions/json"
JSON_USER_DIR2="$PTII/ptolemy/actor/lib/jjs"

if test ! -d "$JSON_USER_DIR1" -a ! -d "$JSON_USER_DIR2"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JSON_USER_DIR1 and $JSON_USER_DIR2 are not present,
    so we need not find JSON, the JavaScript Object Notation package." >&5
$as_echo "$JSON_USER_DIR1 and $JSON_USER_DIR2 are not present,
    so we need not find JSON, the JavaScript Object Notation package." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json directory" >&5
$as_echo_n "checking for json directory... " >&6; }

# Check whether --with-jode was given.
if test "${with_jode+set}" = set; then :
  withval=$with_jode; JSON_DIR=$withval
else
  JSON_DIR=$PTII/org/json
fi


    if test -d "$JSON_DIR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JSON_DIR" >&5
$as_echo "$JSON_DIR" >&6; }; fi
	# Used in org/makefile
	PTJSON_DIR=json
	PTJSON_JAR=actor/lib/conversions/json/json.jar
        if test "$PRE_JDK18" = "yes" ; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ptolemy.vergil.basic.imprt.accessor requires Java 1.8 or later" >&5
$as_echo "$as_me: WARNING: ptolemy.vergil.basic.imprt.accessor requires Java 1.8 or later" >&2;}
            updateExcludes "ptolemy.vergil.basic.imprt.accessor"
	    # Used in doc/makefile
	    PTJSON_PACKAGES="org.json ptolemy.actor.lib.conversions.json"
        else
	    # Used in doc/makefile
	    PTJSON_PACKAGES="org.json ptolemy.actor.lib.conversions.json ptolemy.vergil.basic.imprt.accessor"
        fi
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTII/org/json/
    perhaps JSON is not installed?
    JSON is the JavaScript Object Notation package used by the accessors
    work.  You need only have JSON if you plan on using Accessors." >&5
$as_echo "$as_me: WARNING: Failed to find $PTII/org/json/
    perhaps JSON is not installed?
    JSON is the JavaScript Object Notation package used by the accessors
    work.  You need only have JSON if you plan on using Accessors." >&2;}
        updateExcludes "org.json"
        updateExcludes "ptolemy.actor.lib.conversions.json"

	# JavaScript imports
	# ptolemy.actor.lib.conversions.TokenToJSON, so if we don't
	# have org.json, we don't have accessors.

	updateExcludes "ptolemy.actor.lib.jjs"
	updateExcludes" org.terraswarm.accessor"
        updateExcludes "ptolemy.vergil.basic.imprt.accessor"
    fi
fi

#--------------------------------------------------------------------
#       KVM is the JDK for PalmOS
#	See if there was a command-line option for where
#       j2me_cldc/bin/api/classes is;  if not,
#       check to see if $PTII/vendors/sun/j2me_cldc exists
#--------------------------------------------------------------------

# PTKVM_DIR is set to kvm and used in
# $PTII/ptolemy/makefile if kvm was found
PTKVM_DIR=
#
# We only need to look for kvm if $PTII/ptolemy/apps/kvm exists
if test ! -d "$PTII/ptolemy/apps/kvm"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/apps/kvm is not present,
    so we need not find the PalmOS kvm." >&5
$as_echo "$PTII/ptolemy/apps/kvm is not present,
    so we need not find the PalmOS kvm." >&6; }; fi
    KVM_DIR='${PTII}/vendors/sun/j2me_cldc'
    # Unfortunately, j2me_cldc does not ship with a jar of zip file
    # It needs to be built
    KVM_CLASSES='$(KVM_DIR)/bin/api/classes'
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm directory" >&5
$as_echo_n "checking for kvm directory... " >&6; }

# Check whether --with-kvm was given.
if test "${with_kvm+set}" = set; then :
  withval=$with_kvm; KVM_DIR=$withval
else
  KVM_DIR=$PTII/vendors/sun/j2me_cldc
fi


    if test -d "$KVM_DIR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KVM_DIR" >&5
$as_echo "$KVM_DIR" >&6; }; fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$KVM_DIR/bin/api/classes" >&5
$as_echo_n "checking for \$KVM_DIR/bin/api/classes... " >&6; }
	if test -d "$KVM_DIR/bin/api/classes"; then
	    KVM_CLASSES='$(KVM_DIR)/bin/api/classes'
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KVM_CLASSES" >&5
$as_echo "$KVM_CLASSES" >&6; }; fi
        else
	    KVM_CLASSES=no
        fi
    else
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found in $KVM_DIR" >&5
$as_echo "Not found in $KVM_DIR" >&6; }; fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm directory in /j2me_cldc" >&5
$as_echo_n "checking for kvm directory in /j2me_cldc... " >&6; }
	# Likely place for kvm under windows
	KVM_DIR=/j2me_cldc
        if test -d "$KVM_DIR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KVM_DIR" >&5
$as_echo "$KVM_DIR" >&6; }; fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$KVM_DIR/bin/api/classes" >&5
$as_echo_n "checking for \$KVM_DIR/bin/api/classes... " >&6; }
	    if test -d "$KVM_DIR/bin/api/classes"; then
	        KVM_CLASSES='$(KVM_DIR)/bin/api/classes'
	        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KVM_CLASSES" >&5
$as_echo "$KVM_CLASSES" >&6; }; fi
            else
	        KVM_CLASSES=no
            fi
        else
		KVM_CLASSES=no
        fi

    fi
    if test "$KVM_CLASSES" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find j2me_cldc/bin/api/classes,
    perhaps Kvm is not installed?
    You need not download Kvm unless you plan on building applications
    for the Palm Pilot or Handspring Visor.
    Kvm can be downloaded from http://java.sun.com/products/cldc" >&5
$as_echo "$as_me: WARNING: Failed to find j2me_cldc/bin/api/classes,
    perhaps Kvm is not installed?
    You need not download Kvm unless you plan on building applications
    for the Palm Pilot or Handspring Visor.
    Kvm can be downloaded from http://java.sun.com/products/cldc" >&2;}
	# Note that we don't substitute in the ${PTII} or $(KVM_DIR) here
	KVM_DIR='${PTII}/vendors/sun/kvm'
   	KVM_CLASSES='$(KVM_DIR)/bin/api/classes'
    else
	# Set to kvm and used in
	# $PTII/ptolemy/makefile if kvm was found
	PTKVM_DIR=kvm
    fi
fi

#--------------------------------------------------------------------
#       MATLAB Interface
#       check to see if matlab is in the user's path
#--------------------------------------------------------------------
# PTMATLAB_DIR is set to matlab and used in $PTII/ptolemy/makefile
# if matlab and gcc are found; PTMATLAB_LIBDIR is then also set to
# the platform-dependent directory containg Matlab's engine libraries
PTMATLAB_DIR=
PTMATLAB_LIBDIR=

# Extension for matlab .mex files, for example "mexmaci64"
PTMATLAB_MEXEXT=

PTMATLAB_SUPPORTED=no

case "`uname -s`" in
Darwin)
	if test -f "$PTJNI_INCLUDE/jni.h"; then
	    PTMATLAB_SUPPORTED=yes
        else
	    if test  -d "$PTII/ptolemy/matlab/" -o -d "$PTII/lbnl/lib/matlab/" ; then
	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $APPLE_JNI_PROBLEM" >&5
$as_echo "$as_me: WARNING: $APPLE_JNI_PROBLEM" >&2;}
            fi
        fi
	;;
Linux)
	PTMATLAB_SUPPORTED=yes
	;;
CYGWIN*)
	PTMATLAB_SUPPORTED=yes
	;;
SunOS*)
	PTMATLAB_SUPPORTED=yes
	;;
esac


if test "$PTMATLAB_SUPPORTED" = "no"; then
    if test ! -d "$PTII/ptolemy/matlab/" -a ! -d "$PTII/lbnl/lib/matlab/" ; then
        if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/matlab and $PTII/lbnl/lib/matlab are not present,
    so we need not find matlab." >&5
$as_echo "$PTII/ptolemy/matlab and $PTII/lbnl/lib/matlab are not present,
    so we need not find matlab." >&6; }; fi
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The Matlab interface is not supported on this platform (you are running \`uname -s\`)." >&5
$as_echo "$as_me: WARNING: The Matlab interface is not supported on this platform (you are running \`uname -s\`)." >&2;}
    fi
else
    # We only need to look for matlab if $PTII/ptolemy/matlab exists
    if test ! -d "$PTII/ptolemy/matlab"; then
	if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/matlab is not present,
    so we need not find matlab and gcc." >&5
$as_echo "$PTII/ptolemy/matlab is not present,
    so we need not find matlab and gcc." >&6; }; fi
	MATLAB_DIR=/matlab
	#PTCC=gcc
    else
	# Extract the first word of "matlab", so it can be a program name with args.
set dummy matlab; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MATLAB+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $MATLAB in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MATLAB="$MATLAB" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_MATLAB="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MATLAB=$ac_cv_path_MATLAB
if test -n "$MATLAB"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MATLAB" >&5
$as_echo "$MATLAB" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


	if test "${MATLAB:-none}" = "none"; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find matlab executable in the path.
    Perhaps Matlab is not installed?
    If Matlab is not present, then the Ptolemy II/Matlab interface in
    \$PTII/ptolemy/matlab will not be usable." >&5
$as_echo "$as_me: WARNING: Failed to find matlab executable in the path.
    Perhaps Matlab is not installed?
    If Matlab is not present, then the Ptolemy II/Matlab interface in
    \$PTII/ptolemy/matlab will not be usable." >&2;};
	else
	    startdir=$PTII
	    cd "$srcdir/config"
	    if "$JAVAC" RootDirectory.java ; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the value of the Matlab root directory " >&5
$as_echo_n "checking the value of the Matlab root directory ... " >&6; }
		if env "$JAVA" -classpath "$PTII/config" RootDirectory "$MATLAB"> /dev/null; then

		    MATLAB_DIR_TMP=`"$JAVA" -classpath "$PTII/config" RootDirectory "$MATLAB"`

		    # Use changequote to protect the square brackets in sed
		    # Remove /cygdrive so we can compile with MSVC
		    MATLAB_DIR=`echo "$MATLAB_DIR_TMP" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`

		    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$MATLAB_DIR'" >&5
$as_echo "'$MATLAB_DIR'" >&6; }; fi
		else
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVA\" -classpath \"$PTII/config\" RootDirectory \"$MATLAB\"' failed.
    We will not be able to compile the Matlab interface in ptolemy/matlab/" >&5
$as_echo "$as_me: WARNING: '\"$JAVA\" -classpath \"$PTII/config\" RootDirectory \"$MATLAB\"' failed.
    We will not be able to compile the Matlab interface in ptolemy/matlab/" >&2;};
		fi
	    else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'cd \"$PTII/config\"; $JAVAC RootDirectory.java' failed.
    We will not be able to compile the Matlab interface in ptolemy/matlab" >&5
$as_echo "$as_me: WARNING: 'cd \"$PTII/config\"; $JAVAC RootDirectory.java' failed.
    We will not be able to compile the Matlab interface in ptolemy/matlab" >&2;};
	    fi
	    cd "$startdir"

	    if test ! -d "$MATLAB_DIR"; then
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find '${MATLAB_DIR}'
	    If Matlab is not present, then the Ptolemy II/Matlab interface in
    \$PTII/ptolemy/matlab will not be usable." >&5
$as_echo "$as_me: WARNING: Failed to find '${MATLAB_DIR}'
	    If Matlab is not present, then the Ptolemy II/Matlab interface in
    \$PTII/ptolemy/matlab will not be usable." >&2;};
	    else


            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5
$as_echo_n "checking for gcc... " >&6; }
	    case "`uname -s`" in
	        CYGWIN_*) MATLAB_LIBDIR=${MATLAB_DIR}/bin/win32
		        # We test for MATLAB_LIBDIR here to determine 32-bit vs. 64-bit.
			# We set MATLAB_LIBDIR again below.
			# FIXME: Running a 32-bit JVM requires a 32-bit Matlab etc.  We could check that here.
			if test  -d "${MATLAB_LIBDIR}"; then
			    # 32-bit
			    for ac_prog in mingw32-gcc i686-pc-mingw32-gcc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTMATLAB_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTMATLAB_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTMATLAB_CC="$PTMATLAB_CC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTMATLAB_CC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTMATLAB_CC=$ac_cv_path_PTMATLAB_CC
if test -n "$PTMATLAB_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTMATLAB_CC" >&5
$as_echo "$PTMATLAB_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$PTMATLAB_CC" && break
done

			    progs="mingw32-gcc i686-pc-mingw32-gcc"
                        else
			    MATLAB_LIBDIR=${MATLAB_DIR}/bin/win64
			    if test  ! -d "${MATLAB_LIBDIR}"; then
			        ${ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find ${MATLAB_DIR}/bin/win32 and ${MATLAB_LIBDIR}?" >&5
$as_echo "$as_me: WARNING: Failed to find ${MATLAB_DIR}/bin/win32 and ${MATLAB_LIBDIR}?" >&2;}
                            fi
			    # 64-bit
			    for ac_prog in x86_64-w64-mingw32-gcc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTMATLAB_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTMATLAB_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTMATLAB_CC="$PTMATLAB_CC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTMATLAB_CC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTMATLAB_CC=$ac_cv_path_PTMATLAB_CC
if test -n "$PTMATLAB_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTMATLAB_CC" >&5
$as_echo "$PTMATLAB_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$PTMATLAB_CC" && break
done

			    progs="x86_64-w64-mingw32-gcc"
			fi
		         if test "${PTMATLAB_CC:-none}" = "none"; then
			     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $progs
    Under Windows, Mingw or VisualStudio are required to compile the
    Ptolemy/Matlab dll.
    Cygwin gcc will compile the dll, but it will not run.  To install
    Mingw, see http://www.mingw.org or
    http://ptolemy.org/ptolemyII/ptIIlatest/cygwin.htm" >&5
$as_echo "$as_me: WARNING: Failed to find $progs
    Under Windows, Mingw or VisualStudio are required to compile the
    Ptolemy/Matlab dll.
    Cygwin gcc will compile the dll, but it will not run.  To install
    Mingw, see http://www.mingw.org or
    http://ptolemy.org/ptolemyII/ptIIlatest/cygwin.htm" >&2;}
			  else
                              OLDCC="$CC"
			      CC="$PTMATLAB_CC"
                              PTJNI_LIBC=""
			  fi;;
		       *) # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTMATLAB_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTMATLAB_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTMATLAB_CC="$PTMATLAB_CC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTMATLAB_CC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTMATLAB_CC=$ac_cv_path_PTMATLAB_CC
if test -n "$PTMATLAB_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTMATLAB_CC" >&5
$as_echo "$PTMATLAB_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


 		          if test "${PTMATLAB_CC:-none}" != "none"; then
                              OLDCC="$CC"
			      CC="$PTMATLAB_CC"
                              PTJNI_LIBC="-lc"
			  else
			      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc" >&5
$as_echo "$as_me: WARNING: Failed to find gcc" >&2;}
			      # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTMATLAB_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTMATLAB_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTMATLAB_CC="$PTMATLAB_CC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTMATLAB_CC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTMATLAB_CC=$ac_cv_path_PTMATLAB_CC
if test -n "$PTMATLAB_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTMATLAB_CC" >&5
$as_echo "$PTMATLAB_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


			      if test "${PTMATLAB_CC:-none}" != "none"; then
                                  OLDCC="$CC"
			          CC="$PTMATLAB_CC"
                                  PTJNI_LIBC="-lc"
			      else
			          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc or cc, so we will
    not be able to compile the Matlab interface in ptolemy/matlab" >&5
$as_echo "$as_me: WARNING: Failed to find gcc or cc, so we will
    not be able to compile the Matlab interface in ptolemy/matlab" >&2;};
                               fi
                          fi;;
            esac

            if test "${PTMATLAB_CC:-none}" != "none"; then

	    for ac_func in malloc_size
do :
  ac_fn_c_check_func "$LINENO" "malloc_size" "ac_cv_func_malloc_size"
if test "x$ac_cv_func_malloc_size" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_MALLOC_SIZE 1
_ACEOF
 MALLOC_SIZE_FLAG=-DHAVE_MALLOC_SIZE
fi
done

	    CC="$OLDCC"

	    # Extension for matlab .mex files, for example "mexmaci64"
	    case "`uname -s`" in
	        CYGWIN_*)  # Can't run mexext.bat here, so we guess.  This is wrong for 32-bit? We adjust below
		   PTMATLAB_MEXEXT=mexmaci684;;
		*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension for Matlab .mex files" >&5
$as_echo_n "checking the extension for Matlab .mex files... " >&6; }
                   PTMATLAB_MEXEXT=`"${MATLAB_DIR}/bin/mexext"`
		   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTMATLAB_MEXEXT" >&5
$as_echo "$PTMATLAB_MEXEXT" >&6; }; fi ;;
            esac

	    cd "$srcdir/config"
	    if "$JAVAC" MajorOSName.java ; then
	        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which major type of OS we are running under" >&5
$as_echo_n "checking which major type of OS we are running under... " >&6; }
		# Older versions of cygwin might not have env, but 1.1 does
		if env "$JAVA" -classpath "$PTII/config" MajorOSName > /dev/null; then
		    # Run it again and get the results.  We get just the first word: Windows, Linux, Mac etc.
		    MAJOR_OS_NAME=`"$JAVA" -classpath "$PTII/config" MajorOSName | awk '{print $1}'`
		    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAJOR_OS_NAME" >&5
$as_echo "$MAJOR_OS_NAME" >&6; }; fi
		else
		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVA\" -classpath \"$PTII/config\" MajorOSName' failed.
    The Matlab interface will build fine, but not being able to determine
    the major operating system name could cause problems with running
    (cd \"$PTII/ptolemy/matlab\"; make install)" >&5
$as_echo "$as_me: WARNING: '\"$JAVA\" -classpath \"$PTII/config\" MajorOSName' failed.
    The Matlab interface will build fine, but not being able to determine
    the major operating system name could cause problems with running
    (cd \"$PTII/ptolemy/matlab\"; make install)" >&2;};
		fi
	    fi

	    cd "$startdir"
		MATLAB_USE_MSVC="no"
		# These flags work for MacOSX r2009a, Linux r2008a, Windows r2008a
		PTMATLAB_CC_FLAGS="-DPT_NO_ENGGETARRAY -DPT_NO_ENGPUTARRAY -DPT_NO_MXGETNAME $MALLOC_SIZE_FLAG"
		case "`uname -s`" in
		Linux)
		    if test "`uname -m`" = "x86_64"; then
			    MATLAB_LIBDIR=${MATLAB_DIR}/bin/glnxa64
		    else
			    MATLAB_LIBDIR=${MATLAB_DIR}/bin/glnx86
			    if ! test -d ${MATLAB_DIR}; then
				    MATLAB_LIBDIR=${MATLAB_DIR}/extern/lib/glnx86
			    fi
		    fi
			;;
		CYGWIN*)
                        # As of 5/2007, we no longer use MSVC cl for Matlab
			MATLAB_USE_MSVC="no"
			MATLAB_LIBDIR=${MATLAB_DIR}/bin/win32
			PTMATLAB_MEXEXT=mexmaci
			if test ! -d "${MATLAB_LIBDIR}"; then
				MATLAB_LIBDIR=${MATLAB_DIR}/bin/win64
				PTMATLAB_MEXEXT=mexmaci64
			fi
			;;
		SunOS*)
			MATLAB_LIBDIR=${MATLAB_DIR}/extern/lib/sol2
			if test ! -d "$MATLAB_LIBDIR"; then
			    # Why, under Unix, are the libs in the bin dir?
			    MATLAB_LIBDIR=${MATLAB_DIR}/bin
			    if test ! -f "$MATLAB_LIBDIR/libmx.so"; then
			        MATLAB_LIBDIR=${MATLAB_DIR}/bin/sol64
				PTMATLAB_CC_FLAGS="-m64 $PTMATLAB_CC_FLAGS"
                            fi
			else
			    if test ! -f "$MATLAB_LIBDIR/libmx.so"; then
			        # Why, under Unix, are the libs in the bin dir?
			        # matlab r2006a
			        MATLAB_LIBDIR=${MATLAB_DIR}/bin
			    fi
                        fi
			;;
		Darwin)
			MATLAB_LIBDIR=${MATLAB_DIR}/bin/maci
			MATLAB_64LIBDIR=${MATLAB_DIR}/bin/maci64
			;;
		*)
			MATLAB_LIBDIR=${MATLAB_DIR}/extern/lib
			;;
		esac
		if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using '${MATLAB_LIBDIR}' for Matlab's engine libraries" >&5
$as_echo "using '${MATLAB_LIBDIR}' for Matlab's engine libraries" >&6; }; fi
		if test $MATLAB_USE_MSVC = "yes"; then
		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Microsoft Visual C cl" >&5
$as_echo_n "checking for Microsoft Visual C cl... " >&6; }
		    # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTMATLAB_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTMATLAB_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTMATLAB_CC="$PTMATLAB_CC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTMATLAB_CC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTMATLAB_CC=$ac_cv_path_PTMATLAB_CC
if test -n "$PTMATLAB_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTMATLAB_CC" >&5
$as_echo "$PTMATLAB_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


		    if test "${PTMATLAB_CC:-none}" != "none"; then
		        PTMATLAB_DIR=matlab
			MATLAB_LIBPATH_DIR="${MATLAB_DIR}/extern/lib/win32/microsoft"
			MATLAB_LIBPATH=`echo "$MATLAB_LIBPATH_DIR" | sed 's/ /\\\\\ /'`
			PTMATLAB_LD_ARGS="/Tpptmatlab.cc /Feptmatlab.dll /link /dll /libpath:\\\"${MATLAB_LIBPATH}\\\" libeng.lib libmx.lib"

	            else
			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find cl" >&5
$as_echo "$as_me: WARNING: Failed to find cl" >&2;}
			# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTMATLAB_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTMATLAB_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTMATLAB_CC="$PTMATLAB_CC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTMATLAB_CC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTMATLAB_CC=$ac_cv_path_PTMATLAB_CC
if test -n "$PTMATLAB_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTMATLAB_CC" >&5
$as_echo "$PTMATLAB_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


			if test "${PTMATLAB_CC:-none}" != "none"; then
			    PTMATLAB_DIR=matlab
			else
			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find MSVC cl or GNU gcc, so we will
    not be able to compile the Matlab interface in ptolemy/matlab.
    Note that the Matlab interface does not work under Windows with gcc-3.3,
    you must use the Microsoft Visual C 'cl' compiler." >&5
$as_echo "$as_me: WARNING: Failed to find MSVC cl or GNU gcc, so we will
    not be able to compile the Matlab interface in ptolemy/matlab.
    Note that the Matlab interface does not work under Windows with gcc-3.3,
    you must use the Microsoft Visual C 'cl' compiler." >&2;};
			fi
		    fi
                else
		    if test $PTJNI_ARCHITECTURE = "darwin"; then
		        PTMATLAB_LD_ARGS="ptmatlab.cc -fno-exceptions -dynamiclib -o ${PTJNI_SHAREDLIBRARY_PREFIX}ptmatlab32.${PTJNI_SHAREDLIBRARY_SUFFIX}	-L\"${MATLAB_LIBDIR}\" \"-Wl,-rpath,${MATLAB_64LIBDIR}\" ${PTJNI_SHAREDLIBRARY_LDFLAG} -leng -lmx -lmex"
		        PTMATLAB_64LD_ARGS="ptmatlab.cc -fno-exceptions -dynamiclib -o ${PTJNI_SHAREDLIBRARY_PREFIX}ptmatlab64.${PTJNI_SHAREDLIBRARY_SUFFIX}	-L\"${MATLAB_64LIBDIR}\" \"-Wl,-rpath,${MATLAB_64LIBDIR}\" ${PTJNI_SHAREDLIBRARY_LDFLAG} -leng -lmx -lmex"
		    else
		        PTMATLAB_LD_ARGS="-shared ptmatlab.cc -fno-exceptions -o ${PTJNI_SHAREDLIBRARY_PREFIX}ptmatlab.${PTJNI_SHAREDLIBRARY_SUFFIX}	-L\"${MATLAB_LIBDIR}\" ${PTJNI_SHAREDLIBRARY_LDFLAG} ${PTJNI_LIBC} -leng -lmx -lmex"
		        if test "`uname -m`" = "x86_64"; then
		            PTMATLAB_LD_ARGS="$PTMATLAB_LD_ARGS -fPIC"
		        fi
		    fi

		    # Under MacOS X, JAVAH might be a link
		    if test ! -e "$JAVAH"; then
		        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find javah at '$JAVAH',
    perhaps the JDK is not installed?
    We will not be able to compile the Matlab interface in ptolemy/matlab" >&5
$as_echo "$as_me: WARNING: Failed to find javah at '$JAVAH',
    perhaps the JDK is not installed?
    We will not be able to compile the Matlab interface in ptolemy/matlab" >&2;};
                    else
		        PTMATLAB_DIR=matlab
		    fi
                fi
	    fi
	    fi
	fi
    fi
fi

if test -z "$PTMATLAB_DIR"; then
    # The Matlab Expression actor is in the configuration, so we might as well compile it.
    # ptolemy/actor/gui/test/UserActorLibrary.tcl depends on ptolemy/matlab/Expression.class being present.
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Matlab was not found, but compiling the .java files in ptolemy/matlab/ should be ok." >&5
$as_echo "$as_me: WARNING: Matlab was not found, but compiling the .java files in ptolemy/matlab/ should be ok." >&2;}
    # updateExcludes "ptolemy/matlab/"
else
    # Set to the matlab jars that need to be signed if matlab was found.
    # Used in jnlp.mk
    PTMATLAB_JARS="ptolemy/matlab/matlab.jar ptolemy/matlab/demo/demo.jar lib/matlab.jar"
    # Used in $PTII/doc/makefile
    PTMATLAB_PACKAGES=ptolemy.matlab
fi


#--------------------------------------------------------------------
#       Mescal -
#
#--------------------------------------------------------------------
# PTMESCAL_DIR is set to mescal and used in $PTII/makefile
# if $PTII/mescal was found
PTMESCAL_DIR=

MESCAL_USER_DIR="$PTII/mescal"
if test -d "$MESCAL_USER_DIR"; then
   PTMESCAL_DIR=mescal
   updateExcludes "**/devel/"
   updateExcludes "mescal/apps/"
   updateExcludes "mescal/totem/domains/meta/codegen/"
   updateExcludes "mescal/views/memory/registerfile/"
   updateExcludes "mescal/views/simulation/model/probe/"
   updateExcludes "mescal/xml2hmdes/"
fi


#--------------------------------------------------------------------
#       ProtoBuf - "Protocol Buffers are a way of encoding structured data in an efficient yet extensible format."
#	https://code.google.com/p/protobuf/#
#--------------------------------------------------------------------

# PTMETROII_DIR is set to metroII if the ProtoBuf jar file was found
# $PTII/ptolemy/domains/makefile uses PTMETROII_DIR
PTMETROII_DIR=

# PTMETROII_PACKAGES is used in doc/makefile
PTMETROII_PACKAGES=

# The location of the protobuf jar file, typically $PTII/lib/protobuf-java-2.4.1.jar
PTPROTOBUF_JAR=

# We only need look for protobuf if $PTII/ptolemy/domains/metro exists.
PROTOBUF_USER_DIR="$PTII/ptolemy/domains/metroII"
if test ! -d "$PROTOBUF_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOBUF_USER_DIR is not present, so we need not find ProtoBuf." >&5
$as_echo "$PROTOBUF_USER_DIR is not present, so we need not find ProtoBuf." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Protocol Buffers (ProtoBuf)" >&5
$as_echo_n "checking for Protocol Buffers (ProtoBuf)... " >&6; }
    if test -f "$PTII/lib/protobuf-java-2.4.1.jar"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/lib/protobuf-java-2.4.1.jar" >&5
$as_echo "$PTII/lib/protobuf-java-2.4.1.jar" >&6; }; fi
	PTPROTOBUF_JAR="$PTII/lib/protobuf-java-2.4.1.jar"
	PTMETROII_DIR=metroII
	PTMETROII_PACKAGES="net.jimblackler.Utils ptolemy.domains.metroII.gui ptolemy.domains.metroII.kernel ptolemy.domains.metroII.kernel.util.ProtoBuf"
        updateClasspath "$PTPROTOBUF_JAR"
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTII/lib/protobuf-java-2.4.1.jar.
    The Google page at https://code.google.com/p/protobuf fo Protobuf says:
      Protocol Buffers are a way of encoding structured data in an efficient
      yet extensible format.
    Protobuf is needed at runtime for the MetroII director." >&5
$as_echo "$as_me: WARNING: Failed to find $PTII/lib/protobuf-java-2.4.1.jar.
    The Google page at https://code.google.com/p/protobuf fo Protobuf says:
      Protocol Buffers are a way of encoding structured data in an efficient
      yet extensible format.
    Protobuf is needed at runtime for the MetroII director." >&2;}
        updateExcludes "ptolemy/domains/metroII/"
    fi
fi

#--------------------------------------------------------------------
#       Paho "The Paho Java Client is an MQTT client library written
#       in Java for developing applications that run on the JVM or
#       other Java compatible platforms such as Android"
#	See https://eclipse.org/paho/clients/java/
#--------------------------------------------------------------------

# We only enable Ptango if $PTPAHO_USER_DIR is present
# Ptango has been removed, but it is not clear that this depends on Ptango.
PTPAHO_USER_DIR="$PTII/ptolemy/actor/lib/jjs/modules/localStorage"

# PTPAHO_MQTT_DIRS is set to localStorage and mqtt if Paho MQTT is found and used in ptII/ptolemy/actor/lib/jjs/modules/
PTPAHO_MQTT_DIRS=

# The Paho MQTT Client Library, defaults to $PTII/lib/org.eclipse.paho.client.mqttv3.jar.
PTPAHO_MQTT_JAR=

# PTPAHO_MQTT_PACKAGES is used in doc/makefile
PTPAHO_MQTT_PACKAGES=

if test ! -d "$PTPAHO_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTPAHO_USER_DIR is not present" >&5
$as_echo "$PTPAHO_USER_DIR is not present" >&6; }; fi
else
    if test "$PRE_JDK18" = "yes" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ptolemy/actor/lib/jjs/modules/localStorage requires Java 1.8 or later" >&5
$as_echo "$as_me: WARNING: ptolemy/actor/lib/jjs/modules/localStorage requires Java 1.8 or later" >&2;}
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Paho MQTT jar" >&5
$as_echo_n "checking for the Paho MQTT jar... " >&6; }

# Check whether --with-pahoMqtt was given.
if test "${with_pahoMqtt+set}" = set; then :
  withval=$with_pahoMqtt; PTPAHO_MQTT_JAR=$withval
else
  PTPAHO_MQTT_JAR=$PTII/lib/org.eclipse.paho.client.mqttv3.jar
fi


        if test -f "$PTPAHO_MQTT_JAR"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTPAHO_MQTT_JAR" >&5
$as_echo "$PTPAHO_MQTT_JAR" >&6; }; fi
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the PTPAHO_MQTT Jar file.
    The default location is $PTII/lib/
    Paho MQTT is used by $PTII/ptolemy/actor/lib/jjs/modules/localStorage" >&5
$as_echo "$as_me: WARNING: Failed to find the PTPAHO_MQTT Jar file.
    The default location is $PTII/lib/
    Paho MQTT is used by $PTII/ptolemy/actor/lib/jjs/modules/localStorage" >&2;}
        fi
    fi
fi

if test -z "$PTPAHO_MQTT_JAR"; then
   updateExcludes "ptolemy/actor/lib/jjs/modules/localStorage/"
else
   updateClasspath "$PTPAHO_MQTT_JAR"
   PTPAHO_MQTT_DIRS="localStorage mqtt"
   PTPAHO_MQTT_PACKAGES="ptolemy.actor.lib.jjs.modules.localStorage ptolemy.actor.lib.jjs.modules.mqtt"
fi

#--------------------------------------------------------------------
#       PSDF is the Parameterized Synchronous Data Flow domain
#--------------------------------------------------------------------

# PTPSDF_DIR is set to PSDF and used in
# $PTII/ptolemy/domains/makefile if mapss.jar was found.
PTPSDF_DIR=

# Directory that contains the mapss.jar file
PSDF_DIR='${PTII}/lib'

# We only need to look for on if $PTII/ptolemy/domains/psdf exists
PSDF_USER_DIR="$PTII/ptolemy/domains/psdf"
if test ! -d "$PSDF_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PSDF_USER_DIR is not present,
    so we need not find the mapss.jar." >&5
$as_echo "$PSDF_USER_DIR is not present,
    so we need not find the mapss.jar." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mapss.jar, used by the PSDF domain" >&5
$as_echo_n "checking for mapss.jar, used by the PSDF domain... " >&6; }

# Check whether --with-mapss was given.
if test "${with_mapss+set}" = set; then :
  withval=$with_mapss; PSDF_DIR=$withval
else
  PSDF_DIR=$PTII/lib
fi


    if test -f "$PSDF_DIR/mapss.jar"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PSDF_DIR" >&5
$as_echo "$PSDF_DIR" >&6; }; fi
	PTPSDF_DIR=psdf
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find PTII/lib/mapss.jar
    If it is not present, you will not be able to use the
    Parameterized Synchronous Data Flow domain." >&5
$as_echo "$as_me: WARNING: Failed to find PTII/lib/mapss.jar
    If it is not present, you will not be able to use the
    Parameterized Synchronous Data Flow domain." >&2;}
	# Note that we don't substitute in the ${PTII} here
	PSDF_DIR='${PTII}/lib/'
    fi
fi

if test -z "$PTPSDF_DIR"; then
   updateExcludes "ptolemy/domains/psdf/"
else
   updateClasspath "$PSDF_DIR/mapss.jar"
fi

#--------------------------------------------------------------------
#       Ptalon
#--------------------------------------------------------------------

# PTPTALON_DIR is set to ptalon and used in
# $PTII/ptolemy/actor/makefile if antlr.jar was found.
PTPTALON_DIR=

# Directory that contains the antlr.jar file
ANTLR_DIR='${PTII}/ptolemy/actor/ptalon/antlr'

# We only need to look for on if $PTII/ptolemy/actor/ptalon exists
PTALON_USER_DIR="$PTII/ptolemy/actor/ptalon"
if test ! -d "$PTALON_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTALON_USER_DIR is not present,
    so we need not find anltr.jar." >&5
$as_echo "$PTALON_USER_DIR is not present,
    so we need not find anltr.jar." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for anltr.jar, used by the Ptalon" >&5
$as_echo_n "checking for anltr.jar, used by the Ptalon... " >&6; }

# Check whether --with-antlr was given.
if test "${with_antlr+set}" = set; then :
  withval=$with_antlr; ANTLR_DIR=$withval
else
  ANTLR_DIR=$PTII/ptolemy/actor/ptalon/antlr
fi


    if test -f "$ANTLR_DIR/antlr.jar"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANTLR_DIR" >&5
$as_echo "$ANTLR_DIR" >&6; }; fi
	PTPTALON_DIR=ptalon
	# PTALON_PACKAGES is used in $PTII/doc/makefile
	PTPTALON_PACKAGES="ptolemy.actor.ptalon ptolemy.actor.ptalon.lib ptolemy.actor.ptalon.gt"
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find PTII/ptolemy/actor/ptalon/antlr/antlr.jar
    If it is not present, you will not be able to use the
    Ptalon." >&5
$as_echo "$as_me: WARNING: Failed to find PTII/ptolemy/actor/ptalon/antlr/antlr.jar
    If it is not present, you will not be able to use the
    Ptalon." >&2;}
	# Note that we don't substitute in the ${PTII} here
	PTPTALON_DIR='${PTII}/ptolemy/actor/ptalon/antlr'
    fi

    if test ! "$HAS_GENERICS" = "yes"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running Java $JVERSION, which does not
    support generics.  Thus, ptolemy/actor/ptalon will not compile." >&5
$as_echo "$as_me: WARNING: You are running Java $JVERSION, which does not
    support generics.  Thus, ptolemy/actor/ptalon will not compile." >&2;}
        PTPTALON_DIR=
	PTPTALON_PACKAGES=
    fi
fi

if test -z "$PTPTALON_DIR"; then
   updateExcludes "ptolemy/actor/ptalon/"
else
   updateClasspath "$ANTLR_DIR/antlr.jar"
fi

#--------------------------------------------------------------------
#       R is a statistical computing language
#	See https://www.r-project.org/
#--------------------------------------------------------------------

# PTRTOOL_DIR is set to r if r is found
PTRTOOL_DIR=

# Used in mk/jnlp.jar
PTRTOOL_JNLP_JARS=

# We only enable R if $PTRTOOL_USER_DIR is present
PTRTOOL_USER_DIR="ptolemy/actor/lib/r"
if test ! -d "$PTRTOOL_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTRTOOL_USER_DIR is not present" >&5
$as_echo "$PTRTOOL_USER_DIR is not present" >&6; }; fi
else
    PTJRI_JAR="$PTII/lib/JRI.jar"
    PTCOMMONS_LANG_JAR="$PTII/lib/commons-lang-2.6.jar"
    PTCOMMONS_LOGGING_JAR="$PTII/lib/commons-logging-1.1.1.jar"
    if test  -f "$PTJRI_JAR" -a -f "$PTCOMMONS_LANG_JAR" -a -f "$PTCOMMONS_LOGGING_JAR"; then
        PTRTOOL_DIR=r
        # PTRTOOL_PACKAGES is used in ptII/doc/makefile
	PTRTOOL_PACKAGES=ptolemy.actor.lib.r
    fi

    if test "$PTRTOOL_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTJRI_JAR,
    $PTCOMMONS_LANG_JAR
    or $PTCOMMONS_LOGGING_JAR
    so the R statistical computing language interface will not be compiled." >&5
$as_echo "$as_me: WARNING: Failed to find $PTJRI_JAR,
    $PTCOMMONS_LANG_JAR
    or $PTCOMMONS_LOGGING_JAR
    so the R statistical computing language interface will not be compiled." >&2;}
    else
        PTRTOOL_JARS="${CLASSPATHSEPARATOR}${PTJRI_JAR}${CLASSPATHSEPARATOR}${PTCOMMONS_LANG_JAR}${CLASSPATHSEPARATOR}${PTCOMMONS_LOGGING_JAR}"

	PTRTOOL_JNLP_JARS="ptolemy/actor/lib/r/r.jar ptolemy/actor/lib/r/demo/demo.jar"
	updateClasspath "$PTJRI_JAR"
	updateClasspath "$PTCOMMONS_LANG_JAR"
	updateClasspath "$PTCOMMONS_LOGGING_JAR"
    fi
fi

if test -z "$PTRTOOL_JARS"; then
   updateExcludes "ptolemy/actor/lib/r"
fi

#--------------------------------------------------------------------
#       Scala is a programming language that creates .class files
#--------------------------------------------------------------------

# PTSCALA_DIR is set to scala if scala is found
PTSCALA_DIR=

# We only enable scala if $PTSCALA_USER_DIR is present
PTSCALA_USER_DIR="org/ptolemy/scala"

if test ! -d "$PTSCALA_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTSCALA_USER_DIR is not present" >&5
$as_echo "$PTSCALA_USER_DIR is not present" >&6; }; fi
else
    # Extract the first word of "scalac", so it can be a program name with args.
set dummy scalac; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_SCALAC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $SCALAC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SCALAC="$SCALAC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_SCALAC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
SCALAC=$ac_cv_path_SCALAC
if test -n "$SCALAC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SCALAC" >&5
$as_echo "$SCALAC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test -x "$SCALAC"; then
        # Extract the first word of "scala", so it can be a program name with args.
set dummy scala; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_SCALA+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $SCALA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SCALA="$SCALA" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_SCALA="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
SCALA=$ac_cv_path_SCALA
if test -n "$SCALA"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SCALA" >&5
$as_echo "$SCALA" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test -x "$SCALA"; then
            PTSCALA_DIR=scala
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the scala binary,
    so org/ptolemy/scala will be excluded" >&5
$as_echo "$as_me: WARNING: Failed to find the scala binary,
    so org/ptolemy/scala will be excluded" >&2;}

            updateExcludes "org/ptolemy/scala/"
        fi
    else
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the scalac binary,
    so org/ptolemy/scala will be excluded" >&5
$as_echo "$as_me: WARNING: Failed to find the scalac binary,
    so org/ptolemy/scala will be excluded" >&2;}

        updateExcludes "org/ptolemy/scala/"
    fi
fi


#--------------------------------------------------------------------
#       Soot is a Java Optimization Framework, see
#	http://www.sable.mcgill.ca/soot/
#       See if there was a command-line option for where Soot is
#       If not, look in $PTII/vendors/sun/soot
#--------------------------------------------------------------------

# PTCOPERNICUS_DIR is set to copernicus and used in
# $PTII/ptolemy/makefile if soot was found
PTCOPERNICUS_DIR=

# Directory that contains the soot jar files
SOOT_DIR='${PTII}/lib'

# Soot needs to find java.lang.Object
# Use {} here instead of () because bin/ptinvoke uses JAVA_SYSTEM_JAR
# and under /bin/sh $(FOO) does not work, but ${FOO} does
JAVA_SYSTEM_JAR='${PTJAVA_HOME}/lib/rt.jar'

# Java 1.5 has javax.crypto.Cipher in jce.jar
JAVAX_CRYPTO_JAR='${PTJAVA_HOME}/lib/jce.jar'

# We don't bother overriding this below so that something close
# to the right default is in ptII.mk and the user can just change
# SOOT_DIR or JAVA_SYSTEM_JAR
# Use {} here instead of () because bin/ptinvoke uses SOOT_CLASSES
SOOT_CLASSES='${SOOT_DIR}/sootclasses.jar${CLASSPATHSEPARATOR}${CLASSPATHSEPARATOR}${JAVA_SYSTEM_JAR}${CLASSPATHSEPARATOR}${JAVAX_CRYPTO_JAR}'

# We only need to look for soot if $PTII/ptolemy/copernicus exists
if test ! -d "$PTII/ptolemy/copernicus"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/copernicus is not present,
    so we need not find the Soot - a Java Optimization Framework." >&5
$as_echo "$PTII/ptolemy/copernicus is not present,
    so we need not find the Soot - a Java Optimization Framework." >&6; }; fi
    SOOT_DIR='${PTII}/lib'
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for soot directory" >&5
$as_echo_n "checking for soot directory... " >&6; }

# Check whether --with-soot was given.
if test "${with_soot+set}" = set; then :
  withval=$with_soot; SOOT_DIR=$withval
else
  SOOT_DIR=$PTII/lib
fi


    if test -d "$SOOT_DIR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOOT_DIR" >&5
$as_echo "$SOOT_DIR" >&6; }; fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$SOOT_DIR/sootclasses.jar" >&5
$as_echo_n "checking for \$SOOT_DIR/sootclasses.jar... " >&6; }
	if test -f "$SOOT_DIR/sootclasses.jar"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; fi
	    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOOT_CLASSES" >&5
$as_echo "$SOOT_CLASSES" >&6; }; fi
        else
	    SOOT_CLASSES_FOUND=no
        fi
    # else
    # We could look in other places . . .
    fi

    if test "$SOOT_CLASSES_FOUND" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find soot/sootclasses.jar
    perhaps Soot is not installed?
    You need not download Soot unless you plan on using code generation
    The Soot SDK can be downloaded from http://www.sable.mcgill.ca/soot/" >&5
$as_echo "$as_me: WARNING: Failed to find soot/sootclasses.jar
    perhaps Soot is not installed?
    You need not download Soot unless you plan on using code generation
    The Soot SDK can be downloaded from http://www.sable.mcgill.ca/soot/" >&2;}
	# Note that we don't substitute in the ${PTII} or $(SOOT_DIR) here
	SOOT_DIR='${PTII}/lib'
    else
	# Set to copernicus and used in
	# $PTII/ptolemy/makefile if soot was found
	PTCOPERNICUS_DIR=copernicus
    fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rt.jar by compiling config/SystemJar.java" >&5
$as_echo_n "checking for rt.jar by compiling config/SystemJar.java... " >&6; }

# Check whether --with-javasystemjar was given.
if test "${with_javasystemjar+set}" = set; then :
  withval=$with_javasystemjar; JAVA_SYSTEM_JAR=$withval
else
  JAVA_SYSTEM_JAR='$(PTJAVA_HOME)/lib/rt.jar'
fi


    startdir=$PTII
    cd "$srcdir/config"
    if "$JAVAC" SystemJar.java ; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: SystemJar.java compiled" >&5
$as_echo "SystemJar.java compiled" >&6; }; fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the location or rt.jar" >&5
$as_echo_n "checking the location or rt.jar... " >&6; }
	if env "$JAVA" -classpath "$PTII/config" SystemJar > /dev/null; then
	    # Run it again and get the results
	    JAVA_SYSTEM_JAR=`"$JAVA" -classpath "$PTII/config" SystemJar`
   	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: '$JAVA_SYSTEM_JAR'" >&5
$as_echo "'$JAVA_SYSTEM_JAR'" >&6; }; fi
	else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '\"$JAVA\" -classpath \"$PTII/config\" SystemJar failed.
    Classes that use Soot will compile, but will fail to run.'" >&5
$as_echo "$as_me: WARNING: '\"$JAVA\" -classpath \"$PTII/config\" SystemJar failed.
    Classes that use Soot will compile, but will fail to run.'" >&2;}
        fi
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'cd \"$srcdir/config\"; \"$JAVAC\" SystemJar.java failed.
    Classes that use Soot will compile, but will fail to run.'" >&5
$as_echo "$as_me: WARNING: 'cd \"$srcdir/config\"; \"$JAVAC\" SystemJar.java failed.
    Classes that use Soot will compile, but will fail to run.'" >&2;}
    fi
    cd "$startdir"
fi

if test -z "$PTCOPERNICUS_DIR"; then
   updateExcludes "ptolemy/copernicus/"
else
   # Note that kieler.jar should be before sootclasses.jar
   # both jars have a Maps class.
   updateClasspath "$SOOT_DIR/sootclasses.jar"
    # What about JAVA_SYSTEM_JAR?
fi

#--------------------------------------------------------------------
#       Space - domains/space uses ojdbc6.jar
#--------------------------------------------------------------------


# PTDATABASE_DIR is set to database and used in
# $PTII/ptolemy/actor/lib/makefile if ojdbc6.jar was found.
PTDATABASE_DIR=

# PTDATABASE_JNLP_JARS is set to the database jars that need to be signed
# and used in mk/jnlp.mk
PTDATABASE_JNLP_JARS=

# PTDATABASE_PACKAGES is used in ptII/doc/makefile
PTDATABASE_PACKAGES=

# PTSPACE_DIR is set to space and used in
# $PTII/ptolemy/domains/makefile if ojdbc6.jar was found.
PTSPACE_DIR=

# PTSPACEDOMAIN_PACKAGES is used in ptII/doc/makefile
PTSPACEDOMAIN_PACKAGES=

# MySQL Jar mysql-connector-java-8.0.26.jar
MYSQL_JAR=

# Oracle Java Database jar (ojdbc5.jar or ojdbc6.jar)
# ojdbc5.jar and ojdbc6.jar are not shipped because of restrictive licenses
# http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5565
ORACLE_OJDBC_JAR=

# PTSPACEDOMAIN_JAR is the name of the jar file that includes the space
# domain if ojdbc6.jar was found.  PTSPACEDOMAIN_JAR used in domains/makefile
PTSPACEDOMAIN_JAR=

# We only need to look for on if $PTII/ptolemy/domains/space exists
SPACE_USER_DIR="$PTII/ptolemy/domains/space"

DATABASE_USER_DIR="$PTII/ptolemy/actor/lib/database"

if test ! -d "$SPACE_USER_DIR" -a ! -d "$DATABASE_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPACE_USER_DIR and $DATABASE_USER_DIR
    are not present,  so we need not find the Mysql jar and Oracle ojdbc6.jar." >&5
$as_echo "$SPACE_USER_DIR and $DATABASE_USER_DIR
    are not present,  so we need not find the Mysql jar and Oracle ojdbc6.jar." >&6; }; fi
    MYSQL_JAR=
    ORACLE_OJDBC_JAR=
else
    MYSQL_TARGET_JAR=mysql-connector-java-8.0.26.jar
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql jar, used by the database actors" >&5
$as_echo_n "checking for mysql jar, used by the database actors... " >&6; }

# Check whether --with-mysql was given.
if test "${with_mysql+set}" = set; then :
  withval=$with_mysql; MYSQL_JAR=$withval
else
  MYSQL_JAR=$PTII/ptolemy/actor/lib/database/$MYSQL_TARGET_JAR
fi

    if test -f "$MYSQL_JAR"; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_JAR" >&5
$as_echo "$MYSQL_JAR" >&6; }; fi
    fi
    OJDBC_TARGET_JAR=ojdbc6.jar
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $OJDBC_TARGET_JAR" >&5
$as_echo_n "checking for $OJDBC_TARGET_JAR... " >&6; }

# Check whether --with-ojdbc was given.
if test "${with_ojdbc+set}" = set; then :
  withval=$with_ojdbc; ORACLE_OJDBC_JAR=$withval
else
  ORACLE_OJDBC_JAR=$PTII/ptolemy/actor/lib/database/$OJDBC_TARGET_JAR
fi


    if test -f "$ORACLE_OJDBC_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ORACLE_OJDBC_JAR" >&5
$as_echo "$ORACLE_OJDBC_JAR" >&6; }; fi
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $OJDBC_TARGET_JAR not found,
    but only necessary to use database actors with Oracle.
    If the mysql jar file is present, then the Oracle Java Database Connector is not necessary
    To install ojdbc5.jar or ojdbc6.jar,
    download it from https://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html
    copy it to ptolemy/actor/lib/database
    and rerun ./configure" >&5
$as_echo "$as_me: WARNING: $OJDBC_TARGET_JAR not found,
    but only necessary to use database actors with Oracle.
    If the mysql jar file is present, then the Oracle Java Database Connector is not necessary
    To install ojdbc5.jar or ojdbc6.jar,
    download it from https://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html
    copy it to ptolemy/actor/lib/database
    and rerun ./configure" >&2;}

    fi

    if test -f "$MYSQL_JAR" -o -f "$ORACLE_OJDBC_JAR"; then
	PTDATABASE_DIR=database
	PTDATABASE_PACKAGES=ptolemy.actor.lib.database
	PTSPACE_DIR=space
	PTSPACEDOMAIN_JAR=space/space.jar
	PTSPACEDOMAIN_PACKAGES=ptolemy.domains.space

	# Update PTDATABASE_JNLP_JARS, used to sign jar files in mk/jnlp.mk
	# The sed commands remove $PTII/
	PTDATABASE_JNLP_JARS="ptolemy/actor/lib/database/database.jar ptolemy/domains/space/space.jar"
	if test -f "$ORACLE_OJDBC_JAR"; then
	    PTDATABASE_JNLP_JARS="$PTDATABASE_JNLP_JARS `echo "$ORACLE_OJDBC_JAR" | sed "s@$PTII/@@"`"
	fi
	if test -f "$MYSQL_JAR"; then
	    PTDATABASE_JNLP_JARS="$PTDATABASE_JNLP_JARS `echo "$MYSQL_JAR" | sed "s@$PTII/@@"`"
	fi
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find
    PTII/actor/lib/database/$MYSQL_TARGET_JAR and/or
    PTII/actor/lib/database/$OJDBC_TARGET_JAR
    If neither Java Database Connection jar is present,
    you will not be able to use the space domain or the database actors." >&5
$as_echo "$as_me: WARNING: Failed to find
    PTII/actor/lib/database/$MYSQL_TARGET_JAR and/or
    PTII/actor/lib/database/$OJDBC_TARGET_JAR
    If neither Java Database Connection jar is present,
    you will not be able to use the space domain or the database actors." >&2;}
	    ORACLE_OJDBC_JAR=
	    MYSQL_JAR=
    fi
fi

if test -z "$MYSQL_JAR" -a -z "$ORACLE_OJDBC_JAR"; then
   updateExcludes "ptolemy/actor/lib/database/|ptolemy/domains/space/"
else
   if test -f "$MYSQL_JAR"; then
       updateClasspath "$MYSQL_JAR"
   fi
   if test -f "$ORACLE_OJDBC_JAR"; then
      updateClasspath "$ORACLE_OJDBC_JAR"
   fi

fi

#--------------------------------------------------------------------
#       Sphinx4 is a speech recognition engine developed at Carnegie Mellon University.
#       PtolemyII includes an Accessor for speech recognition using sphinx4 at
#       ptolemy/actor/lib/jjs/modules/speechRecognition
#--------------------------------------------------------------------

# PTSPHINX4_DIR is set to sphinx.
PTSPHINX4_DIR=

# The Sphinx4 core Jar file.
PTSPHINX4_CORE_JAR=

PTSPHINX4_DATA_JAR=

PTSPHINX4_PACKAGES=
# We only need to look for Sphinx if this directory is present:
SPHINX4_USER_DIR="$PTII/ptolemy/actor/lib/jjs/modules/speechRecognition"

if test ! -d "$SPHINX4_USER_DIR" ; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPHINX4_USER_DIR is not present,
    so we need not find Sphinx4 - Speech recognition engine API." >&5
$as_echo "$SPHINX4_USER_DIR is not present,
    so we need not find Sphinx4 - Speech recognition engine API." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sphinx4 Speech recognition data jar API" >&5
$as_echo_n "checking for Sphinx4 Speech recognition data jar API... " >&6; }

# Check whether --with-sphinx-data was given.
if test "${with_sphinx_data+set}" = set; then :
  withval=$with_sphinx_data; PTSPHINX4_DATA_JAR=$withval
else
  PTSPHINX4_DATA_JAR=$PTII/vendors/misc/sphinx4/sphinx4-data-5prealpha.jar
fi

    if test -f "$PTSPHINX4_DATA_JAR"; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTSPHINX4_DATA_JAR" >&5
$as_echo "$PTSPHINX4_DATA_JAR" >&6; }; fi
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sphinx4 Speech recognition core jar API" >&5
$as_echo_n "checking for Sphinx4 Speech recognition core jar API... " >&6; }

# Check whether --with-sphinx-core was given.
if test "${with_sphinx_core+set}" = set; then :
  withval=$with_sphinx_core; PTSPHINX4_CORE_JAR=$withval
else
  PTSPHINX4_CORE_JAR=$PTII/vendors/misc/sphinx4/sphinx4-core-5prealpha.jar
fi

       if test -f "$PTSPHINX4_CORE_JAR"; then
           if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTSPHINX4_CORE_JAR" >&5
$as_echo "$PTSPHINX4_CORE_JAR" >&6; }; fi
           PTSPHINX4_DIR="$PTII/ptolemy/actor/lib/jjs/modules/speechRecognition"
	   PTSPHINX4_PACKAGES=ptolemy.actor.lib.jjs.modules.speechRecognition
           updateClasspath "$PTSPHINX4_DATA_JAR"
           updateClasspath "$PTSPHINX4_CORE_JAR"
       fi
    fi
fi

if test -z "$PTSPHINX4_DIR"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find the sphinx4 jar files.
    These files are only necessary for the accessor in
    ptolemy/actor/lib/jjs/modules/speechRecognition.
    To install Sphinx4:
    1. mkdir $PTII/vendors/misc/sphinx4
    2. Download these .jar files and place in ptolemy/vendors/misc/sphinx:

      wget -O $PTII/vendors/misc/sphinx4/sphinx4-core-5prealpha.jar 'https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=net.sf.phat&a=sphinx4-core&v=5prealpha&e=jar'

      wget -O $PTII/vendors/misc/sphinx4/sphinx4-data-5prealpha.jar 'https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=net.sf.phat&a=sphinx4-data&v=5prealpha&e=jar'

    3. Rerun
      (cd $PTII; ./configure)" >&5
$as_echo "$as_me: WARNING: Could not find the sphinx4 jar files.
    These files are only necessary for the accessor in
    ptolemy/actor/lib/jjs/modules/speechRecognition.
    To install Sphinx4:
    1. mkdir $PTII/vendors/misc/sphinx4
    2. Download these .jar files and place in ptolemy/vendors/misc/sphinx:

      wget -O $PTII/vendors/misc/sphinx4/sphinx4-core-5prealpha.jar 'https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=net.sf.phat&a=sphinx4-core&v=5prealpha&e=jar'

      wget -O $PTII/vendors/misc/sphinx4/sphinx4-data-5prealpha.jar 'https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=net.sf.phat&a=sphinx4-data&v=5prealpha&e=jar'

    3. Rerun
      (cd $PTII; ./configure)" >&2;}

    updateExcludes "ptolemy/actor/lib/jjs/modules/speechRecognition/"
fi

#--------------------------------------------------------------------
#       PDFRenderer used to display PDF in vergil.
#	Source may be found at https://pdf-renderer.dev.java.net/
#--------------------------------------------------------------------

# PTPDFRENDERER_DIR is set to pdf and used in
# $PTII/ptolemy/vergil/makefile if PDFRenderer is found
PTPDFRENDERER_DIR=

# Jar file used by ptolemy/vergil/pdfrenderer
PTPDFRENDERER_JAR=

PDFRENDERER_USER_DIR=$PTII/ptolemy/vergil/pdfrenderer
# We only need to look for PDFRender.jar if the directory that uses it exists.
if test ! -d "$PDFRENDERER_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFRENDERER_USER_DIR is not present,
    so we need not find PDFRenderer." >&5
$as_echo "$PDFRENDERER_USER_DIR is not present,
    so we need not find PDFRenderer." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDFRenderer" >&5
$as_echo_n "checking for PDFRenderer... " >&6; }

# Check whether --with-pdfrenderer was given.
if test "${with_pdfrenderer+set}" = set; then :
  withval=$with_pdfrenderer; PTPDFRENDERER_JAR=$withval
else
  PTPDFRENDERER_JAR=$PTII/lib/PDFRenderer.jar
fi


    if test -f "$PTPDFRENDERER_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTPDFRENDERER_JAR" >&5
$as_echo "$PTPDFRENDERER_JAR" >&6; }; fi
	PTPDFRENDERER_DIR=pdfrenderer
        updateClasspath "$PTPDFRENDERER_JAR"
    fi
    if test "$PTPDFRENDERER_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the PDFRenderer Jar file
    You need only have PDFRenderer if you want to render PDF files in Vergil.
    PDFRenderer may be downloaded from https://pdf-renderer.dev.java.net/" >&5
$as_echo "$as_me: WARNING: Failed to find the PDFRenderer Jar file
    You need only have PDFRenderer if you want to render PDF files in Vergil.
    PDFRenderer may be downloaded from https://pdf-renderer.dev.java.net/" >&2;}
	PTPDFRENDERER_JAR=
    fi
fi

if test -z "$PTPDFRENDERER_DIR"; then
   updateExcludes "ptolemy/vergil/pdfrenderer/"
fi

#--------------------------------------------------------------------
#       The Batik SVG toolkit is used by Kepler so we include Batik
#	support in Diva.  See
#	http://xmlgraphics.apache.org/batik/
#       See if there was a command-line option for where Batikc
#       is
#       If not, look for for $PTII/vendors/eclipse
#--------------------------------------------------------------------

# PTSVG_DIR is set to svg and used in
# $PTII/diva/util/java2d/makefile if Batik SVG jar files were found
PTSVG_DIR=

# Jar file used by diva/util/java2d/svg/makefile
PTSVG_JAR=

# We only need to look for Batik if $PTII/diva/util/java2d/svg exists
if test ! -d "$PTII/diva/util/java2d/svg"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/diva/util/java2d/svg is not present,
    so we need not find Batik SVG." >&5
$as_echo "$PTII/diva/util/java2d/svg is not present,
    so we need not find Batik SVG." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Batik SVG" >&5
$as_echo_n "checking for Batik SVG... " >&6; }

# Check whether --with-batikjar was given.
if test "${with_batikjar+set}" = set; then :
  withval=$with_batikjar; PTSVG_JAR=$withval
else
  PTSVG_JAR=$KEPLER/lib/jar/batik-all-1.9.jar
fi


    if test -f "$PTSVG_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTSVG_JAR" >&5
$as_echo "$PTSVG_JAR" >&6; }; fi
	PTSVG_DIR=svg
        updateClasspath "$PTSVG_JAR"
    fi
    if test "$PTSVG_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Batik Jar file
    You need only have Batik if you are planning on rebuilding diva.jar
    for use with Kepler.
    Batik can be downloaded from http://xmlgraphics.apache.org/batik/,
    batike-1.9/lib/batik-all-1.9.jar copied to $PTII/lib
    and ./configure rerun." >&5
$as_echo "$as_me: WARNING: Failed to find Batik Jar file
    You need only have Batik if you are planning on rebuilding diva.jar
    for use with Kepler.
    Batik can be downloaded from http://xmlgraphics.apache.org/batik/,
    batike-1.9/lib/batik-all-1.9.jar copied to $PTII/lib
    and ./configure rerun." >&2;}
    fi
fi

if test -z "$PTSVG_DIR"; then
   updateExcludes "diva/util/java2d/svg/"
fi

#--------------------------------------------------------------------
#       svgSalamander is used by FIXME.
#	See https://svgsalamander.java.net/
#--------------------------------------------------------------------

# PTSVGSALAMANDER_DIR is set to svg and used in com/jhlabs/image/svg/makefile
# if the svgSalamander jar file is found.
PTSVGSALAMANDER_DIR=

# svgSalamander Jar file.
PTSVGSALAMANDER_JAR=

# PTSVGSALAMANDER_PACKAGES is used in ptII/doc/makefile
PTSVGSALAMANDER_PACKAGES=

# We only need to look for svgSalamander if com/jhlabs/image/svg is present.
if test ! -d "$PTII/com/jhlabs/image/svg"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/org/terraswarm/accessors is not present,
    so we need not find svgSalamander." >&5
$as_echo "$PTII/org/terraswarm/accessors is not present,
    so we need not find svgSalamander." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for svgSalamander" >&5
$as_echo_n "checking for svgSalamander... " >&6; }

# Check whether --with-svgsalamanderjar was given.
if test "${with_svgsalamanderjar+set}" = set; then :
  withval=$with_svgsalamanderjar; PTSVGSALAMANDER_JAR=$withval
else
  PTSVGSALAMANDER_JAR=$PTII/lib/svgSalamander.jar
fi


    if test -f "$PTSVGSALAMANDER_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTSVGSALAMANDER_JAR" >&5
$as_echo "$PTSVGSALAMANDER_JAR" >&6; }; fi
	PTSVGSALAMANDER_DIR=svg
        PTSVGSALAMANDER_PACKAGES=com.jhlabs.image.svg
        updateClasspath "$PTSVGSALAMANDER_JAR"
    fi

    if test "$PTSVGSALAMANDER_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the svgSalamander.jar file.
    You need only have find this if com/jhlabs/image/svg is present.
    The svgSalamander facility is used by Cape Code to render icons.
    svgSalamander.jar can be downloaded from http://xmlgraphics.apache.org/batik/" >&5
$as_echo "$as_me: WARNING: Failed to find the svgSalamander.jar file.
    You need only have find this if com/jhlabs/image/svg is present.
    The svgSalamander facility is used by Cape Code to render icons.
    svgSalamander.jar can be downloaded from http://xmlgraphics.apache.org/batik/" >&2;}
    fi
fi

if test -z "$PTSVGSALAMANDER_DIR"; then
   updateExcludes "com.jhlabs.image.svg"
fi

#--------------------------------------------------------------------
#       The JavaScript Editor in ptolemy.actor.gui.syntax uses RSyntaxEditor
#       from https://github.com/bobbylight/RSyntaxTextArea
#--------------------------------------------------------------------

# PTRSYNTAXTEXTAREA_DIR is set to syntax and used in
# $PTII/ptolemy/actor/gui/makefile if lib/rsyntaxtextarea-*.jar is found
PTRSYNTAXTEXTAREA_DIR=

# RSyntaxTextArea jar file, typically downloaded from Maven.
PTRSYNTAXTEXTAREA_JAR=

# Java packages that use RSyntaxTextArea, typically ptolemy.actor.gui.syntax.
PTRSYNTAXTEXTAREA_PACKAGES=
# We only need to look for RSyntaxEditor $PTII/ptolemy/actor/gui/syntax exists
if test ! -d "$PTII/ptolemy/actor/gui/syntax"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/actor/gui/syntax is not present,
    so we need not find RSyntaxEditor." >&5
$as_echo "$PTII/ptolemy/actor/gui/syntax is not present,
    so we need not find RSyntaxEditor." >&6; }; fi
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RSyntaxEditor" >&5
$as_echo_n "checking for RSyntaxEditor... " >&6; }

# Check whether --with-rsyntaxeditor was given.
if test "${with_rsyntaxeditor+set}" = set; then :
  withval=$with_rsyntaxeditor; PTRSYNTAXTEXTAREA_JAR=$withval
else
  PTRSYNTAXTEXTAREA_JAR=$PTII/lib/rsyntaxtextarea-2.6.0-SNAPSHOT.jar
fi


    if test -f "$PTRSYNTAXTEXTAREA_JAR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTRSYNTAXTEXTAREA_JAR" >&5
$as_echo "$PTRSYNTAXTEXTAREA_JAR" >&6; }; fi
	PTRSYNTAXTEXTAREA_DIR=syntax
        PTRSYNTAXTEXTAREA_PACKAGES=ptolemy.actor.gui.syntax
        updateClasspath "$PTRSYNTAXTEXTAREA_JAR"
    fi
    if test "$PTRSYNTAXTEXTAREA_DIR" = ""; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the RSyntaxTextArea jar file
    You need only have this jar if you are using the JavaScript syntax editors
    in $PTII/ptolemy/actor/gui/syntax.
    RSyntaxTextArea https://github.com/bobbylight/RSyntaxTextArea" >&5
$as_echo "$as_me: WARNING: Failed to find the RSyntaxTextArea jar file
    You need only have this jar if you are using the JavaScript syntax editors
    in $PTII/ptolemy/actor/gui/syntax.
    RSyntaxTextArea https://github.com/bobbylight/RSyntaxTextArea" >&2;}
	PTRSYNTAXTEXTAREA_JAR=
    fi
fi

if test -z "$PTRSYNTAXTEXTAREA_DIR"; then
   updateExcludes "ptolemy/actor/gui/syntax"
fi


#--------------------------------------------------------------------
#       TINI is the JDK for Dallas Tini board, see
#	www.ibutton.com
#	See if there was a command-line option for where
#       tinisk is;  if not,
#       check to see if $PTII/vendors/dalsemi/tini/bin/tiniclasses.jar exists
#--------------------------------------------------------------------

# PTTINI_DIR is set to tini and used in
# $PTII/ptolemy/apps/makefile if tini was found
PTTINI_DIR=
#
# We only need to look for tini if $PTII/ptolemy/apps/tini exists
if test ! -d "$PTII/ptolemy/apps/tini"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/apps/tini is not present,
    so we need not find the Dallas Semiconductor tini." >&5
$as_echo "$PTII/ptolemy/apps/tini is not present,
    so we need not find the Dallas Semiconductor tini." >&6; }; fi
    TINI_DIR='${PTII}/vendors/dalsemi/tini'
    TINI_CLASSES='${TINI_DIR}/bin/tini.jar'
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tini directory" >&5
$as_echo_n "checking for tini directory... " >&6; }

# Check whether --with-tini was given.
if test "${with_tini+set}" = set; then :
  withval=$with_tini; TINI_DIR=$withval
else
  TINI_DIR=$PTII/vendors/dalsemi/tini
fi


    if test -d "$TINI_DIR"; then
    	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TINI_DIR" >&5
$as_echo "$TINI_DIR" >&6; }; fi
      	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$TINI_DIR/bin/tini.jar" >&5
$as_echo_n "checking for \$TINI_DIR/bin/tini.jar... " >&6; }
	if test -f "$TINI_DIR/bin/tini.jar"; then
	   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TINI_DIR/bin/tini.jar" >&5
$as_echo "$TINI_DIR/bin/tini.jar" >&6; }; fi
	   TINI_CLASSES='${TINI_DIR}/bin/tini.jar'
	else
	   TINI_CLASSES=no
        fi
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TINI_CLASSES" >&5
$as_echo "$TINI_CLASSES" >&6; }; fi
    fi
    if test "$TINI_CLASSES" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find tini/bin/tiniclasses.jar
    perhaps Tini is not installed?
    You need not download Tini unless you plan on building applications
    for the Dallas Semiconductor Tini board.
    The Tini SDK can be downloaded from http://www.ibutton.com" >&5
$as_echo "$as_me: WARNING: Failed to find tini/bin/tiniclasses.jar
    perhaps Tini is not installed?
    You need not download Tini unless you plan on building applications
    for the Dallas Semiconductor Tini board.
    The Tini SDK can be downloaded from http://www.ibutton.com" >&2;}
	# Note that we don't substitute in the ${PTII} or $(TINI_DIR) here
	TINI_DIR='${PTII}/vendors/dalsemi/tini'
   	TINI_CLASSES='${TINI_DIR}/bin/tini.jar'
    else
	# Set to tini and used in
	# $PTII/ptolemy/apps/makefile if tini was found
	PTTINI_DIR=tini
    fi
fi

#--------------------------------------------------------------------
#	TinyOS
#--------------------------------------------------------------------
# PTTINYOS_DIR is set to ptinyos and used in
# $PTII/ptolemy/domains/makefile if TinyOS is found
PTTINYOS_DIR=

# The problem is that the nesc/configure script does not understand
# "c:/" style syntax, it works with "/cygdrive/c/", yet Java
# does not understand /cygdrive/c syntax, so we hack
PTINYOS_DIR=$PTII/ptolemy/domains/ptinyos

if test ! -d "$PTINYOS_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTINYOS_DIR is not present
    so we need not set up for TinyOS." >&5
$as_echo "$PTINYOS_DIR is not present
    so we need not set up for TinyOS." >&6; }; fi

    # Nothing to exclude
    # updateExcludes "ptolemy/domains/nc/"
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking the for TinyOS" >&5
$as_echo_n "checking the for TinyOS... " >&6; }
    if test -z "$TOSROOT"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$TOSROOT is not set.  It must be set to use PtinyOS." >&5
$as_echo "$as_me: WARNING: \$TOSROOT is not set.  It must be set to use PtinyOS." >&2;}
    fi
    if test ! -d "$TOSROOT"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$TOSROOT is set to '$TOSROOT',
     but there is no directory by that name, so we will not set up for PtinyOS.
     For details, see $PTII/ptolemy/domains/ptinyos/README.txt." >&5
$as_echo "$as_me: WARNING: \$TOSROOT is set to '$TOSROOT',
     but there is no directory by that name, so we will not set up for PtinyOS.
     For details, see $PTII/ptolemy/domains/ptinyos/README.txt." >&2;}
    else
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOSROOT" >&5
$as_echo "$TOSROOT" >&6; }; fi
        # Use changequote to protect the square brackets in sed
        TOSROOT_NO_CYGDRIVE=`echo "$TOSROOT" | sed 's@^/cygdrive/\([a-zA-Z]\)/@\1:/@'`

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOSDIR directory" >&5
$as_echo_n "checking for TOSDIR directory... " >&6; }
        if test ! -d "$TOSDIR"; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$TOSDIR is set to '$TOSDIR',
     but there is no directory by that name.
     For details, see $PTII/ptolemy/domains/ptinyos/README.txt." >&5
$as_echo "$as_me: WARNING: \$TOSDIR is set to '$TOSDIR',
     but there is no directory by that name.
     For details, see $PTII/ptolemy/domains/ptinyos/README.txt." >&2;}
        else
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOSDIR" >&5
$as_echo "$TOSDIR" >&6; }; fi
        # Use changequote to protect the square brackets in sed
        TOSDIR_NO_CYGDRIVE=`echo "$TOSDIR" | sed 's@^/cygdrive/\([a-zA-Z]\)/@\1:/@'`

        fi

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTINYOS_MOMLROOT" >&5
$as_echo_n "checking for PTINYOS_MOMLROOT... " >&6; }
	if test -z "$PTINYOS_MOMLROOT"; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$PTINYOS_MOMLROOT is not set.
    For details, see $PTII/ptolemy/domains/ptinyos/README.txt." >&5
$as_echo "$as_me: WARNING: \$PTINYOS_MOMLROOT is not set.
    For details, see $PTII/ptolemy/domains/ptinyos/README.txt." >&2;}
        else
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTINYOS_MOMLROOT" >&5
$as_echo "$PTINYOS_MOMLROOT" >&6; }; fi
            if test ! -d "$PTINYOS_MOMLROOT"; then
                # Try to make the directory
	        mkdir -p "$PTINYOS_MOMLROOT"
            fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTINYOS_MOMLROOT directory" >&5
$as_echo_n "checking for PTINYOS_MOMLROOT directory... " >&6; }
            if test ! -d "$PTINYOS_MOMLROOT"; then
	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$PTINYOS_MOMLROOT is set to '$PTINYOS_MOMLROOT',
     but there is no directory by that name.
     For details, see $PTII/ptolemy/domains/ptinyos/README.txt." >&5
$as_echo "$as_me: WARNING: \$PTINYOS_MOMLROOT is set to '$PTINYOS_MOMLROOT',
     but there is no directory by that name.
     For details, see $PTII/ptolemy/domains/ptinyos/README.txt." >&2;}
            else
	        PTINYOS_MOMLROOT_NO_CYGDRIVE=`echo "$PTINYOS_MOMLROOT" | sed 's@^/cygdrive/\(a-zA-Z\)/@\1:/@'`
		if test -d "$PTINYOS_MOMLROOT_NO_CYGDRIVE"; then

		    # If MOMLROOT is under $PTII, then add it to the classpath
		    echo "$PTINYOS_MOMLROOT_NO_CYGDRIVE" | grep "$PTII" > /dev/null
		    retval=$?
		    if test "$retval" = "0"; then
		        SHORT_PTINYOS_MOMLROOT_NO_CYGDRIVE=`echo "$PTINYOS_MOMLROOT_NO_CYGDRIVE" | sed "s@$PTII/@@"`
                        updateClasspath "$SHORT_PTINYOS_MOMLROOT_NO_CYGDRIVE"
	            else
		        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$PTINYOS_MOMLROOT ($PTINYOS_MOMLROOT)
    is not under \$PTII ($PTII) so we are not
    appending \$PTINYOS_MOMLROOT to the Eclipse classpath.
    This is only a problem for Viptos users, who will not be able
    to view .nc files when running under Eclipse." >&5
$as_echo "$as_me: WARNING: \$PTINYOS_MOMLROOT ($PTINYOS_MOMLROOT)
    is not under \$PTII ($PTII) so we are not
    appending \$PTINYOS_MOMLROOT to the Eclipse classpath.
    This is only a problem for Viptos users, who will not be able
    to view .nc files when running under Eclipse." >&2;}
	            fi
                else
	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$PTINYOS_MOMLROOT_NO_CYGDRIVE does not exist" >&5
$as_echo "$as_me: WARNING: \$PTINYOS_MOMLROOT_NO_CYGDRIVE does not exist" >&2;}
                fi
	        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTINYOS_MOMLROOT" >&5
$as_echo "$PTINYOS_MOMLROOT" >&6; }; fi
            fi
        fi
        # The jars to the classpath
        updateClasspath "$PTINYOS_DIR/lib/nesc.jar"
        updateClasspath "$PTINYOS_DIR/lib/jdom.jar"

	# If TOSROOT is under $PTII, then add it to the classpat
	echo "$TOSROOT_NO_CYGDRIVE" | grep "$PTII" > /dev/null
	retval=$?
	if test "$retval" = "0"; then
		SHORT_TOSROOT_NO_CYGDRIVE=`echo "$TOSROOT_NO_CYGDRIVE" | sed "s@$PTII/@@"`
	        updateClasspath "$SHORT_TOSROOT_NO_CYGDRIVE"
        else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \$TOSROOT ($TOSROOT)is not
    under \$PTII ($PTII) so we are not
    appending \$TOSROOT to the Eclipse classpath.
    This is only a problem for Viptos users, who will not be able
    to view .nc files when running under Eclipse." >&5
$as_echo "$as_me: WARNING: \$TOSROOT ($TOSROOT)is not
    under \$PTII ($PTII) so we are not
    appending \$TOSROOT to the Eclipse classpath.
    This is only a problem for Viptos users, who will not be able
    to view .nc files when running under Eclipse." >&2;}
        fi
    fi
fi

if test ! -d "$TOSROOT"; then
       updateExcludes "ptolemy/domains/ptinyos/"
else
       PTTINYOS_DIR=ptinyos
fi

#--------------------------------------------------------------------
#       GiottoSDK is an embedded implementation of the Giotto language
#	www.eecs.berkeley.edu/~fresco/giotto
#
#       check to see if $PTII/vendors/giotto/giotto.jar exists
#--------------------------------------------------------------------

# PTGIOTTO_DIR is set to Giotto and used in
# $PTII/ptolemy/apps/makefile if giotto was found
PTGIOTTO_DIR=
#
if test ! -d "$PTII/ptolemy/domains/giotto"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/domains/giotto is not present,
    so we need not find the Giotto SDK." >&5
$as_echo "$PTII/ptolemy/domains/giotto is not present,
    so we need not find the Giotto SDK." >&6; }; fi
    GIOTTO_DIR='${PTII}/vendors/giotto'
    GIOTTO_CLASSES='${GIOTTO_DIR}/gdk.jar'
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for giotto directory" >&5
$as_echo_n "checking for giotto directory... " >&6; }

# Check whether --with-giotto was given.
if test "${with_giotto+set}" = set; then :
  withval=$with_giotto; GIOTTO_DIR=$withval
else
  GIOTTO_DIR=$PTII/vendors/giotto
fi


    GIOTTO_CLASSES=no
    if test -d "$GIOTTO_DIR"; then
    	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIOTTO_DIR" >&5
$as_echo "$GIOTTO_DIR" >&6; }; fi
      	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$GIOTTO_DIR/gdk.jar" >&5
$as_echo_n "checking for \$GIOTTO_DIR/gdk.jar... " >&6; }
	if test -f "$GIOTTO_DIR/gdk.jar"; then
	   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIOTTO_DIR/gdk.jar" >&5
$as_echo "$GIOTTO_DIR/gdk.jar" >&6; }; fi
	   GIOTTO_CLASSES='${GIOTTO_DIR}/gdk.jar'
	else
	   GIOTTO_CLASSES=no
        fi
    fi
    if test "$GIOTTO_CLASSES" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find giotto/gdk.jar
    perhaps Giotto is not installed?
    You need not download Giotto unless you plan on generating code for
    Giotto models.
    The Giotto SDK can be
    downloaded from https://embedded.eecs.berkeley.edu/giotto/
    Copy gdk.jar to $PTII/vendors/giotto, for example:
        mkdir -p $PTII/vendors/giotto
        cp C:/Program\ Files/Giotto*/gdk.jar $PTII/vendors/giotto/" >&5
$as_echo "$as_me: WARNING: Failed to find giotto/gdk.jar
    perhaps Giotto is not installed?
    You need not download Giotto unless you plan on generating code for
    Giotto models.
    The Giotto SDK can be
    downloaded from https://embedded.eecs.berkeley.edu/giotto/
    Copy gdk.jar to $PTII/vendors/giotto, for example:
        mkdir -p $PTII/vendors/giotto
        cp C:/Program\ Files/Giotto*/gdk.jar $PTII/vendors/giotto/" >&2;}
	# Note that we don't substitute in the ${PTII} or $(GIOTTO_DIR) here
	GIOTTO_DIR='${PTII}/vendors/giotto'
   	GIOTTO_CLASSES='${GIOTTO_DIR}/gdk.jar'
    else
	# Set to giotto and used in
	# $PTII/ptolemy/copernicus/java/ if giotto was found
	PTGIOTTO_DIR=giotto
    fi
fi

#--------------------------------------------------------------------
#       Vertx
#	http://vertx.io/
#       Vert.x is a lightweight, high performance application platform
#       for the JVM that's designed for modern mobile, web, and
#       enterprise applications.
#--------------------------------------------------------------------

# Vertx jars used by Vert.x modules in ptolemy/actor/lib/jjs
PTVERTX_JARS=

# Set to vertx if the Vertx jars are found
PTVERTX_DIR=

# Set to eventbus if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile
PTEVENTBUS_DIR=

# Set to httpClient if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile
PTHTTPCLIENT_DIR=

# Set to userInterface if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile
PTUSERINTERFACE_DIR=

# Set to textDisplay if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile
PTTEXTDISPLAY_DIR=

# Set to socket if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile
PTVERTX_SOCKET_DIR=

# Set to udpSocket if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile
PTUDPSOCKET_DIR=

# Set to webSocket if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile
PTWEBSOCKET_DIR=

# Set to packages that use Vert.x and used in $PTII/doc/makefile if the Vert.x jars are found
PTVERTX_PACKAGES=

# We only need to look for the Vertx jar files if PTWEBSOCKET_USER_DIR are present.
PTWEBSOCKET_USER_DIR="$PTII/ptolemy/actor/lib/jjs/modules/webSocket"

if test ! -d "$PTWEBSOCKET_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTWEBSOCKET_USER_DIR is not present,
    so we need not find the Vertx application platform interface." >&5
$as_echo "$PTWEBSOCKET_USER_DIR is not present,
    so we need not find the Vertx application platform interface." >&6; }; fi
else
    # PRE_JDK18 is set above.
    if test "$PRE_JDK18" = "yes"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Vertx requires Java 1.8 or later, you are running $JVERSION.
    Vertx is the application platform interface used in Accessor modules in ptolemy/actor/lib/jjs/modules.
    To use Vertx, choose a Java 1.8 or later JVM and rerun configure." >&5
$as_echo "$as_me: WARNING: Vertx requires Java 1.8 or later, you are running $JVERSION.
    Vertx is the application platform interface used in Accessor modules in ptolemy/actor/lib/jjs/modules.
    To use Vertx, choose a Java 1.8 or later JVM and rerun configure." >&2;}

    else

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Vertx application platform interface. " >&5
$as_echo_n "checking for the Vertx application platform interface. ... " >&6; }

# Check whether --with-oscp5 was given.
if test "${with_oscp5+set}" = set; then :
  withval=$with_oscp5; PTVERTX_JAR_DIR=$withval
else
  PTVERTX_JAR_DIR=$PTII/lib
fi

            if test -d "$PTVERTX_JAR_DIR"; then
	    PTEVENTBUS_DIR=eventbus
            PTHTTPCLIENT_DIR=httpClient
            PTHTTPSERVER_DIR=httpServer
            PTTEXTDISPLAY_DIR=textDisplay
            PTUDPSOCKET_DIR=udpSocket
            PTUSERINTERFACE_DIR=userInterface
            PTVERTX_SOCKET_DIR=socket
    	    PTVERTX_DIR=vertx
	    PTWEBSOCKET_DIR=webSocket
	    # Keep these alphabetic

# Use changequote here to preserve square brackets
            # Vert.x 3.x jars:
            #            jars="groovy-all-*.jar hazelcast-*.jar jackson-annotations-*.jar jackson-core-*.jar jackson-databind-*.jar netty-buffer-*.jar netty-codec-[^dh]*.jar netty-codec-dns-*.jar netty-codec-http-*.jar netty-codec-http2-*.jar netty-common-*.jar netty-handler-*.jar netty-resolver-[0-9]*.jar netty-resolver-dns-*.jar netty-transport-*.jar vertx-codegen-*.jar vertx-core-*.jar vertx-hazelcast-*.jar vertx-lang-groovy-*.jar vertx-lang-js-*jar vertx-lang-ruby-*.jar vertx-service-proxy-*.jar vertx-web-*jar"
            jars="hazelcast-*.jar jackson-annotations-*.jar jackson-core-*.jar jackson-databind-*.jar netty-buffer-*.jar netty-codec-[^dh]*.jar netty-codec-dns-*.jar netty-codec-http-*.jar netty-codec-http2-*.jar netty-common-*.jar netty-handler-*.jar netty-resolver-[0-9]*.jar netty-resolver-dns-*.jar netty-transport-*.jar vertx-codegen-*.jar vertx-core-*.jar vertx-hazelcast-*.jar vertx-lang-js-*jar vertx-service-proxy-*.jar vertx-web-*jar"

            for jar in $jars
    	    do
# Use changequote here to preserve square brackets
	        file=`find "$PTVERTX_JAR_DIR" -name "$jar" | sort -nr | head -1`
                if test -z $file; then
                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Hmm, while searching for Vert.x jar files, could not find $jar?" >&5
$as_echo "$as_me: WARNING: Hmm, while searching for Vert.x jar files, could not find $jar?" >&2;};
                fi
	        if test -e $file -a -f $file; then
	            PTVERTX_JARS="$PTVERTX_JARS\${CLASSPATHSEPARATOR}$file"
		    # If we don't find all the jars, then the classpath will have some of them.
		    # However, it is better to do this here in case the paths have spaces in them.
		    updateClasspath "$file"
	         else
	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to the Vertx file $jar in $PTVERTX_JAR_DIR." >&5
$as_echo "$as_me: WARNING: Failed to the Vertx file $jar in $PTVERTX_JAR_DIR." >&2;}
	            PTEVENTBUS_DIR=
                    PTHTTPCLIENT_DIR=
                    PTHTTPSERVER_DIR=
                    PTTEXTDISPLAY_DIR=
                    PTUDPSOCKET_DIR=
                    PTUSERINTERFACE_DIR=
                    PTVERTX_SOCKET_DIR=
    	            PTVERTX_DIR=
	            PTWEBSOCKET_DIR=
	            break;
                 fi
            done
        fi

        if test ! -z "$PTVERTX_DIR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTVERTX_JARS" >&5
$as_echo "$PTVERTX_JARS" >&6; }; fi
            # org.terraswarm.accessor depends on jjs/JavaScript.java so we
            # list org.terraswarm.accessor with jjs/JavaScript
	    PTVERTX_PACKAGES="org.terraswarm.accessor ptolemy.actor.lib.jjs.modules.eventbus ptolemy.actor.lib.jjs.modules.httpClient ptolemy.actor.lib.jjs.modules.httpServer ptolemy.actor.lib.jjs.modules.socket ptolemy.actor.lib.jjs.modules.textDisplay ptolemy.actor.lib.jjs.modules.udpSocket ptolemy.actor.lib.jjs.modules.userInterface ptolemy.actor.lib.jjs.modules.webSocket"
        fi
    fi
fi

if test -z "$PTVERTX_DIR"; then
    updateExcludes "ptolemy/actor/lib/jjs/modules/eventbus/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/httpClient/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/httpServer/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/socket/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/udpSocket/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/userInterface/"
    updateExcludes "ptolemy/actor/lib/jjs/modules/webSocket/"
    if test -d "$PTVERTX_USER_DIR" -o -d "$PTWEBSOCKET_USER_DIR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find the the Vertx application platform interface jar files,
    or a version of Java before 1.8 was found
    so ptolemy.actor.lib.jjs.modules.{browser,eventbus,httpClient,httpServersocket,udpSocket,webSocket}
    will not be compiled.
    Vertx consists of a number of jar files that are typically in $PTII/lib." >&5
$as_echo "$as_me: WARNING: Failed to find the the Vertx application platform interface jar files,
    or a version of Java before 1.8 was found
    so ptolemy.actor.lib.jjs.modules.{browser,eventbus,httpClient,httpServersocket,udpSocket,webSocket}
    will not be compiled.
    Vertx consists of a number of jar files that are typically in $PTII/lib." >&2;}
    fi
fi

#--------------------------------------------------------------------
#       WABA is the JDK for PalmOS
#	See if there was a command-line option for where
#       wabask is;  if not,
#       check to see if $PTII/vendors/misc/waba/wabasdk exists
#--------------------------------------------------------------------

# PTWABA_DIR is set to waba and used in
# $PTII/ptolemy/makefile if waba was found
PTWABA_DIR=
#
# We only need to look for waba if $PTII/ptolemy/apps/kvm exists
if test ! -d "$PTII/ptolemy/apps/kvm"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTII/ptolemy/apps/kvm is not present,
    so we need not find the PalmOS waba." >&5
$as_echo "$PTII/ptolemy/apps/kvm is not present,
    so we need not find the PalmOS waba." >&6; }; fi
    WABA_DIR='${PTII}/vendors/misc/waba/wabasdk'
    # Unfortunately, j2me_cldc does not ship with a jar of zip file
    # It needs to be built
    WABA_CLASSES='$(WABA_DIR)/classes'
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for waba directory" >&5
$as_echo_n "checking for waba directory... " >&6; }

# Check whether --with-waba was given.
if test "${with_waba+set}" = set; then :
  withval=$with_waba; WABA_DIR=$withval
else
  WABA_DIR=$PTII/vendors/misc/waba/wabasdk
fi


    if test -d "$WABA_DIR"; then
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WABA_DIR" >&5
$as_echo "$WABA_DIR" >&6; }; fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$WABA_DIR/classes" >&5
$as_echo_n "checking for \$WABA_DIR/classes... " >&6; }
	if test -d "$WABA_DIR/classes"; then
	    WABA_CLASSES='$(WABA_DIR)/classes'
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WABA_CLASSES" >&5
$as_echo "$WABA_CLASSES" >&6; }; fi
        else
	    WABA_CLASSES=no
        fi
    else
	if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found in $WABA_DIR" >&5
$as_echo "Not found in $WABA_DIR" >&6; }; fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for waba directory in /waba" >&5
$as_echo_n "checking for waba directory in /waba... " >&6; }
	# Likely place for waba under windows
	WABA_DIR=/waba/wabasdk
        if test -d "$WABA_DIR"; then
	    if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WABA_DIR" >&5
$as_echo "$WABA_DIR" >&6; }; fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$WABA_DIR/classes" >&5
$as_echo_n "checking for \$WABA_DIR/classes... " >&6; }
	    if test -d "$WABA_DIR/classes"; then
	        WABA_CLASSES='$(WABA_DIR)/classes'
	        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WABA_CLASSES" >&5
$as_echo "$WABA_CLASSES" >&6; }; fi
            else
	        WABA_CLASSES=no
            fi
        else
		WABA_CLASSES=no
        fi

    fi
    if test "$WABA_CLASSES" = "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find waba/wabasdk
    perhaps Waba is not installed?
    You need not download Waba unless you plan on building applications
    for the Palm Pilot or Handspring Visor.
    Waba can be downloaded from http://www.wabasoft.com" >&5
$as_echo "$as_me: WARNING: Failed to find waba/wabasdk
    perhaps Waba is not installed?
    You need not download Waba unless you plan on building applications
    for the Palm Pilot or Handspring Visor.
    Waba can be downloaded from http://www.wabasoft.com" >&2;}
	# Note that we don't substitute in the ${PTII} or $(WABA_DIR) here
	WABA_DIR='${PTII}/vendors/misc/waba/wabasdk'
   	WABA_CLASSES='$(WABA_DIR)/classes'
    else
	# Set to waba and used in
	# $PTII/ptolemy/makefile if waba was found
	PTWABA_DIR=waba
    fi
fi

#--------------------------------------------------------------------
#       webcam-capture is used by the webcam accessor
#	Source may be found at
#--------------------------------------------------------------------

# Set to cameras and used in ptolemy/actor/lib/jjs/modules/makefile
# if webcam-capture*.jar and other jar files are found.
PTCAMERAS_DIR=

# Jar files used in ptolemy/actor/lib/jjs/modules/webcam/makefile
PTWEBCAMCAPTURE_JARS=

# PTWEBCAMCAPTURE_PACKAGES is used in doc/makefile
PTWEBCAMCAPTURE_PACKAGES=

# We only need to look for webcam-capture if $PTII/ptolemy/actor/lib/jjs/modules/cameras is present
WEBCAMCAPTURE_USER_DIR=$PTII/ptolemy/actor/lib/jjs/modules/cameras

# We only need to look for xbjlib if $PTII/ptolemy/actor/lib/jjs/modules/xbee is present.
# XBJLIB is here because both xbjlib and webcam-capture use slf4j-api and sl4j-nop.
XBJLIB_USER_DIR="$PTII/ptolemy/actor/lib/jjs/modules/xbee"

# Look for slf4j-api and slf4j-simple jar files
PTSLF4J_API_JAR=""
PTSLF4J_SIMPLE_JAR=""
if test -d "$WEBCAMCAPTURE_USER_DIR" -o -d "$XBJLIB_USER_DIR"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for slf4-api" >&5
$as_echo_n "checking for slf4-api... " >&6; }

# Check whether --with-slf4j-api was given.
if test "${with_slf4j_api+set}" = set; then :
  withval=$with_slf4j_api; PTSLF4J_API_JAR=$withval
else
  PTSLF4J_API_JAR=$PTII/lib/slf4j-api-1.7.13.jar
fi

    if test -f "$PTSLF4J_API_JAR"; then
        if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTSLF4J_API_JAR" >&5
$as_echo "$PTSLF4J_API_JAR" >&6; }; fi
        updateClasspath "$PTSLF4J_API_JAR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for slf4-simple" >&5
$as_echo_n "checking for slf4-simple... " >&6; }

# Check whether --with-slf4j-simple was given.
if test "${with_slf4j_simple+set}" = set; then :
  withval=$with_slf4j_simple; PTSLF4J_SIMPLE_JAR=$withval
else
  PTSLF4J_SIMPLE_JAR=$PTII/lib/slf4j-simple-1.7.13.jar
fi

        if test -f "$PTSLF4J_SIMPLE_JAR"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTSLF4J_SIMPLE_JAR" >&5
$as_echo "$PTSLF4J_SIMPLE_JAR" >&6; }; fi
            updateClasspath "$PTSLF4J_SIMPLE_JAR"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTSLF4J_SIMPLE_JAR, so the accessors in
    $WEBCAMCAPTURE_USER_DIR and $XBJLIB_USER_DIR will not work." >&5
$as_echo "$as_me: WARNING: Failed to find $PTSLF4J_SIMPLE_JAR, so the accessors in
    $WEBCAMCAPTURE_USER_DIR and $XBJLIB_USER_DIR will not work." >&2;}
        fi
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTSLF4J_API_JAR, so the accessors in
    $WEBCAMCAPTURE_USER_DIR and $XBJLIB_USER_DIR will not work." >&5
$as_echo "$as_me: WARNING: Failed to find $PTSLF4J_API_JAR, so the accessors in
    $WEBCAMCAPTURE_USER_DIR and $XBJLIB_USER_DIR will not work." >&2;}
    fi

fi

# We only need to look for webcam-capture*.jar if the directory that uses it exists.
if test ! -d "$WEBCAMCAPTURE_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WEBCAMCAPTURE_USER_DIR is not present,
    so we need not find webcam-capture." >&5
$as_echo "$WEBCAMCAPTURE_USER_DIR is not present,
    so we need not find webcam-capture." >&6; }; fi
else
    if test ! -z "$PTSLF4J_API_JAR" -a ! -z "$PTSLF4J_SIMPLE_JAR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for webcam-capture" >&5
$as_echo_n "checking for webcam-capture... " >&6; }

# Check whether --with-webcam-capture was given.
if test "${with_webcam_capture+set}" = set; then :
  withval=$with_webcam_capture; PTWEBCAMCAPTURE_JAR=$withval
else
  PTWEBCAMCAPTURE_JAR=$PTII/lib/webcam-capture-0.3.12.jar
fi


        if test -f "$PTWEBCAMCAPTURE_JAR"; then
            PTBRIDG_JAR="$PTII/lib/bridj-0.7.0.jar"
            if test -f "$PTBRIDG_JAR"; then
                if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTWEBCAMCAPTURE_JAR" >&5
$as_echo "$PTWEBCAMCAPTURE_JAR" >&6; }; fi
                PTCAMERAS_DIR=cameras
                PTWEBCAMCAPTURE_JARS="$PTWEBCAMCAPTURE_JAR\${CLASSPATHSEPARATOR}$PTBRIDG_JAR"
                PTWEBCAMCAPTURE_PACKAGES=ptolemy.actor.lib.jjs.modules.cameras
                updateClasspath "$PTWEBCAMCAPTURE_JAR"
                updateClasspath "$PTBRIDG_JAR"
            else
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTBRIDG_JAR
   perhaps webcam-capture was not installed from
   https://github.com/sarxos/webcam-capture?
   The webcam accessor will not be compiled." >&5
$as_echo "$as_me: WARNING: Failed to find $PTBRIDG_JAR
   perhaps webcam-capture was not installed from
   https://github.com/sarxos/webcam-capture?
   The webcam accessor will not be compiled." >&2;}
           fi
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find $PTWEBCAMCAPTURE_JAR
   perhaps webcam-capture was not installed from
   https://github.com/sarxos/webcam-capture?
   The webcam accessor will not be compiled." >&5
$as_echo "$as_me: WARNING: Failed to find $PTWEBCAMCAPTURE_JAR
   perhaps webcam-capture was not installed from
   https://github.com/sarxos/webcam-capture?
   The webcam accessor will not be compiled." >&2;}
	PTWEBCAMCAPTURE_JARS=
        fi
    fi
fi

if test -z "$PTCAMERAS_DIR"; then
   updateExcludes "ptolemy/actor/lib/jjs/modules/cameras/"
fi

#--------------------------------------------------------------------
#       XBee are wireless devices that are connected to via serial
#       We are using nrjavaserial from https://github.com/NeuronRobotics/nrjavaserial/, so we have our own custom version of xbjlib.
#       See https://chess.eecs.berkeley.edu/ptexternal/wiki/Main/XBee
#--------------------------------------------------------------------
# We only need to look for xbjlib if $PTII/ptolemy/actor/lib/jjs/modules/xbee is present
# See the webcam-capture section for the setting of XBJLIB_JAR
XBJLIB_JAR_DEFAULT='${PTII}/lib/xbjlib-1.1.0.nrjavaserial.jar'

# Jar files used in ptolemy/actor/lib/jjs/modules/xbee/makefile
PTXBJLIB_JARS=

# PTXBEE_DIR is set to xbee and used in
# $PTII/ptolemy/actor/lib/jjs/modules/makefile if the XBee Java Interface was found
PTXBEE_DIR=
if test ! -d "$XBJLIB_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XBJLIB_USER_DIR is not present,
    so we need not find the XBee xbjlib." >&5
$as_echo "$XBJLIB_USER_DIR is not present,
    so we need not find the XBee xbjlib." >&6; }; fi
    # Use curly brackets around PTII so that if xbjlib is not present
    # then ${PTII} will appear in ptinvoke.
else
    if test ! -z "$PTSLF4J_API_JAR" -a ! -z "$PTSLF4J_SIMPLE_JAR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xbjlib directory" >&5
$as_echo_n "checking for xbjlib directory... " >&6; }

# Check whether --with-rxtx was given.
if test "${with_rxtx+set}" = set; then :
  withval=$with_rxtx; XBJLIB_JAR=$withval
else
  XBJLIB_JAR=$PTII/lib/xbjlib-1.1.0.nrjavaserial.jar
fi


        if test -f "$XBJLIB_JAR"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XBJLIB_JAR" >&5
$as_echo "$XBJLIB_JAR" >&6; }; fi
            PTXBEE_DIR=xbee
            # PTXBJLIB_PACKAGES is used in ptII/doc/makefile
            PTXBJLIB_PACKAGES="ptolemy.actor.lib.jjs.modules.xbee"
            PTXBJLIB_JARS="$XBJLIB_JAR"
            updateClasspath "$XBJLIB_JAR"
        else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Did not find
    '$XBJLIB_JAR'" >&5
$as_echo "Did not find
    '$XBJLIB_JAR'" >&6; }
        fi
    fi
fi

if test -d "$XBJLIB_USER_DIR"; then
    if test -z "$PTXBEE_DIR"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $XBJLIB_USER_DIR exists, but the XBee Java Library xbjlib is not installed?
        You need not use xbjlib unless you plan on using the XBee Accessor
        in ptolemy/actor/lib/jjs/modules/xbee" >&5
$as_echo "$as_me: WARNING: $XBJLIB_USER_DIR exists, but the XBee Java Library xbjlib is not installed?
        You need not use xbjlib unless you plan on using the XBee Accessor
        in ptolemy/actor/lib/jjs/modules/xbee" >&2;}
        XBJLIB_JAR="$XBJLIB_JAR_DEFAULT"
        updateExcludes "ptolemy/actor/lib/jjs/modules/xbee"
    fi
fi

#--------------------------------------------------------------------
#       libexpat is used by the lbnl simulation interface in ptII/lbnl
#--------------------------------------------------------------------

# The include and lib dirs for libexpat
LIBEXPAT_INCLUDE_DIR=
LIBEXPAT_LIB_DIR=

# PTLIBEXPAT_DIR is set util if LIBEXPAT_INCLUDE_DIR and LIBEXPAT_LIB_DIR are set
PTLIBEXPAT_DIR=

# PTLBNL_DIR is set to lbnl if LIBEXPAT_INCLUDE_DIR and LIBEXPAT_LIB_DIR are set
PTLBNL_DIR=

LIBEXPAT_USER_DIR=$PTII/lbnl/lib/util
if test ! -d "$LIBEXPAT_USER_DIR"; then
    if test "${PTVERBOSE:-none}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT_USER_DIR is not present,
    so we need not find libexpat." >&5
$as_echo "$LIBEXPAT_USER_DIR is not present,
    so we need not find libexpat." >&6; }; fi
else
    # Cygwin gcc can be used to compile files that do not link
    # with Java, so we don't need mingw here
    # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCC="$PTCC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCC=$ac_cv_path_PTCC
if test -n "$PTCC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCC" >&5
$as_echo "$PTCC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test "${PTCC:-none}" = "none"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc" >&5
$as_echo "$as_me: WARNING: Failed to find gcc" >&2;}
        # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTCC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PTCC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PTCC="$PTCC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PTCC="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PTCC=$ac_cv_path_PTCC
if test -n "$PTCC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCC" >&5
$as_echo "$PTCC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "${PTCC:-none}" != "none"; then
            if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTCC" >&5
$as_echo "$PTCC" >&6; }; fi
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find gcc or cc, so we will
    not be able use LIBEXPAT in $LIBEXPAT_USER_DIR" >&5
$as_echo "$as_me: WARNING: Failed to find gcc or cc, so we will
    not be able use LIBEXPAT in $LIBEXPAT_USER_DIR" >&2;};
        fi
    fi

    if test "${PTCC:-none}" != "none"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
$as_echo_n "checking for libexpat... " >&6; }
       # FIXME: This will not work if $PTII has spaces
       dirs="$PTII/vendors/libexpat /usr/local/lib /usr/lib64 /usr/lib /lib"
       for dir in $dirs
       do
	   # Mac OS X could have jnilib or dylib,
	   # Cygwin has /usr/lib/libexpat.dll.a
	   # Ubuntu could have .so.2 or /usr/lib/x86_64-linux-gnu/libexpat.so
	   if test -d $dir; then
	       libexpat=`$FIND $dir -name "libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX}" -o -name "libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX2}" | head -1`

               if test -f "$libexpat"; then
                   if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libexpat}" >&5
$as_echo "$libexpat}" >&6; }; fi
	           LIBEXPAT_LIB_DIR=`dirname $libexpat`
	           break;
               fi
           fi
       done
       if test ! -d "$LIBEXPAT_LIB_DIR"; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX}
    The LBNL Simulation facility in \$PTII/lbnl/lib/util requires libexpat.
    However, Ptolemy will run without this facility." >&5
$as_echo "$as_me: WARNING: Failed to find libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX}
    The LBNL Simulation facility in \$PTII/lbnl/lib/util requires libexpat.
    However, Ptolemy will run without this facility." >&2;}
       fi
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expat.h" >&5
$as_echo_n "checking for expat.h... " >&6; }

# Check whether --with-expat-include was given.
if test "${with_expat_include+set}" = set; then :
  withval=$with_expat_include; LIBEXPAT_INCLUDE_DIR=$withval
else
  LIBEXPAT_INCLUDE_DIR=/usr/include
fi


    if test -f "$LIBEXPAT_INCLUDE_DIR/expat.h"; then
       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT_INCLUDE_DIR/expat.h" >&5
$as_echo "$LIBEXPAT_INCLUDE_DIR/expat.h" >&6; }; fi
    else
       # FIXME: This will not work if $PTII has spaces
       dirs="$PTII/vendors/libexpat /usr/local/include /opt/local/include /usr/include"
       for dir in $dirs
       do
           if test -f "$dir/expat.h"; then
               LIBEXPAT_INCLUDE_DIR=$dir
	       if test "${PTVERBOSE:-none}" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT_INCLUDE_DIR/expat.h" >&5
$as_echo "$LIBEXPAT_INCLUDE_DIR/expat.h" >&6; }; fi
           fi
       done
       if test ! -f "$LIBEXPAT_INCLUDE_DIR/expat.h"; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find expat.h
    Checked the following directories:
    $dirs
    The LBNL Simulation facility in \$PTII/lbnl/lib/util requires libexpat.
    However, Ptolemy will run without this facility.
    To install expat under MacOS, try
       sudo port install expat
    and then rerun configure." >&5
$as_echo "$as_me: WARNING: Failed to find expat.h
    Checked the following directories:
    $dirs
    The LBNL Simulation facility in \$PTII/lbnl/lib/util requires libexpat.
    However, Ptolemy will run without this facility.
    To install expat under MacOS, try
       sudo port install expat
    and then rerun configure." >&2;}
       fi
   fi
fi

if test -f "$LIBEXPAT_INCLUDE_DIR/expat.h" -a -d "$LIBEXPAT_LIB_DIR"; then
    # Used in $PTII/lbnl/lib/makefile
    PTLIBEXPAT_DIR=util
    # Used in $PTII/makefile
    PTLBNL_DIR=lbnl
    # Used in lbnl/demo/makefile because make can call make on lib/util
    PTLBNL_CROOM_DIR=CRoom
    PTLBNL_CROOM_JAR=CRoom/CRoom.jar
    # Set to the lbnl jars that need to be signed if libexpat was found
    # and used in jnlp.mk.
    PTLBNL_JARS="lbnl/lbnl.jar lbnl/demo/demo.jar"
    # Used in $PTII/doc/makefile
    PTLBNL_PACKAGES="lbnl.actor.lib lbnl.actor.lib.net lbnl.lib.labview lbnl.lib.xml.src lbnl.util"

    if test -d "$FMIPP_USER_DIR"; then
        if test -f "$PTBOOST_INCLUDE_DIR/boost/numeric/odeint.hpp"; then
            PTBOOST=yes
	    PTFMIPP_DIR=fmipp
	    PTFMIPP_PACKAGES="ptolemy.actor.lib.fmi.fmipp ptolemy.actor.lib.fmi.fmipp.swig"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find boost/numeric/odeint.hpp, so FMI ++
    will not be compiled. FMI++ is an extension of the
    Functional Mockup Interface, see
    http://sourceforge.net/p/fmipp/wiki/Home/" >&5
$as_echo "$as_me: WARNING: Failed to find boost/numeric/odeint.hpp, so FMI ++
    will not be compiled. FMI++ is an extension of the
    Functional Mockup Interface, see
    http://sourceforge.net/p/fmipp/wiki/Home/" >&2;}
            updateExcludes "ptolemy/actor/lib/fmi/fmipp/"
        fi
    fi
fi

# Packages to exclude from Ant targets that call javadoc
ANT_JAVADOC_EXCLUDEPACKAGENAMES=`echo "$ANT_ALWAYS_EXCLUDE $ANT_EXCLUDE"| sed 's@<exclude name="@@g' | sed 's@" */>@@g' | sed 's@/@.@g' | awk '{for (i=1;i <= NF; i++) { if ($i !~ /\*\*/) {printf("%s*,", $i)}}}'`


# Warnings about $PTII being set incorrectly
if test ! -f confdefs.h; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: confdefs.h was not found.  Typically, this
    could happen if \$PTII ($PTII) is not the same as the
    current directory (\`pwd\`)" >&5
$as_echo "$as_me: WARNING: confdefs.h was not found.  Typically, this
    could happen if \$PTII ($PTII) is not the same as the
    current directory (\`pwd\`)" >&2;}
fi

if test ! -z "$FINAL_WARNING"; then
   echo "CRITICAL WARNING: $FINAL_WARNING"
   echo "Please fix the above before attempting to build."
fi


# Keep these substitutions alphabetical, with a description

# Path to the ant binary, stored in lib/ptII.properteries, used while importing accessors in org/terraswarm/accessor/JSAccessor.java


# Paths to always exclude in Ant's build.xml


# Jar files to include in Ant's build.xml


# Paths to exclude in Ant's build.xml


# Paths of tests to exclude in Ant's build.xml


# Packages to exclude from Ant targets that call javadoc


# Variables used in build.xml by Ant to run Mav







# Path of directories that contain source, used by the Ant's build rule.


# Directory that contains the Caltrop jar file ptCal.jar
# used by bin/ptinvoke.in


# The directory that contains the Checkstyle jar file.  Used in build.xml.in.


# The Checkstyle jar file, used for code coverage.  Used in build.xml.in.


# Directory that contains chic.jar.
# Chic is a modular verifier for behavioral compatibility checking of
# software and hardware components.
# Used in bin/ptinvoke.in


# Separator in CLASSPATH,  For Unix, this should be :, for Cygwin use ;


# Directory that contains colt.jar
# Colt is a "Open Source Libraries for High Performance Scientific
# and Technical Computing in Java" used in bin/ptinvoke.in


# The directory that contains the Cobertura jar file.  Used in build.xml.in.


# The Cobertura jar file, used for code coverage.  Used in build.xml.in.


# Directory that contains the CaffeineMark Java Benchmark kit
# used by C code generation in copernicus/c


# Text for .classpath.  Under all platforms other than Mac OS X, this will be:
# <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
# Under Mac OS X, the plug-ins will not work in the project, see
# http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Mac#EclipseProblems


# Location of Eclipse, which is used by ptolemy/backtracking (no longer)


# Location of GNU Awk, used by maven


# Directory that contains gc.h, used in copernicus/c


# GC_LD_DIRECTIVE is set to the values to pass to cc or ld if
# GC_malloc() can be found either in the default compiler location
# or in $PTII/lib.
# GC_LD_DIRECTIVE is used in ptolemy/copernicus/c/


# Eclipse .classpath excluding src values
# of the form "vendors/|ptolemy/matlab/"


# Eclipse .classpath lib elements of the format
#    <classpathentry kind="lib" path="lib/diva.jar"/>


# ImageJ jar file


# Jar files for Java Advanced Imaging (JAI) used by ptolemy/actor/lib/jai/makefile


# The jar command


# Command to run that indexes a jar file named tmp.jar
# Usually it looks like '"$(JAR)" -i $@'


# The jarsigner command is used to create signed jar files for Webstart JNLP files


# Location of rt.jar, usually $(PTJAVA_HOME)/lib/rt.jar
# However, we have to be careful of backslashes and /cygwin
# Soot uses this variable to find java.lang.Object


# JAVA3D_JARS is the jar files to use with Java 3D.  Usually, this is
# empty, because most installations have Java 3D in the jdk
# jre/lib/ext directory, but some do not. If --with-java3D was used
# with configure, then JAVA3D_JARS will be set to include the jars.


# javac binary


# javacc binary


# javacc command line arguments, -STATIC=false if javacc is 5.0 or later.


# Directory that contains JavaCC, which is used in ptolemy/data/expr


# The JavaCV jar file, used in actor/lib/opencv/javacv for computer vision


# The javadoc binary, used to create html documentation of java classes.


# The javah binary, used by jni for matlab.


# The javaws command is used to test Webstart JNLP files.


# Location of jce.jar, usually $(PTJAVA_HOME)/lib/jce.jar
# Java 1.5 has javax.crypto.Cipher in jce.jar
# However, we have to be careful of backslashes and /cygwin
# Soot uses this variable to find java.lang.Object


# If we are running under JDK1.4, then set JDOCBREAKITERATOR = -breakiterator


# Ptalon uses generics, if we are running JDK1.5,
# then JDOCSOURCEFLAGS = -source 1.5


# If we can compile in doc/doclets, we set JDOCTAG appropriately
# and use JDOCTAG in doc/makefile


# If we can compile in doc/doclets, we set JDOCTAGLET appropriately
# and use JDOCTAGLET in doc/makefile


# Jini home directory, see https://jini.dev.java.net/


# If Jini is present, the set to yes, otherwise, set to no


# Jar file that contains Joystick interface,
# see http://sourceforge.net/projects/javajoystick/


# jtclsh script, used for test suites


# jjtree binary


# jjtree command line arguments, -STATIC=false if javacc is 5.0 or later.


# JDK Version determined by running confTest.class and getting java.version


# The Major and Minor version of the JDK.  1.6, 1.8 etc.  Used by ant in build.xml.in.


# Jar files for Java Media Framework (JMF) used by ptolemy/actor/lib/makefile


# Directory that contains JModelica.


# Java Native Access jar file (jna.jar).  See
# https://jna.dev.java.net/.  Used in ptolemy/actor/lib/opencv


# jode.jar used in bin/ptinvoke to start up Jode, the .class disassembler



# Used in many test/makefiles


# Jython home directory that contains jython.jar, see http://www.jython.org


# keytool command used to generate a certificate for testing actor.lib.security actors


# The Kieler jar file, used to layout models


# kvm/tools/classes.jar file used by the PalmOS KVM


# Directory that contains the kvm used by PalmOS


# Set to the location of the lejos installation, usually in
# $PTII/vendors/lejos


# Set to the directory that contains expat.h and used in $PTII/lbnl/lib/util


# Set to the directory that contains libexpat.{so,jnilib,dll} and used in $PTII/lbnl/lib/util


# The major type of OS we are running under.
# Under all forms Windows, this should be Windows; ynder Linux: Linux, etc.
# Used in ptolemy/matlab/makefile


# Set to the location of the matlab installation, e.g. /matlabr11
# This directory usually contains bin,...


# Set the location of Matlab's engine libraries


# Set the location of Matlab's engine libraries (64bit)


# Mysql Java Database jar (mysql-connector-java-5.1.6-bin.jar),
# used by domains/space and actor/lib/database


# Jar file for Open Computer Vision (OpenCV)


# Oracle Java Database jar (ojdbc6.jar), used by domains/space
# and actor/lib/database


# Set to $PTII/lib if $PTII/lib/mapss.jar was found and used
# in $PTII/bin/ptinvoke.in


# Set to accessor and used in org/terraswarm/accessors/makefile if Nashorn is found.


# The value of the --add-modules argument, used in JDK 9 and later to find JavaFX


# The value of the addmodule argument for Ant and make
if test ! -z "$PTADD_MODULES"; then
   PTADD_MODULES_ANT="<jvmarg line=\"--add-modules $PTADD_MODULES\"/>"


   # Really? Ant javac task has no way to specify --add-modules?
   PTADD_MODULES_ANT_JAVAC="<compilerarg line=\"--add-modules $PTADD_MODULES\"/>"


   PTADD_MODULES_COMMAND_LINE="--add-modules $PTADD_MODULES"

fi

# Set to lib/asm-all-5.2.jar if ASM, which is used by Nashorn, the JavaScript engine, is found.


# Set to backtrack if Java 1.5 or later is present


# Set to eclipse if Eclipse was found


# Plugin Eclipse jar files, used by $PTII/doc


# Eclipse jar files used by ptolemy/backtrack


# Ptolemy II packages that use Eclipse
# PTBACKTRACK_PACKAGES is used in ptII/doc/makefile


# Set to the directory that contains boost/numeric/odeint.hpp
# and used in actor/lib/fmi/fmipp


# Set to the BSH jar file and used to compile org/mlc


# Set to mlc and used in $PTII/org/makefile if Java Bean Shell is found.


# PTBSH_RUN_DIR is set to run and used in
# $PTII/ptolemy/actor/gui/makefile if bsh.jar was found.


# Set to the packages that require bsh and used in $PTII/doc/makefile


# Set to caltrop and used in $PTII/ptolemy/makefile if Cal was found.


# Set to cameras and used in ptolemy/actor/lib/jjs/modules/makefile
# if webcam-capture*.jar and other jar files are found.


# Set to gcc if gcc was found and used in $PTII/ptolemy/matlab/makefile.


# Set to mingw32-gcc or gcc and used in $PTII/ptolemy/matlab/makefile and jni


# Set to chic and used in $PTII/ptolemy/makefile if chic was found.


# PTCM_DIR is set to cm and used in $PTII/ptolemy/copernicus/c/test/makefile
# if the CaffeineMark Java Benchmark kit is found



# Set to colt and used in $PTII/ptolemy/actor/lib/makefile if colt was found.


# Colt jar files.  We ship $PTII/lib/ptcolt.jar, which is a subset
# of $PTII/vendors/misc/colt.jar


# Ptolemy II packages that use COLT
# PTCOLT_PACKAGES is used in ptII/doc/makefile


# PTCOMM_DIR is set to comm and used in
# $PTII/ptolemy/actor/lib/makefile if the Java Communications API was found
#


# Ptolemy II packages that use the Java Serial Communication facility
# PTCOMM_PACKAGES is used in ptII/doc/makefile


# Set to copernicus and used in $PTII/ptolemy/makefile if Soot was found


# PTCORBA_DIR is used in ptolemy/actor/makefile


# PTCORBA_PACKAGES is used in ptII/doc/makefile


# PTCUNIT_DIR is set to test and used in
# ptolemy/cg/kernle/generic/program/procedural/c/type
# if CUnit is found


# PTDATABASE_DIR is set to database and used in
# $PTII/ptolemy/actor/lib/makefile if ojdbc6.jar was found.


# PTDATABASE_JNLP_JARS is set to the database jars that need to be signed
# and used in mk/jnlp.mk


# PTDATABASE_PACKAGES is set if ojdbc6.jar was found and
# used in ptII/doc/makefile


# Set to distributed and used in
# $PTII/ptolemy/makefile if jini was found


# Set to jini jar file and used
# $PTII/ptolemy/distributed/*/makefile if jini was found


# Ptolemy II packages that use the distributed
# PTDISTRIBUTED_PACKAGES is used in ptII/doc/makefile


# PTDOCLETS_DIR is set to doclets and used in
# $PTII/doc if tools.jar can be found.


# Set to eventbus if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile


# PTEXCEL_DIR is set to excel and used in
# $PTII/ptolemy/actor/lib/makefile if jxl was found


# PTEXCEL_PACKAGES is used in doc/makefile


# PTFMI_DIR is set to fmi if jna.jar was found
# $PTII/ptolemy/actor/lib/makefile uses PTFMI_DIR


# PTFMI_PACKAGES is used in doc/makefile


# Set to fmipp and used in ptolemy/actor/lib/fmi/makefile if odeint.hpp is found.


# PTFMIPP_PACKAGES is used in doc/makefile


# The G4LTL jar file, used for Import an FSMActor using LTL synthesis (G4LTL)


# If the g4ltl.jar file is set, then PTG4LTL_DIR is set to g4ltl and used in vergil/actor/makefile.


# Packages in Ptolemy that depend on g4ltl.jar


# Set to -I$PTII/mescal/include or -I/usr/local/include if gmp.h is found
# and used in $PTII/mescal/relsat


# Set to -Wl,-R$PTII/mescal/lib or -Wl,-R/usr/local/lib if the gmp
# libraries are found and used in $PTII/mescal/relsat


# Set to -L$PTII/mescal/lib or -L/usr/local/lib if the gmp libraries are found
# and used in $PTII/mescal/relsat


# Name of the jar file that includes the GR domain if Java 3D was found.
# Used in domains/makefile.


# The full path (ptolemy/domains/gr/gr.jar) to the gr.jar file.  Used in mk/jnlp.mk


# Ptolemy II packages that use the Java 3D facility
# PTGR_PACKAGES is used in ptII/doc/makefile


# Set to hlacerti and used in $PTII/ptolemy/apps/makefile is lib/jcerti.jar is found


# Ptolemy II packages that use jcerti.


# Set to homer and used in $PTII/ptolemy/makefile if the netbeans visual gui code is found.


# Netbeans Jar files necessary for compilation of homer


# Ptolemy II packages that use Netbeans gui code


# Set to httpClient if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile


# Set to httpServer if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile


# Location of the the PTII directory
# $PTII/ptolemy/plot/ptplot.jnlp.in reads this


# Set to itextpdf and used in
# $PTII/ptolemy/vergil/basic/export/makefile if iText.jar was found


# iText PDF jar file.  iText is from
# http://itextpdf.com


# PTITEXTPDF_PACKAGES is used in ptII/doc/makefile if iTextjar is found


# PTIMUSENSOR_DIR is set to IMUSensor and used in ptolemy/actor/lib/jjs/modules/makefile if the Java Communications API was found


# Set to ptjacl and used in
# $PTII/ptolemy/actor/gui/makefile if ptjacl.jar was found


# ptjacl.jar file, used to run the test suites


# Set to jai and used in
# $PTII/ptolemy/actor/lib/makefile if Java Advanced Imaging was found


# Ptolemy II packages that use Java Advanced Imaging
# PTJAI_PACKAGES is used in ptII/doc/makefile


# Set to javacv and used in
# $PTII/ptolemy/actor/lib/opencv/makefile if JavaCV was found


# Ptolemy II packages that use JavaCV.
# PTJAVACV_PACKAGES is used in ptII/doc/makefile


# Location of the JDK


# Location of the JDK


# Value of java.home property, location of the JDK with /cygdrive/c/ converted to c:/


# Set to include packages that require Java 1.8, but do not require Vertx or other optional packages and used in doc/makefile.


# Location of the JDK


# Set to gr and used in
# $PTII/ptolemy/domains/makefile if Java 3D was found


# PTJAVAFX_DIR is used in ptolemy/actor/lib/jjs/modules


# PTJAVAFX_JAR is used in ptolemy/actor/lib/jjs/modules


# PTJAVAFX_PACKAGES is used in ptII/doc/makefile


# Set to mail and used in
# $PTII/ptolemy/actor/lib/makefile if JavaMail's javax.mail.jar was found.


# Java OpenGL (JavaMail) jar files.   Used to compile the mail actors.


# Ptolemy II packages that use JavaMail framework.
# PTJMF_PACKAGES is used in ptII/doc/makefile.


# lib/jcerti.jar, used by ptolemy/apps/hlacerti


# Set to jjs and used in org/terraswarm/accessors/makefile if Nashorn (present in Java 1.8) is found.


# PTJJS_PACKAGES used in ptII/doc/makefile


# Set to jmf if jmf.jar was found


# Ptolemy II packages that use Java Media Framwork
# PTJMF_PACKAGES is used in ptII/doc/makefile


# PTJMODELICA_DIR is set to jmodelica if JModelica was found
# $PTII/ptolemy/actor/lib/fmi/fmus/makefile uses PTJMODELICA_DIR


# PTJMODELICA_PACKAGES is used in doc/makefile


# Set to jni if we can compile Java Native Interface code and used in ptolemy/actor/lib/fmi/makefile


# JNI architecture, used to compile C files


# set to jni include directory


# Set to -ldl for use by jni/launcher/makefile under Linux


# JNI lib architecture, used to run jni/launcher


# Flag to use with TinyOS under Cygwin (-mno-cygwin)


# GCC shared flag.  Usually -shared, except on the mac, where it is -dynamiclib


# JNI shared library C compiler flag, under Solaris this would be -fPIC.


# JNI shared library linker flag, under Solaris this would be -fPIC.


# JNI shared library prefix, under Solaris this would be lib.


# JNI shared library suffix, under Windows this would be dll.


# JNI shared library suffix, under Mac OS X, this would by dylib


# JNI libraries needed to link, such as -lcygwin (Used by Viptos)


# Set to $PTII/vendors/jogl/* and used in ptinvoke.in under Mac OS X.


# Set to joystick if Joystick.jar was found


# Ptolemy II packages that use the Java Joystick facilty
# PTJOYSTICK_PACKAGES is used in ptII/doc/makefile


# Set to json and used in $PTII/org/makefile if the JavaScript Object Notation was found.


# Set to actor/lib/conversions/json/json.jar and used in $PTII/ptolemy/makefile if org/json was found.


# Set to json.org and used in $PTII/doc/makefile if JSON was found.


# JSoup jar files used by export html facility


# Set to jsoup if jsoup is found and used in $PTII/ptolemy/vergil/basic/export/makefile


# Set to ptolemy.vergil.basic.export.html.jsoup and used int $PTII/doc/makefile if jsoup is found.


# Set to junit and used in $PTII/util/testsuite/makefile if junit was found.


# PTJUNIT_PACKAGES is used in ptII/doc/makefile


# Used in ptolemy/actor/lib/excel/makefile


# Set to python if jython.jar was found


# Ptolemy II packages that use Jython
# PTJYTHON_PACKAGES is used in ptII/doc/makefile


# Set to kieler and used in
# $PTII/ptolemy/vergil/basic/layout/makefile if kieler was found


# Set to kvm and used in
# $PTII/ptolemy/apps/makefile if kvm was found


# Set to lbnl and used in $PTII/makefile if libexpat was found.


# Set to CRoom if libexpat is found and used in lbnl/demo/makefile


# Set to CRoom/CRoom.jar if libexpat is found and used in lbnl/demo/makefile


# Set to the lbnl jars that need to be signed if libexpat was found
# and used in jnlp.mk and $PTII/doc/makefile.


# PTLBNL_PACKAGES is set to the packages in lbnl if libexpat was found and
# used in ptII/doc/makefile.


# Set to lego and used in
# $PTII/ptolemy/apps/makefile if the Java Communications API was found


# Set to lejos and used in
# $PTII/ptolemy/apps/makefile if the Java Communications API was found
# and Legos was found


# Set to util and used in $PTII/lbnl/lib/makefile if libexpat was found


# Set to gcc or cl and used in
# $PTII/ptolemy/matlab/makefile if the Matlab was found.


# Set to -m64 under Solaris if libs are in bin/sol64
# and used $PTII/ptolemy/matlab/makefile if the Matlab was found.


# Set to matlab and used in
# $PTII/ptolemy/makefile if the Matlab was found.


# Set to the matlab jars that need to be signed if matlab was found.
# Used in jnlp.mk


# Linker args for Matlab
# $PTII/ptolemy/matlab/makefile


# Linker args for Matlab
# $PTII/ptolemy/matlab/makefile


# Extension for matlab .mex files, for example "mexmaci64"


# Used in $PTII/doc/makefile


# Set to mbed and used in
# $PTII/ptolemy/cg/adapter/generic/program/procedural/c/makefile
# if vendors/mbed/gcc-arm/bin/arm-none-eabi-gcc was found


# Set to mescal and used in $PTII/makefile
# if $PTII/mescal was found


# PTMETROII_DIR is set to metroII if the ProtoBuf jar file was found
# $PTII/ptolemy/domains/makefile uses PTMETROII_DIR


# PTMETROII_PACKAGES is used in doc/makefile


# The value of the --module-path argument, used in JDK 9 and later to find JavaFX


# The value of the modulepath argument for Ant
if test ! -z "$PTMODULE_PATH"; then
   PTMODULE_PATH_ANT="modulepath=\"$PTMODULE_PATH\""

   PTMODULE_PATH_COMMAND_LINE="--module-path $PTMODULE_PATH"

fi

# Set to lib/nashorn-core-15.3.jar if Nashorn, the JavaScript interpreter is found


# Set to opencv and used in
# $PTII/ptolemy/actor/lib/makefile if OpenCV Open Computer Vision was found


# Directory that contains cv.h


# Ptolemy II packages that use OpenCV
# PTOPENCV_PACKAGES is used in ptII/doc/makefile


# Open Sound Control/Processing.org jar file used by org.ptolemy.js


# Set to osc if oscp5.jar is found


# Set to org.ptolemy.osc and used int $PTII/doc/makefile if oscp5 is found


# PTPAHO_MQTT_DIR is set to localStorage and mqtt if Paho MQTT is found and used in ptII/ptolemy/actor/lib/jjs/modules/


# The Paho MQTT Client Library, defaults to $PTII/lib/org.eclipse.paho.client.mqttv3.jar.


# PTPAHO_MQTT_PACKAGES is used in doc/makefile


# Set to pdf and used in ptolemy/vergil/makefile if
# PDFRenderer.jar is found.


# Jar file used in ptolemy/vergil/pdf


# Set to psdf and used in $PTII/ptolemy/domains/makefile if
# $PTII/lib/mapss.jar was found


# PTRSYNTAXTEXTAREA_DIR is set to syntax and used in
# $PTII/ptolemy/actor/gui/makefile if ptolemy/actor/gui/syntax is present.


# RSyntaxTextArea jar file, typically downloaded from Maven.


# Java packages that use RSyntaxTextArea, typically ptolemy.actor.gui.syntax.


# Jar file for Sphinx speech recognition


# PTSVG_DIR is set to svg and used in
# $PTII/diva/util/java2d/makefile if Batik SVG jar files were found


# Jar file used by diva/util/java2d/svg/makefile


# PTSVGSALAMANDER_DIR is set to svg and used in com/jhlabs/image/svg/makefile


# svgSalamander Jar file.


# PTSVGSALAMANDER_PACKAGES is used in ptII/doc/makefile


# Jar files used by the Image Processing library from http://processing.org


# The location of the protobuf jar file, typically $PTII/lib/protobuf-java-2.4.1.jar


# PTPTALON_DIR is set to ptalon and used in
# $PTII/ptolemy/actor/makefile if antlr.jar was found.


# PTALON_PACKAGES is used in $PTII/doc/makefile


# Directory that contains the antlr.jar file, used by ptalon


# PTRTOOL_DIR is set to r and used in
# $PTII/ptolemy/actor/lib/makefile if the jars necessary for the R interface were found.


# Jar files used by the interface to the R statistical tool.


# Used in mk/jnlp.jar


# PTRTOOL_PACKAGES is used in $PTII/doc/makefile


# Ptolemy II packages that use the RXTX Java Serial Communication facility
# PTRXTX_PACKAGES is used in ptII/doc/makefile


# PTSCALA_DIR is set to scala and used in
# $PTII/org/ptolemy/makefile if the scala binary was found


# PTSCALA_PACKAGES is used in $PTII/doc/makefile


# PTSERIAL_DIR is set to serial and used in
# $PTII ptolemy/actor/lib/jjs/modules/makefile if the Java Communications API was found


# slf4j-api*.jar, used by webcam-capture and xbjlib (XBee).


# slf4j-simple*.jar, used by webcam-capture and xbjlib (XBee).


# PTSPACE_DIR is set to space and used in
# $PTII/ptolemy/domains/makefile if ojdbc6.jar was found.


# PTSPACEDOMAIN_JAR is the name of the jar file that includes the space
# domain if ojdbc6.jar was found.  PTSPACEDOMAIN_JAR used in domains/makefile


# PTSPACEDOMAIN_PACKAGES is set if ojdbc6.jar was found and
# used in ptII/doc/makefile


# PTSPHINX4_CORE_JAR is set to the Sphinx4 speech recognition core jar.


# PTSPHINX4_DATA_JAR is set to the Sphinx4 speech recognition data jar.


# PTSPHINX4_DIR is set to speechRecognition and used in
# ptolemy/actor/lib/jjs/modules/makefile if the Sphinx 4 jars are found.


# PTSPHINX4_PACKAGES is used in doc/makefile


# PTSTRUCTURALCODER_JAR is set if $PTII/lib/StructuralCoder.jar was found
# and used in ptolemy/vergil/actor/g4ltl/makefile


# Set to tini and used in
# $PTII/ptolemy/apps/makefile if TINI was found


# PTTINYOS_DIR is set to ptinyos and used in
# $PTII/ptolemy/domains/makefile if TinyOS is found


# Set to giotto and used in
# $PTII/ptolemy/apps/makefile if Giotto was found


# Set to waba and used in
# $PTII/ptolemy/apps/makefile if Waba was found


# Jar files used in ptolemy/actor/lib/jjs/modules/webcam/makefile


# PTWEBCAMCAPTURE_PACKAGES is used in doc/makefile


# PTXBEE_DIR is set to xbee and used in
# $PTII/ptolemy/actor/lib/io/makefile if the Java Communications API was found


# Jar files used in ptolemy/actor/lib/jjs/modules/xbee/makefile


# PTXBJLIB_PACKAGES is used in ptII/doc/makefile


# Location of the local $PTII directory as a file:/// URL
# This variable is used with the Java Network Launching Protocol files


# Jar file that contains RXTX Serial Port Interface


# If Rxtx is present, then set to yes, otherwise set to no


# The scala binary.


# The scalac binary.


# tini/bin/tinclasses.jar file used Soot - a Java Optimization Framework


# Directory that contains the Soot installation


# tini/bin/tiniclasses.jar file used by the Dallas Semi Tini


# Directory that contains the Tini installation


# Location of tools.jar, usually $(PTJAVA_HOME)/../lib/tools.jar


# Location of TinyOS, used by ptinyos domain



# giotto/gdk.jar file used by GiottoSDK


# Directory that contains the GiottoSDK installation


# Set to textDisplay if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile


# Set to udpSocket if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile


# Set to userInterface if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile


# Set to socket if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile


# Vertx jars used by Vert.x modules


# Set to vertx if the Vertx jars are found


# Set to packages that use Vert.x and used in $PTII/doc/makefile if the Vert.x jars are found


# PTVIEWER_DIR is set to viewer and used in ptolemy/media/makefile for JVM < 9


# PTVIEWER_PACKAGES is used in doc/makefile


# waba/tools/classes.jar file used by the PalmOS WABA


# Directory that contains the waba used by PalmOS


# Set to webSocket if the Vertx jars are found and used in ptolemy/actor/lib/jjs/modules/makefile


# Files we substitute in
ac_config_files="$ac_config_files mk/ptII.mk bin/ptinvoke build.xml .classpath bin/comm.policy lib/ptII.properties ptolemy/util/test/junit/javachdir ptolemy/util/test/junit/javachdir32"

ac_config_commands="$ac_config_commands default"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      # `set' does not quote correctly, so add quotes: double-quote
      # substitution turns \\\\ into \\, and sed turns \\ into \.
      sed -n \
	"s/'/'\\\\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;; #(
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    if test "x$cache_file" != "x/dev/null"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
      if test ! -f "$cache_file" || test -h "$cache_file"; then
	cat confcache >"$cache_file"
      else
        case $cache_file in #(
        */* | ?:*)
	  mv -f confcache "$cache_file"$$ &&
	  mv -f "$cache_file"$$ "$cache_file" ;; #(
        *)
	  mv -f confcache "$cache_file" ;;
	esac
      fi
    fi
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then branch to the quote section.  Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
:mline
/\\$/{
 N
 s,\\\n,,
 b mline
}
t clear
:clear
s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
t quote
s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
t quote
b any
:quote
s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
s/\[/\\&/g
s/\]/\\&/g
s/\$/$$/g
H
:any
${
	g
	s/^\n//
	s/\n/ /g
	p
}
'
DEFS=`sed -n "$ac_script" confdefs.h`


ac_libobjs=
ac_ltlibobjs=
U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
  #    will be set to the directory where LIBOBJS objects are built.
  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs



: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
ac_cs_recheck=false
ac_cs_silent=false

SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi


as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in #(
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
  done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH


# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  $as_echo "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error


# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    # In both cases, we have to default to `cp -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null


# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi


# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"


exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by $as_me, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

_ACEOF

case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac



cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_commands="$ac_config_commands"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration.  Unless the files
and actions are specified as TAGs, all are instantiated by default.

Usage: $0 [OPTION]... [TAG]...

  -h, --help       print this help, then exit
  -V, --version    print version number and configuration settings, then exit
      --config     print configuration, then exit
  -q, --quiet, --silent
                   do not print progress messages
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
      --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE

Configuration files:
$config_files

Configuration commands:
$config_commands

Report bugs to the package provider."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

ac_pwd='$ac_pwd'
srcdir='$srcdir'
test -n "\$AWK" || AWK=awk
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=?*)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  --*=)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=
    ac_shift=:
    ;;
  *)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    $as_echo "$ac_cs_version"; exit ;;
  --config | --confi | --conf | --con | --co | --c )
    $as_echo "$ac_cs_config"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    '') as_fn_error $? "missing file argument" ;;
    esac
    as_fn_append CONFIG_FILES " '$ac_optarg'"
    ac_need_defaults=false;;
  --he | --h |  --help | --hel | -h )
    $as_echo "$ac_cs_usage"; exit ;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;

  *) as_fn_append ac_config_targets " $1"
     ac_need_defaults=false ;;

  esac
  shift
done

ac_configure_extra_args=

if $ac_cs_silent; then
  exec 6>/dev/null
  ac_configure_extra_args="$ac_configure_extra_args --silent"
fi

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  shift
  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
  CONFIG_SHELL='$SHELL'
  export CONFIG_SHELL
  exec "\$@"
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  $as_echo "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1

# Handling of arguments.
for ac_config_target in $ac_config_targets
do
  case $ac_config_target in
    "mk/ptII.mk") CONFIG_FILES="$CONFIG_FILES mk/ptII.mk" ;;
    "bin/ptinvoke") CONFIG_FILES="$CONFIG_FILES bin/ptinvoke" ;;
    "build.xml") CONFIG_FILES="$CONFIG_FILES build.xml" ;;
    ".classpath") CONFIG_FILES="$CONFIG_FILES .classpath" ;;
    "bin/comm.policy") CONFIG_FILES="$CONFIG_FILES bin/comm.policy" ;;
    "lib/ptII.properties") CONFIG_FILES="$CONFIG_FILES lib/ptII.properties" ;;
    "ptolemy/util/test/junit/javachdir") CONFIG_FILES="$CONFIG_FILES ptolemy/util/test/junit/javachdir" ;;
    "ptolemy/util/test/junit/javachdir32") CONFIG_FILES="$CONFIG_FILES ptolemy/util/test/junit/javachdir32" ;;
    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;

  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  esac
done


# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi

# Have a temporary directory for convenience.  Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
  tmp= ac_tmp=
  trap 'exit_status=$?
  : "${ac_tmp:=$tmp}"
  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
  trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
ac_tmp=$tmp

# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then


ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
  eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  ac_cs_awk_cr='\\r'
else
  ac_cs_awk_cr=$ac_cr
fi

echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF


{
  echo "cat >conf$$subs.awk <<_ACEOF" &&
  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  echo "_ACEOF"
} >conf$$subs.sh ||
  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  . ./conf$$subs.sh ||
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5

  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  if test $ac_delim_n = $ac_delim_num; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done
rm -f conf$$subs.sh

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' <conf$$subs.awk | sed '
/^[^""]/{
  N
  s/\n//
}
' >>$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
  for (key in S) S_is_set[key] = 1
  FS = ""

}
{
  line = $ 0
  nfields = split(line, field, "@")
  substed = 0
  len = length(field[1])
  for (i = 2; i < nfields; i++) {
    key = field[i]
    keylen = length(key)
    if (S_is_set[key]) {
      value = S[key]
      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
      len += length(value) + length(field[++i])
      substed = 1
    } else
      len += 1 + keylen
  }

  print line
}

_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
  cat
fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF

# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
h
s///
s/^/:/
s/[	 ]*$/:/
s/:\$(srcdir):/:/g
s/:\${srcdir}:/:/g
s/:@srcdir@:/:/g
s/^:*//
s/:*$//
x
s/\(=[	 ]*\).*/\1/
G
s/\n//
s/^[^=]*=[	 ]*$//
}'
fi

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"


eval set X "  :F $CONFIG_FILES      :C $CONFIG_COMMANDS"
shift
for ac_tag
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
  :[FH]-) ac_tag=-:-;;
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  esac
  ac_save_IFS=$IFS
  IFS=:
  set x $ac_tag
  IFS=$ac_save_IFS
  shift
  ac_file=$1
  shift

  case $ac_mode in
  :L) ac_source=$1;;
  :[FH])
    ac_file_inputs=
    for ac_f
    do
      case $ac_f in
      -) ac_f="$ac_tmp/stdin";;
      *) # Look for the file first in the build tree, then in the source tree
	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
	 # because $ac_f cannot contain `:'.
	 test -f "$ac_f" ||
	   case $ac_f in
	   [\\/$]*) false;;
	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
	   esac ||
	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
      esac
      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
      as_fn_append ac_file_inputs " '$ac_f'"
    done

    # Let's still pretend it is `configure' which instantiates (i.e., don't
    # use $as_me), people would be surprised to read:
    #    /* config.h.  Generated by config.status.  */
    configure_input='Generated from '`
	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
	`' by configure.'
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
    fi
    # Neutralize special characters interpreted by sed in replacement strings.
    case $configure_input in #(
    *\&* | *\|* | *\\* )
       ac_sed_conf_input=`$as_echo "$configure_input" |
       sed 's/[\\\\&|]/\\\\&/g'`;; #(
    *) ac_sed_conf_input=$configure_input;;
    esac

    case $ac_tag in
    *:-:* | *:-) cat >"$ac_tmp/stdin" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
    esac
    ;;
  esac

  ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file" : 'X\(//\)[^/]' \| \
	 X"$ac_file" : 'X\(//\)$' \| \
	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  as_dir="$ac_dir"; as_fn_mkdir_p
  ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


  case $ac_mode in
  :F)
  #
  # CONFIG_FILE
  #

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
ac_sed_dataroot='
/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  ac_datarootdir_hack='
  s&@datadir@&$datadir&g
  s&@docdir@&$docdir&g
  s&@infodir@&$infodir&g
  s&@localedir@&$localedir&g
  s&@mandir@&$mandir&g
  s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF

# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
      "$ac_tmp/out"`; test -z "$ac_out"; } &&
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined" >&2;}

  rm -f "$ac_tmp/stdin"
  case $ac_file in
  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
  esac \
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 ;;


  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;}
 ;;
  esac


  case $ac_file$ac_mode in
    "default":C) chmod a+x bin/ptinvoke ptolemy/util/test/junit/javachdir ptolemy/util/test/junit/javachdir32 ;;

  esac
done # for ac_tag


as_fn_exit 0
_ACEOF
ac_clean_files=$ac_clean_files_save

test $ac_write_fail = 0 ||
  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5


# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  ac_config_status_args=
  test "$silent" = yes &&
    ac_config_status_args="$ac_config_status_args --quiet"
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi


