dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run to configure the
dnl Makefile in this directory.
# Version: $Id: configure.in 70991 2014-12-16 02:04:58Z cxh $
# Copyright (c) 1997-2014 The Regents of the University of California.
# All rights reserved.
#
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and its documentation for any purpose, provided that the
# above copyright notice and the following two paragraphs appear in all
# copies of this software.
#
# IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
# ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
# THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
# PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
# CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
# ENHANCEMENTS, OR MODIFICATIONS.
#
# PT_COPYRIGHT_VERSION_2
# COPYRIGHTENDKEY
# configure is derived from configure.in by running GNU autoconf
# on configure.in. Sadly, autoconf now requires Perl and is much
# slower than it used to be.
# See $PTII/doc/coding/develsetup.htm for details about how configure
# works.
# To modify configure:
# 1. Edit configure.in
# 2. Run: cd "$PTII"; rm config.*; autoconf; ./configure
# 3. When you are satisfied with your changes, check in configure.in:
# cvs commit -m "Added xxx package" configure.in
# 4. Since configure.in will have a more recent modification time than
# configure, be sure to run autoconf again
# 5. Check in configure:
# cvs commit -m "configure.in changed" configure
# NOTE: sometimes the order that the files are updated when cvs update
# is run can cause configure.in to have a more recent mod time than
# configure. If this is the case, try editing configure and adding
# a space to a comment line and commiting the change.
dnl Don't look for ptolemy/kernel/util/NamedObj.java here, or
dnl else we won't be able to rebuild after make extraclean.
AC_INIT(mk/ptII.mk.in)
#PT_VERBOSE=1
AC_ARG_ENABLE(verbose, [ --enable-verbose, configure prints verbose msgs],
PTVERBOSE=1)
if test "${PTVERBOSE:-none}" = "none"; then
AC_MSG_RESULT([For more verbose output, run ./configure --enable-verbose])
fi
dnl Define our own messages so that we can control verbosity.
dnl PT_MSG_RESULT prints 'ok' if PTVERBOSE is not set, otherwise
dnl PT_MSG_RESULT prints its first argument.
AC_DEFUN([PT_MSG_RESULT],
[if test "${PTVERBOSE:-none}" = "none"; then AC_MSG_RESULT([ok]); else AC_MSG_RESULT([$1]); fi ])# PT_MSG_RESULT
dnl PT_MSG_RESULT prints nothing if PTVERBOSE is not set, otherwise
dnl PT_MSG_RESULT prints its first argument.
AC_DEFUN([PT_MSG_STATUS],
[if test "${PTVERBOSE:-none}" != "none"; then AC_MSG_RESULT([$1]); fi ])# 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
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
AC_MSG_CHECKING([if your path has 'program files/java' instead of 'Program Files/Java' ])
echo "$PATH" | egrep 'program files/java' > /dev/null
status=$?
if test "$status" -eq 0 ; then
AC_MSG_WARN([
Temporarily changing your path within configure for Java because
Java can't find c:/program files/java, but can find
c:/Program files/Java].)
PATH="`echo $PATH | sed 's@program files/java@Program Files/Java@g'`"
else
PT_MSG_RESULT([ok])
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
AC_MSG_CHECKING([if \$PTII ('$PTII') has backslashes])
echo "$PTII" | egrep '\\' > /dev/null
status=$?
if test "$status" -eq 1 ; then
PT_MSG_RESULT([ok
'$PTII' does not contain backslashes])
else
AC_MSG_ERROR([
\$PTII == $PTII,
which contains backslashes. Even under Windows, please set
PTII to use forward slashes.])
fi
AC_MSG_CHECKING([if \$PTII ('$PTII') and the current directory are the same"])
canonicalPTII=`cd "$PTII"; pwd`
if test "$canonicalPTII" != "`pwd`" ; then
currentDirectory="`pwd`"
AC_MSG_WARN([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".])
fi
AC_MSG_CHECKING([if \$PTII ('$PTII') contains "cygdrive"])
echo "$PTII" | egrep 'cygdrive|cygwin' > /dev/null
status=$?
if test "$status" -eq 1 ; then
PT_MSG_RESULT([ok
'$PTII' does not contain cygdrive or cygwin, which is right.])
else
AC_MSG_WARN(['\$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:
PTII=c:/users/yourname/ptII
export PTII
and then rerun
./configure
See $PTII/doc/install.htm for details.'])
fi
case "`uname -s`" in
CYGWIN_NT-*)
AC_MSG_CHECKING([if \$PTII ('$PTII') contains "cygwin"])
cygpath -w "$PTII" | grep cygwin > /dev/null
status=$?
if test "$status" -eq 1 ; then
PT_MSG_RESULT([ok
\$PTII is '$PTII', which does not contain cygwin, which is right.])
else
AC_MSG_WARN([
'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.'])
fi
;;
esac
# If we are under Cygwin, check that we can find CMD
case "`uname -s`" in
CYGWIN_NT-*)
AC_PATH_PROG(CMD_PATH, cmd)
if test ! -x "$CMD_PATH"; then
AC_MSG_WARN([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.])
fi
;;
*) ;;
esac
PTII_DEFAULT=$PTII
# The default value of prefix
AC_PREFIX_DEFAULT($PTII)
#--------------------------------------------------------------------
# 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
#--------------------------------------------------------------------
AC_ARG_WITH(find, [ --with-find=PATH use the find command from PATH,
PTJAVA_DIR environment variable],
FIND=$withval,
FIND=/usr/bin/find)
AC_PATH_PROG(FIND, find)
if test `echo "$FIND" | grep system32`; then
AC_MSG_WARN([Your path is probably messed up, you have a system32
directory in your path before /bin])
FIND=/bin/find
fi
if test ! -f "$FIND"; then
AC_MSG_WARN([Could not find the "find" command, looked in \"$FIND\"])
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.
#--------------------------------------------------------------------
AC_ARG_WITH(java, [ --with-java=DIR use Java binaries from DIR,
defaults to the value of the
PTJAVA_DIR environment variable],
PTJAVA_DIR=$withval)
if test -d "$PTJAVA_DIR"; then
PT_MSG_STATUS([
PTJAVA_DIR environment variable was set to
'$PTJAVA_DIR', and there is a directory
at that location, so we will try it.])
else
if test -z "$PTJAVA_DIR"; then
PT_MSG_STATUS([PTJAVA_DIR environment variable was not set,
so we search for the java compiler.])
else
AC_MSG_WARN([PTJAVA_DIR environment variable is set to
'${PTJAVA_DIR}', which is not a directory,
so we search for the java compiler.])
fi
AC_PATH_PROG(JAVAC, javac)
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
AC_MSG_WARN([ Found javac in "$JAVABIN", /usr/java exists, so
we are setting PTJAVA_DIR to '$PTJAVA_DIR'])
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.
AC_MSG_CHECKING([PTJAVA_DIR == /usr, checking for links])
startdir=$PTII
cd "$srcdir/config"
if "$JAVAC" RootDirectory.java ; then
AC_MSG_CHECKING([the value of the Java directory ])
AC_PATH_PROG(JAVA, java)
if env CLASSPATH="$PTII/config" "$JAVA" RootDirectory "$JAVAC"> /dev/null; then
PTJAVA_DIR_TMP=`CLASSPATH="$PTII/config" "$JAVA" RootDirectory "$JAVAC"`
# Use changequote to protect the square brackets in sed
changequote(<<, >>)dnl
# Remove /cygdrive so we can compile with MSVC
#PTJAVA_DIR_REAL=`echo "$PTJAVA_HOME_TMP" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
changequote([, ])dnl
if test -d "$PTJAVA_DIR_TMP"; then
PTJAVA_DIR="$PTJAVA_DIR_TMP"
PT_MSG_RESULT('$PTJAVA_DIR');
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVA RootDirectory "$JAVAC"' failed.
We will not be able to search for the canonical Java home directory.]);
fi
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVAC RootDirectory.java' failed.
We will not be able to search for the canonical Java home directory.]);
fi
cd "$startdir"
fi
fi
else
AC_MSG_WARN([ Failed to find javac, perhaps Java is not installed?])
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`
AC_MSG_WARN(['${PTJAVA_DIR}' is not a directory, using the default '${DEFAULT_JDK}'])
else
DEFAULT_JDK=/usr/java
if test -d "$DEFAULT_JDK"; then
PTJAVA_DIR=`cd "$DEFAULT_JDK"; pwd`
AC_MSG_WARN(['${PTJAVA_DIR}' is not a directory, using the default '${DEFAULT_JDK}'])
else
AC_MSG_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_05\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_05/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:
PTJAVA_DIR=/cygdrive/c/Program\ Files/Java/jdk1.8.0_05
export PTJAVA_DIR
rm config.*; ./configure
but adding the directory to your path is likely to work best.])
fi
fi
fi
fi
# PTJAVA_DIR without /cygdrive
# Use changequote here to preserve square brackets
changequote(<<, >>)dnl
PTJAVA_DIR_NO_CYGDRIVE="`echo "$PTJAVA_DIR" | sed 's@/cygdrive/\([a-z]\)/@\1:/@'`"
changequote([, ])dnl
if test ! -d "ptolemy/actor/lib/fmi/"; then
PT_MSG_STATUS([ptolemy/actor/lib/ is not present,
so we need not find a 32-bit JVM for testing.])
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.
#--------------------------------------------------------------------
AC_ARG_WITH(java32, [ --with-java32=DIR use 32-bit Java binaries from DIR,
defaults to the value of the
PTJAVA32_DIR environment variable],
PTJAVA32_DIR=$withval)
if test -d "$PTJAVA32_DIR"; then
PT_MSG_STATUS([
PTJAVA32_DIR environment variable was set to
'$PTJAVA32_DIR', and there is a directory
at that location, so we will try it.])
else
if test -z "$PTJAVA32_DIR"; then
PT_MSG_STATUS([PTJAVA32_DIR environment variable was not set,
so we search for the java compiler.])
else
AC_MSG_WARN([PTJAVA32_DIR environment variable is set to
'${PTJAVA32_DIR}', which is not a directory,
so we search for the java compiler.])
fi
java -d32 -version > /dev/null
retval=$?
if test $retval = 0; then
PTJAVA32_DIR=${PTJAVA_DIR}
PT_MSG_STATUS([Running java -d32 -version succeeded,
so PTJAVA32_DIR is $PTJAVA_32DIR])
else
AC_PATH_PROG(JAVA32, java32)
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
AC_MSG_WARN([ Found java32 in "$JAVA32BIN", /usr/java exists, so
we are setting PTJAVA32_DIR to '$PTJAVA32_DIR'])
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.
AC_MSG_CHECKING([PTJAVA32_DIR == /usr or /usr/local, checking for links])
startdir=$PTII
cd "$srcdir/config"
if "$JAVAC" RootDirectory.java ; then
AC_MSG_CHECKING([the value of the Java directory ])
if env CLASSPATH="$PTII/config" "$JAVA32" RootDirectory "$JAVA32"> /dev/null; then
PTJAVA32_DIR_TMP=`CLASSPATH="$PTII/config" "$JAVA32" RootDirectory "$JAVA32"`
# Use changequote to protect the square brackets in sed
changequote(<<, >>)dnl
# Remove /cygdrive so we can compile with MSVC
#PTJAVA_DIR_REAL=`echo "$PTJAVA_HOME_TMP" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
changequote([, ])dnl
if test -d "$PTJAVA32_DIR_TMP"; then
PTJAVA32_DIR="$PTJAVA32_DIR_TMP"
PT_MSG_RESULT('$PTJAVA_DIR');
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVA32 RootDirectory "$JAVA32"' failed.
We will not be able to search for the canonical 32-bit Java home directory.]);
fi
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVAC RootDirectory.java' failed.
We will not be able to search for the canonical 32-bit Java home directory.]);
fi
cd "$startdir"
fi
fi
fi
if test ! -x "$PTJAVA32_DIR/bin/java"; then
AC_MSG_WARN([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.])
fi
fi
fi
# PTJAVA32_DIR without /cygdrive
# Use changequote here to preserve square brackets
changequote(<<, >>)dnl
PTJAVA32_DIR_NO_CYGDRIVE="`echo "$PTJAVA32_DIR" | sed 's@/cygdrive/\([a-z]\)/@\1:/@'`"
changequote([, ])dnl
fi # Test for ptolemy/actor/lib/fmi
#
# Check that we have the javac that corresponds with PTJAVA_DIR in our path
#
AC_MSG_CHECKING([for the java runtime in $PTJAVA_DIR/bin])
if test -f "$PTJAVA_DIR/bin/java" -o -f "$PTJAVA_DIR/bin/java.exe"; then
PT_MSG_RESULT($PTJAVA_DIR/bin/java)
AC_PATH_PROG(JAVA, java)
if test "$PTJAVA_DIR/bin/java" = "$JAVA"; then
PT_MSG_STATUS([ You have the right java in your path,
"$PTJAVA_DIR/bin/java"
= "$JAVA"])
else
AC_MSG_WARN(['$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.])
JAVA="$PTJAVA_DIR/bin/java"
fi
else
if test -f "$PTJAVA_DIR/Commands/java"; then
PT_MSG_RESULT($PTJAVA_DIR/Commands/java)
AC_PATH_PROG(JAVA, java)
if test "$PTJAVA_DIR/Commands/java" = "$JAVA"; then
PT_MSG_STATUS([ You have the right java in your path,
"$PTJAVA_DIR/Commands/java"
= "$JAVA"])
else
AC_MSG_WARN(['$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.])
JAVA="$PTJAVA_DIR/Commands/java"
fi
else
AC_MSG_ERROR([
Cannot find '$PTJAVA_DIR/bin/java' or '$PTJAVA_DIR/Commands/java'.
Try --with-java=DIR, or set the PTJAVA_DIR environment variable.
])
fi
fi
#
# Check that we have the javac that corresponds with PTJAVA_DIR in our path
#
AC_MSG_CHECKING([for the java compiler in $PTJAVA_DIR/bin])
if test -f "$PTJAVA_DIR/bin/javac"; then
PT_MSG_RESULT($PTJAVA_DIR/bin/javac)
AC_PATH_PROG(JAVAC, javac)
if test ! -x "$JAVAC"; then
AC_MSG_WARN([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])
fi
if test "$PTJAVA_DIR/bin/javac" = "$JAVAC"; then
PT_MSG_STATUS([ You have the right javac in your path,
"$PTJAVA_DIR/bin/javac"
= "$JAVAC"])
else
AC_MSG_WARN(['$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.])
JAVAC="$PTJAVA_DIR/bin/javac"
fi
else
if test -f "$PTJAVA_DIR/Commands/javac"; then
PT_MSG_RESULT($PTJAVA_DIR/Commands/javac)
AC_PATH_PROG(JAVAC, javac)
if test "$PTJAVA_DIR/Commands/javac" = "$JAVAC"; then
PT_MSG_STATUS([ You have the right java in your path,
"$PTJAVA_DIR/Commands/javac"
= "$JAVAC"])
else
AC_MSG_WARN(['$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.])
JAVAC="$PTJAVA_DIR/Commands/javac"
fi
else
AC_MSG_ERROR([
Cannot find '$PTJAVA_DIR/bin/javac' or '$PTJAVA_DIR/Commands/javac'.
Try --with-java=DIR, or set the PTJAVA_DIR environment variable.])
fi
fi
#--------------------------------------------------------------------
# Test the Java Compiler (javac)
#--------------------------------------------------------------------
AC_MSG_CHECKING([the Java compiler with a simple compile])
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
PT_MSG_RESULT(confTest.java compiled)
AC_MSG_CHECKING([the value of the java.version Property ])
# Older versions of cygwin might not have env, but 1.1 does
if env CLASSPATH="$PTII/config" "$JAVA" confTest > /dev/null; then
# Run it again and get the results
JVERSION=`CLASSPATH="$PTII/config" "$JAVA" confTest`
PT_MSG_RESULT($JVERSION)
else
AC_MSG_ERROR(['CLASSPATH="$PTII/config" "$JAVA" 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:
PTII=c:/users/yourname/ptII
export PTII
and then rerun
./configure
See $PTII/doc/install.htm for details.'])
fi
else
AC_MSG_ERROR(['CLASSPATH="$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:
PTII=c:/users/yourname/ptII
export PTII
and then rerun
./configure
See $PTII/doc/install.htm for details.'])
fi
# The Major and Minor version of the JDK. 1.6, 1.8 etc. Used by ant in build.xml.in.
changequote(<<, >>)dnl
JVERSION_TARGET=`echo "$JVERSION" | sed 's/\([1-9]*\.[^._]*\).*/\1/'`
changequote([, ])dnl
cd "$startdir"
#--------------------------------------------------------------------
# We require JDK1.5
#--------------------------------------------------------------------
AC_MSG_CHECKING([the JDK version])
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) AC_MSG_WARN([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}])
esac
;;
*) ;;
esac
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
AC_MSG_ERROR([Ptolemy II requires JDK 1.5 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
- backtrack
- ptalon
JDK 1.6 or later is needed for ptdb to use javax.swing.GroupLayout.
Please upgrade your JDK to 1.6 or later and try again.
$upgradeMessage])
else
# -breakiterator is only present in jdk1.4 and later
JDOCBREAKITERATOR=-breakiterator
# Ptalon uses generics, assume 1.5 or greater here
HAS_GENERICS=yes
PT_MSG_RESULT([ok, you are running $JVERSION])
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"
AC_MSG_CHECKING([for java.home property by compiling a test program ])
# Don't use 'env $JAVAC . . .' here, it will not work under Cygwin
if "$JAVAC" JavaHome.java ; then
PT_MSG_RESULT(JavaHome.java compiled)
AC_MSG_CHECKING([for java.home property by running a test program ])
if env CLASSPATH="$PTII/config" "$JAVA" JavaHome > /dev/null; then
# Run it again and get the results with \ converted to /
PTJAVA_HOME=`CLASSPATH="$PTII/config" "$JAVA" JavaHome`
PT_MSG_RESULT($PTJAVA_HOME)
PTDOCLETS_DIR=doclets
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVA JavaHome' failed.
Since we cannot determine where the JRE is, we cannot set PTJAVA_HOME.
for use with doclets or the serial communications protocol])
fi
fi
cd "$startdir"
#
# Check that jar can handle the -i argument
#
AC_MSG_CHECKING([for the jar command])
if test -f "$PTJAVA_DIR/bin/jar"; then
PT_MSG_RESULT($PTJAVA_DIR/bin/jar)
JAR="$PTJAVA_DIR/bin/jar"
else
if test -f "$PTJAVA_DIR/Commands/java"; then
PT_MSG_RESULT($PTJAVA_DIR/Commands/java)
JAR="$PTJAVA_DIR/Commands/jar"
else
AC_MSG_WARN([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'])
AC_PATH_PROG(JAR, jar)
fi
fi
AC_MSG_CHECKING([that $JAR can handle -i])
if test -x "$JAR"; then
cd "$srcdir/config"
"$JAR" -cf jarTest.jar confTest.class
if "$JAR" -i jarTest.jar; then
PT_MSG_RESULT([$JAR -i worked])
# JAR_INDEX now includes the JAR_FLAGS flag so that we can
# pass -J-Xss100m for linux
JAR_INDEX='"$(JAR)" $(JAR_FLAGS) -i $@'
else
AC_MSG_WARN([$JAR -i jarTest.jar failed,
so we will not index the jar files])
JAR_INDEX=""
fi
cd "$startdir"
else
AC_MSG_WARN([jar command "$JAR" is not executable or not found.
This is usually only a problem if you run 'make install'])
fi
#
# The jarsigner command is used to create signed jar files for Webstart JNLP files
#
AC_MSG_CHECKING([for the jarsigner command])
if test -f "$PTJAVA_DIR/bin/jarsigner"; then
PT_MSG_RESULT($PTJAVA_DIR/bin/jarsigner)
JARSIGNER="$PTJAVA_DIR/bin/jarsigner"
else
if test -f "$PTJAVA_DIR/Commands/java"; then
PT_MSG_RESULT($PTJAVA_DIR/Commands/java)
JARSIGNER="$PTJAVA_DIR/Commands/jarsigner"
else
AC_MSG_WARN([Cannot find '$PTJAVA_DIR/bin/jarsigner'.
or '$PTJAVA/Commands/jarsigner', looking in the path.
This is only a problem when testing the security actors.])
AC_PATH_PROG(JARSIGNER, jarsigner)
fi
fi
if test ! -x "$JARSIGNER"; then
AC_MSG_WARN([The jarsigner command "$JARSIGNER" is not executable or not found.
This is only a problem when testing the security actors.])
fi
#
# The javaws command is used to test Webstart JNLP files.
#
if test ! -f "mk/jnlp.mk"; then
PT_MSG_STATUS([mk/jnlp.mk is not present,
so we need not find javaws, the Java Web Start binary.])
else
AC_MSG_CHECKING([for the javaws command])
if test -f "$PTJAVA_DIR/bin/javaws"; then
PT_MSG_RESULT($PTJAVA_DIR/bin/javaws)
JAVAWS="$PTJAVA_DIR/bin/javaws"
else
if test -f "$PTJAVA_DIR/Commands/java"; then
PT_MSG_RESULT($PTJAVA_DIR/Commands/java)
JAVAWS="$PTJAVA_DIR/Commands/javaws"
else
AC_MSG_WARN([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.])
AC_PATH_PROG(JAVAWS, javaws)
fi
fi
if test ! -x "$JAVAWS"; then
AC_MSG_WARN([The javaws command "$JAVAWS" is not executable or not found.
This is only a problem when testing the Java Webstart (JNLP) files.])
fi
fi
#
# keytool command used to generate a certificate for testing actor.lib.security actors
#
if test ! -d "ptolemy/actor/lib/security/"; then
PT_MSG_STATUS([ptolemy/actor/lib/security/ is not present,
so we need not find keytool, the certifate command.])
else
AC_MSG_CHECKING([for the keytool command])
if test -f "$PTJAVA_DIR/bin/keytool"; then
PT_MSG_RESULT($PTJAVA_DIR/bin/keytool)
KEYTOOL="$PTJAVA_DIR/bin/keytool"
else
if test -f "$PTJAVA_DIR/Commands/java"; then
PT_MSG_RESULT($PTJAVA_DIR/Commands/java)
KEYTOOL="$PTJAVA_DIR/Commands/keytool"
else
AC_MSG_WARN([Cannot find '$PTJAVA_DIR/bin/keytool'.
or '$PTJAVA/Commands/keytool', looking in the path.
This is only a problem when testing the security actors.])
AC_PATH_PROG(KEYTOOL, keytool)
fi
fi
if test ! -x "$KEYTOOL"; then
AC_MSG_WARN([The keytool command "$KEYTOOL" is not executable or not found.
This is only a problem when testing the security actors.])
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)
#--------------------------------------------------------------------
AC_MSG_CHECKING([for the proper CLASSPATH separator])
# 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
PT_MSG_RESULT(['$CLASSPATHSEPARATOR'])
#--------------------------------------------------------------------
# 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=''
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 \
"
# Ant understands * style classpaths, so no need to update Ant.
fi
done
# Paths to always exclude in Ant's build.xml
ANT_ALWAYS_EXCLUDE='
'
# 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 () {
ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \
"
ANT_CLASSPATH="$ANT_CLASSPATH "
}
# 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 "
}
# A shell function that adds its arguments to ANT_EXCLUDE_TESTS.
updateExcludeTests () {
ANT_EXCLUDE_TESTS="$ANT_EXCLUDE_TESTS "
}
########################################################################
if test ! -d "ptolemy/backtrack/eclipse"; then
PT_MSG_STATUS([ptolemy/backtrack/eclipse/ is not present,
no need to print message about Darwin.])
else
case "`uname -s`" in
Darwin)
AC_MSG_WARN([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.])
if test -d ptolemy/apps/eclipse/awt/; then
AC_MSG_WARN([Under Eclipse on Mac OS X, ptolemy/apps/eclipse/awt
is not supported.])
updateExcludes "ptolemy/apps/eclipse/awt/"
fi
;;
*) ECLIPSE_CLASSPATHENTRY_PDE_REQUIREDPLUGINS=''
;;
esac
fi
PRE_JDK18=no
case "$JVERSION" in
1.6.*) PRE_JDK18=yes;;
1.7.*) PRE_JDK18=yes;;
esac
# In ptII10.0 - no need to exclude these packages. The devel tree does require 1.8.
#if test "$PRE_JDK18" = "yes" ; then
# # These must have trailing slash or the updateExcludes shell function will not work.
# pre1_8packages="org/ptolemy/machineLearning/particleFilter/ org/ptolemy/osc/ org/ptolemy/ssm/ ptolemy/apps/hardrealtime/ ptolemy/actor/lib/jjs/"
# AC_MSG_WARN([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])
# for package in $pre1_8packages
# do
# updateExcludes $package
# done
#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 ''
# if maven-ant-tasks/*.jar was found
# and if $PTII/ptolemy/apps/websensor was found.
ANT_WEBSENSOR_FILESET=''
# Set to '
ANT_WEBSENSOR_SOURCEPATH=''
# Set to ''
# if maven-ant-tasks*.jar was found
# and if $PTII/ptolemy/apps/websensor was found.
ANT_WEBSENSOR_SRC=''
AC_PATH_PROG(ANT, ant)
if test ! -f pom.xml; then
PT_MSG_STATUS([pom.xml is not present
so we need not find Maven.])
else
AC_PATH_PROG(MVN, mvn)
if test -x "$ANT" -a -x "$MVN"; then
cat > maven-ant-tasks-test.xml << EoF
EoF
AC_MSG_CHECKING([for maven ant task. This could take a minute the first time configure is run.])
if "$ANT" -f maven-ant-tasks-test.xml help > /dev/null 2>&1 ; then
PT_MSG_RESULT([ok])
ANT_MAVEN_ARTIFACT='xmlns:artifact="antlib:org.apache.maven.artifact.ant"'
AC_MSG_CHECKING([for websensor in \$PTII/ptolemy/apps/websensor])
if test -d "$PTII/ptolemy/apps/websensor" ; then
PT_MSG_RESULT([ok])
ANT_MAVEN_BUILD_WEBSENSOR="
"
ANT_MAVEN_SUBPROJECTS=',build-websensor'
ANT_WEBSENSOR_FILESET=''
ANT_WEBSENSOR_SOURCEPATH=''
ANT_WEBSENSOR_SRC=''
#--------------------------------------------------------------------
# Look for the "gawk" command, used by maven
#--------------------------------------------------------------------
AC_ARG_WITH(gawk, [ --with-gawk=PATH use the gawk command from PATH with maven,
/usr/bin/gawk],
GAWK=$withval,
GAWK=gawk)
AC_PATH_PROG(GAWK, gawk)
if test ! -x "$GAWK"; then
AC_MSG_WARN([Couldn't find gawk, looking for awk. gawk or awk is used by maven.])
AC_PATH_PROG(GAWK, awk)
if test ! -x "$GAWK"; then
GAWK=awk
fi
fi
fi
else
AC_MSG_WARN([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])
fi
rm -f maven-ant-tasks-test.xml
else
AC_MSG_WARN([The ant and/or mvn binaries could not be found,
so we will not build in $PTII/ptolemy/apps/websensor.])
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
PT_MSG_STATUS([$FMIPP_USER_DIR is not present,
so we need not find Boost.])
else
if test "$PTBOOST" = "no"; then
AC_MSG_CHECKING([for Boost])
AC_ARG_WITH(boost, [ --with-boost-include=DIR use boost includes from DIR DIR/boost/numeric/odeint.hpp should exist,
defaults to /usr/local/include],
PTBOOST_INCLUDE_DIR=$withval,
PTBOOST_INCLUDE_DIR=/usr/local/include)
if test -f "$PTBOOST_INCLUDE_DIR/boost/numeric/odeint.hpp"; then
PT_MSG_RESULT($PTBOOST_INCLUDE_DIR)
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
PT_MSG_RESULT($PTBOOST_INCLUDE_DIR)
break
fi
done
if test ! -f "$PTBOOST_INCLUDE_DIR/boost/numeric/odeint.hpp"; then
AC_MSG_WARN([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.])
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
PT_MSG_STATUS([$BSH_USER_DIR is not present,
so we need not find BSH, the Java Bean Shell.])
else
AC_MSG_CHECKING([for BSH, the Java Bean Shell])
if test -f "$PTII/lib/bsh-2.0b4.jar"; then
PT_MSG_RESULT($PTII/lib/bsh-2.0b4.jar)
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
AC_MSG_WARN([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.])
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
PT_MSG_STATUS([$PTII/ptolemy/copernicus/c is not present,
so we need not find the CaffeineMark Kit.])
else
AC_MSG_CHECKING([for CaffeineMarkEmbeddedApp.class])
AC_ARG_WITH(cmkit, [ --with-cmkit=DIR use CaffeineMark from DIR,
defaults to \$PTII/vendors/cm],
CMKIT_DIR=$withval,
CMKIT_DIR=$PTII/vendors/cm)
if test -f "$CMKIT_DIR/CaffeineMarkEmbeddedApp.class"; then
PT_MSG_RESULT([$CMKIT_DIR])
PTCM_DIR=cm
else
AC_MSG_WARN([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])
# 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
PT_MSG_STATUS([$CAL_USER_DIR is not present,
so we need not find the Cal, the actor language.])
else
AC_MSG_CHECKING([for Cal, the actor language])
AC_ARG_WITH(cal, [ --with-cal=DIR use ptCal.jar from DIR,
defaults to \$PTII/lib],
CALTROP_DIR=$withval,
CALTROP_DIR=$PTII/lib)
if test -f "$CALTROP_DIR/ptCal.jar"; then
PT_MSG_RESULT([$CALTROP_DIR])
# We found cal
AC_MSG_CHECKING([for saxon8.jar (used by caltrop)])
if test -f "$CALTROP_DIR/saxon8.jar"; then
PT_MSG_RESULT([$CALTROP_DIR/saxon8.jar])
AC_MSG_CHECKING([for saxon8-dom.jar (used by caltrop)])
if test -f "$CALTROP_DIR/saxon8-dom.jar"; then
PT_MSG_RESULT([$CALTROP_DIR/saxon8-dom.jar])
AC_MSG_CHECKING([for java_cup.jar (used by caltrop)])
if test -f "$CALTROP_DIR/java_cup.jar"; then
PT_MSG_RESULT([$CALTROP_DIR/java_cup.jar])
PTCALTROP_DIR=caltrop
else
AC_MSG_WARN([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])
# Note that we don't substitute in the ${PTII} here
CALTROP_DIR='${PTII}/lib/'
fi
else
AC_MSG_WARN([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])
# Note that we don't substitute in the ${PTII} here
CALTROP_DIR='${PTII}/lib/'
fi
else
AC_MSG_WARN([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])
# Note that we don't substitute in the ${PTII} here
CALTROP_DIR='${PTII}/lib/'
fi
else
AC_MSG_WARN([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])
# 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
# Note that jasminclasses.jar in soot also includes java_cup
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.1.1
CHECKSTYLE_JAR="checkstyle$CHECKSTYLE_VERSION.jar"
if test ! -d "$CHECKSTYLE_USER_DIR"; then
PT_MSG_STATUS([$CHECKSTYLE_USER_DIR is not present,
so we need not find Checkstyle for testing])
else
AC_MSG_CHECKING([for Checkstyle, optionally used to check the style of Java files.])
AC_ARG_WITH(checkstyle, [ --with-checkstyle=DIR use Checkstyle from DIR,
defaults to $PTII/vendors/checkstyle-5.7],
CHECKSTYLE_DIR=$withval,
CHECKSTYLE_DIR=$PTII/vendors/checkstyle$CHECKSTYLE_VERSION)
changequote(<<, >>)dnl
CHECKSTYLE_VERSION=`basename "$CHECKSTYLE_DIR" | sed 's/checkstyle\(.*\)$/\1/'`
changequote([, ])dnl
if test -r "$CHECKSTYLE_DIR/checkstyle$CHECKSTYLE_VERSION-all.jar" ; then
PT_MSG_RESULT([$CHECKSTYLE_DIR])
CHECKSTYLE_JAR="checkstyle$CHECKSTYLE_VERSION-all.jar"
fi
if test ! -f "$CHECKSTYLE_DIR/$CHECKSTYLE_JAR"; then
AC_MSG_WARN([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/])
fi
fi
#--------------------------------------------------------------------
# "CHIC is a modular verifier for behavioral compatibility checking
# of software and hardware components"
#
# For more information,
# see http://www-cad.eecs.berkeley.edu/~tah/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
PT_MSG_STATUS([$CHIC_USER_DIR is not present,
so we need not find Chic, the modular verifier for
behavioral compatibility checking of software and hardware components.])
else
AC_MSG_CHECKING([for Chic, the model checker])
AC_ARG_WITH(chic, [ --with-chic=DIR use chic.jar from DIR,
defaults to \$PTII/lib],
CHIC_DIR=$withval,
CHIC_DIR=$PTII/lib)
if test -f "$CHIC_DIR/chic.jar"; then
PT_MSG_RESULT($CHIC_DIR)
# We found chic
PTCHIC_DIR=chic
else
AC_MSG_WARN([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.])
# 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
PT_MSG_STATUS([$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.])
else
AC_MSG_CHECKING([for Ptolemy subset of Colt, the scientific computing lib])
if test -f "$PTII/lib/ptcolt.jar"; then
PT_MSG_RESULT($PTII/lib/colt.jar)
PTCOLT_JAR="$PTII/lib/ptcolt.jar"
PTCOLT_DIR=colt
# PTCOLT_PACKAGES is used in ptII/doc/makefile
PTCOLT_PACKAGES=ptolemy.actor.lib.colt
else
AC_MSG_WARN([Failed to find $PTII/lib/ptcolt.jar, will look for
full colt.jar])
PTCOLT_JAR=
fi
AC_MSG_CHECKING([for Full version of Colt, the scientific computing lib])
AC_ARG_WITH(colt, [ --with-colt=DIR use colt.jar from DIR,
defaults to \$PTII/vendors/misc/colt],
COLT_DIR=$withval,
COLT_DIR=$PTII/vendors/misc/colt)
if test -f "$COLT_DIR/colt.jar"; then
PT_MSG_RESULT($COLT_DIR/colt.jar)
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
AC_MSG_WARN([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.])
# Note that we don't substitute in the ${PTII} here
COLT_DIR='${PTII}/vendors/misc/colt'
else
AC_MSG_WARN([Did not find $COLT_DIR/colt.jar,
using $PTCOLT_JAR])
PTCOLT_JARS=$PTCOLT_JAR
updateClasspath "$PTCOLT_JAR"
fi
fi
fi
if test -z "$PTCOLT_DIR"; then
updateExcludes "ptolemy/actor/lib/colt/"
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
PT_MSG_STATUS([$COBERTURA_USER_DIR is not present,
so we need not find Cobertura for testing])
else
AC_MSG_CHECKING([for Cobertura, optionally used for Java code coverage.])
AC_ARG_WITH(cobertura, [ --with-cobertura=DIR use Cobertura from DIR,
defaults to $PTII/vendors/cobertura-2.0.3],
COBERTURA_DIR=$withval,
COBERTURA_DIR=$PTII/vendors/cobertura$COBERTURA_VERSION)
changequote(<<, >>)dnl
COBERTURA_VERSION=`basename "$COBERTURA_DIR" | sed 's/cobertura\(.*\)$/\1/'`
changequote([, ])dnl
if test -r "$COBERTURA_DIR/cobertura$COBERTURA_VERSION.jar" ; then
COBERTURA_JAR="cobertura$COBERTURA_VERSION.jar"
PT_MSG_RESULT([$COBERTURA_JAR])
fi
if test ! -f "$COBERTURA_DIR/$COBERTURA_JAR"; then
AC_MSG_WARN([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/])
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
PT_MSG_STATUS([$CUNIT_USER_DIR is not present,
so we need not find CUnit for testing])
else
AC_MSG_CHECKING([for CUnit to be used to test the C cg templates])
AC_ARG_WITH(cunit, [ --with-cunit=DIR use CUnit from DIR,
defaults to /usr/local or $PTII/vendors/CUnit],
CUNIT_DIR=$withval,
CUNIT_DIR=/usr/local)
if test -r "$CUNIT_DIR/include/CUnit/Basic.h" ; then
PT_MSG_RESULT([$CUNIT_DIR])
#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
PT_MSG_RESULT([/usr/include])
#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
PT_MSG_RESULT([$PTII/vendors/CUnit])
#PTCUNIT_INCLUDE_DIR="$PTII/vendors/CUnit/include"
#PTCUNIT_LIB_DIR="$PTII/vendors/CUnit/lib"
PTCUNIT_DIR=test
else
AC_MSG_WARN([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])
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
PT_MSG_STATUS([$DOCLETS_USER_DIR is not present,
so we need not find tools.jar in the JRE.])
# Use curly brackets around PTII so that if tools.jar is not present
TOOLS_JAR='${PTJAVA_HOME}/../lib/tools.jar'
else
AC_MSG_CHECKING([for tools.jar for use with doclets])
AC_ARG_WITH(tools_jar, [ --with-tools_jar=DIR use tools.jar from DIR,
defaults to \$PTJAVA_HOME/../lib/tools.jar],
TOOLS_JAR=$withval,
TOOLS_JAR=${PTJAVA_HOME}/../lib/tools.jar)
if test -f "$TOOLS_JAR"; then
PT_MSG_RESULT([$TOOLS_JAR])
PTDOCLETS_DIR=doclets
else
AC_MSG_WARN([Could not find tools.jar, checking for classes.jar])
AC_MSG_CHECKING([for classes.jar for use with doclets])
TOOLS_JAR=${PTJAVA_HOME}/../Classes/classes.jar
if test -f "$TOOLS_JAR"; then
PT_MSG_RESULT([$TOOLS_JAR])
PTDOCLETS_DIR=doclets
else
AC_MSG_WARN([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.])
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"
# Use curly brackets so PTII gets expanded in the makefile
JDOCTAGLET='-tagletpath "${PTII}" -taglet doc.doclets.RatingTaglet'
fi
# The javadoc program
AC_PATH_PROG(JAVADOC, javadoc)
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.
AC_MSG_CHECKING([Under windows, javadoc should use the non-cywin path])
JAVADOC=`cygpath --mixed "$JAVADOC"`
PT_MSG_RESULT([$JAVADOC])
;;
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
PT_MSG_STATUS([$PTII/ptolemy/backtrack/eclipse is not present,
so we need not find Eclipse.])
fi
if test "x$ECLIPSE_CLASSPATHENTRY_PDE_REQUIREDPLUGINS" == "x"; then
PT_MSG_STATUS([You are running under Mac OS X, and backtracking
is not currently supported. See
http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Mac])
fi
else
if test ! "$HAS_GENERICS" = "yes"; then
AC_MSG_WARN([You are running Java $JVERSION, which does not
support generics. Thus, ptolemy/backtrack/eclipse will not compile.])
PTBACKTRACK_DIR=
else
AC_MSG_CHECKING([for Eclipse installation])
# Use changequote to protect the square brackets in sed
# 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
changequote(<<, >>)dnl
TMP_ECLIPSE_DIR="`cd c:/Program\ Files/*clipse; pwd | sed 's@/cygdrive/\([a-z]\)/@\1:/@'`"
changequote([, ])dnl
else
TMP_ECLIPSE_DIR="c:/Program\ Files/eclipse"
fi
if test -d "/Applications/eclipse"; then
TMP_ECLIPSE_DIR=/Applications/eclipse
fi
AC_ARG_WITH(eclipse, [ --with-eclipse=ECLIPSE_DIR use Eclipse from ECLIPSE_DIR,
defaults to $TMP_ECLIPSE_DIR],
ECLIPSE_DIR=$withval,
ECLIPSE_DIR=$TMP_ECLIPSE_DIR)
if test "$ECLIPSE_DIR" = "no"; then
AC_MSG_WARN([configure called with --without-eclipse-plugins,
not building in ptolemy/apps/eclipse and ptolemy/backtrack.])
updateExcludes "ptolemy/apps/eclipse/"
else
if test ! -d "$ECLIPSE_DIR"; then
AC_MSG_WARN([Failed to find Eclipse in $ECLIPSE_DIR])
AC_MSG_CHECKING([for $PTII/vendors/eclipse])
if test -d "$PTII/vendors/eclipse"; then
PT_MSG_RESULT([ok])
ECLIPSE_DIR="$PTII/vendors/eclipse"
else
AC_MSG_WARN([Failed to find Eclipse in $PTII/vendors/eclipse])
AC_PATH_PROG(PTECLIPSE, eclipse)
if test "${PTECLIPSE:-none}" != "none"; then
# Remove /cygdrive
changequote(<<, >>)dnl
ECLIPSE_DIR=`dirname $PTECLIPSE | sed 's@/cygdrive/\([a-z]\)/@\1:/@'`
changequote([, ])dnl
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
AC_MSG_WARN([Eclipse was found in $savedEclipseDir, but $savedEclipseDir/plugins was not found?"])
fi
fi
fi
if test -d "$ECLIPSE_DIR"; then
PT_MSG_RESULT([$ECLIPSE_DIR])
AC_MSG_CHECKING([for jars used by backtracking in $ECLIPSE_DIR])
case "`uname -s`" in
Darwin) ECLIPSE_SWT_JAR=org.eclipse.swt.carbon.macosx_
;;
Linux) ECLIPSE_SWT_JAR=eclipse.swt.gtk.linux
;;
*) ECLIPSE_SWT_JAR=eclipse.swt.win32.win32.x86_
;;
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" | 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 "
eclipsejarpath="$eclipsejarpath$CLASSPATHSEPARATOR$jarpath"
# NOTE: Eclipse 3.0 has problems if we include these
# jars in the .classpath, instead, .classpath.in includes:
#
#updateClasspath "$jarpath"
else
AC_MSG_WARN([Failed to find $jar in $ECLIPSE_DIR: $jarpath])
eclipsejarpath=
break
fi
done
if test ! -z "$eclipsejarpath"; then
PT_MSG_RESULT([ok])
# Get the plugin jar files for use with javadoc in $PTII/doc
case "`uname -s`" in
Darwin) ECLIPSE_SWT_JAR=org.eclipse.swt.carbon.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_
PT_ECHO=echo
;;
esac
AC_MSG_CHECKING([for Eclipse jars used with javadoc])
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.jdt.ui_ $ECLIPSE_SWT_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 "
PTBACKTRACK_ECLIPSE_DOC_JARS="$PTBACKTRACK_ECLIPSE_DOC_JARS$CLASSPATHSEPARATOR$jarpath"
# case "`uname -s`" in
# Darwin) updateClasspath "$jarpath";;
# esac
else
AC_MSG_WARN([Failed to find $jar in $ECLIPSE_DIR: $jarpath])
failedToFindEclipseDocJars=1
break
fi
done
if test ! -z "$PTBACKTRACK_ECLIPSE_DOC_JARS" -a -z "$failedToFindEclipseDocJars"; then
PT_MSG_RESULT([ok])
else
AC_MSG_WARN([Failed to find Eclipse jar file for docs.
As a result, building the javadoc documentation might show warnings.
$eclipseMessage])
fi
startdir=$PTII
cd "$srcdir/config"
AC_MSG_CHECKING([for ITreeSelection from Eclipse])
if "$JAVAC" -classpath "$PTBACKTRACK_ECLIPSE_DOC_JARS" EclipseITreeSelection.java ; then
PT_MSG_RESULT([ok])
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
AC_MSG_WARN([Failed to compile config/EclipseITreeSelection.java with
(cd "$PTII/config"; "$JAVAC" -classpath $PTBACKTRACK_ECLIPSE_DOC_JARS EclipseITreeSelection.java)
$eclipseMessage])
eclipsejarpath=
fi
cd "$startdir"
fi
fi
if test "$ECLIPSE_DIR" != "no" -a "$PTBACKTRACK_ECLIPSE_DIR" = ""; then
AC_MSG_WARN([Failed to find Eclipse
perhaps Eclipse is not installed?
$eclipseMessage])
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
#--------------------------------------------------------------------
# db and dbxml is the Oracle Berkeley XML DB
# http://www.oracle.com/technology/software/products/berkeley-db/xml/index.html
# dbxml is used by the ptdb directory.
# db and dbxml are basically GPL'd, see $PTII/ptdb/lib/db-dbxml-license.htm
#--------------------------------------------------------------------
# PTDB_DIR is set to ptdb and used in
# $PTII/makefile if dbxml is found
PTDB_DIR=
PTDBXML_JAR='${PTII}/vendors/oracle/dbxml.jar'
PTDB_JAR='${PTII}/vendors/oracle/db.jar'
# Jar files necessary for compilation
PTDBXML_JARS="${PTDBXML_JAR}${CLASSPATHSEPARATOR}${PTDB_JAR}"
# We only need to look for dbxml if $PTDB_USER_DIR
PTDB_USER_DIR="$PTII/ptdb"
if test ! -d "$PTDB_USER_DIR"; then
PT_MSG_STATUS([$PTDB_USER_DIR is not present,
so we need not find the dbxml interface.])
else
AC_MSG_CHECKING([for dbxml.jar ])
AC_ARG_WITH(dbxml, [ --with-dbxml=JAR use dbxml.jar from JAR,
defaults to \$PTII/vendors/oracle/dbxml.jar],
PTDBXML_JAR=$withval,
PTDBXML_JAR=$PTII/vendors/oracle/dbxml.jar)
if test -f "$PTDBXML_JAR"; then
PT_MSG_RESULT([$PTDBXML_JAR])
AC_MSG_CHECKING([for db.jar ])
AC_ARG_WITH(db, [ --with-db=JAR use db.jar from JAR,
defaults to \$PTII/vendors/oracle/db.jar],
PTDB_JAR=$withval,
PTDB_JAR=$PTII/vendors/oracle/db.jar)
if test -f "$PTDB_JAR"; then
PT_MSG_RESULT([$PTDB_JAR])
# Set to ptdb and used in
# $PTII/makefile
# Set to ptdb and used in
# $PTII/makefile
PTDB_DIR=ptdb
# PTDB_PACKAGES is used in ptII/doc/makefile
PTDB_PACKAGES=`$FIND ptdb -name "*.java" | grep -v /test | awk -F / '{printf("%s", $1); for (i = 2; i < NF; i++) printf(".%s", $i); printf("\n")}' | sort | uniq | awk '{printf("%s ", $0)}'`
fi
fi
# Look for shared libraries necessary at runtime.
AC_MSG_CHECKING([for dbxml runtime shared libraries])
AC_ARG_WITH(dbxmllib, [ --with-dbxmllib=DIR use libdbxml from DIR,
defaults to \$PTII/vendors/misc/dbxml-2.5.16/install/lib],
PTDBXML_LIB=$withval,
PTDBXML_LIB=$PTII/vendors/misc/dbxml-2.5.16/install/lib)
if test -d "$PTDBXML_LIB"; then
PT_MSG_RESULT([$PTDBXML_LIB])
libdbxml=`$FIND "$PTDBXML_LIB" -name "*dbxml-*"`
if test ! -f "$libdbxml"; then
AC_MSG_WARN([Failed to find dbxml-X.Y shared library in $PTDBXML_LIB])
fi
else
AC_MSG_WARN([Failed to find dbxml-X.Y shared library in $PTDBXML_LIB.
This means that the Ptolemy/Android HandSimDroid prototype will not run.])
fi
if test "$PTDB_DIR" = ""; then
AC_MSG_WARN([Failed to find the Oracle Berkeley XML DB (dbxml) in
$PTDBXML_JAR and
$PTDB_JAR
Perhaps the Oracle Berkeley XML DB is not installed?
You need not download dbxml unless you
plan on using the ptdb facility which uses a database to manage actors with Ptolemy II.
The dbxml interface can be downloaded from
http://www.oracle.com/technology/software/products/berkeley-db/xml/index.html
an untar'd into $PTII/vendors/misc and built.
For further instructions, see $PTII/ptdb/doc] )
else
PTDBXML_JARS="${PTDBXML_JAR}${CLASSPATHSEPARATOR}${PTDB_JAR}"
fi
if test ! "$HAS_GENERICS" = "yes"; then
#ptdb.gui.GraphPatternSearchEditor import ptalon.gt.PtalonMatcher
AC_MSG_WARN([You are running Java $JVERSION, which does not
support generics. Thus, ptdb, which depends on ptolemy/actor/ptalon will not compile.])
PTDBXML_JAR=""
PTDB_JAR=""
fi
fi
if test -z "$PTDB_DIR"; then
updateExcludes "ptdb/"
else
updateClasspath "$PTDBXML_JAR"
updateClasspath "$PTDB_JAR"
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
PT_MSG_STATUS([$PTII/ptolemy/copernicus/c is not present,
so we need not find the Boehm GC.])
else
AC_PATH_PROG(PTCC, gcc)
if test "${PTCC:-none}" = "none"; then
AC_MSG_WARN([Failed to find gcc])
AC_PATH_PROG(PTCC, cc)
if test "${PTCC:-none}" != "none"; then
PT_MSG_RESULT([$PTCC])
else
AC_MSG_WARN([Failed to find gcc or cc, so we will
not be able use GC in $PTII/ptolemy/copernicus/c]);
fi
fi
if test "${PTCC:-none}" != "none"; then
AC_MSG_CHECKING([for Garbage Collector])
AC_CHECK_LIB(gc, GC_malloc, PT_GC=yes, PT_GC=no)
if test "$PT_GC" = "yes"; then
PT_MSG_RESULT(yes)
else
if test -f "$PTII/lib/libgc.a"; then
# FIXME: what about Windows?
GC_LD_DIRECTIVE='"-L${PTII}/lib" -lgc'
PT_MSG_RESULT(use $GC_LD_DIRECTIVE)
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
AC_MSG_WARN([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])
fi
done
fi
fi
fi
AC_MSG_CHECKING([for gc.h])
AC_ARG_WITH(gc-include, [ --with-gc-include=DIR use gc.h from DIR
defaults to \$PTII/vendors/gc/gc/include],
GC_INCLUDE_DIR=$withval,
GC_INCLUDE_DIR=$PTII/vendors/gc/gc/include)
if test -f "$GC_INCLUDE_DIR/gc.h"; then
PT_MSG_RESULT([$GC_INCLUDE_DIR/gc.h])
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
PT_MSG_RESULT([$GC_INCLUDE_DIR/gc.h])
fi
done
if test ! -f "$GC_INCLUDE_DIR/gc.h"; then
AC_MSG_WARN([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.])
fi
fi
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
PT_MSG_STATUS([$ITEXT_USER_DIR is not present,
so we need not find the iText PDF interface.])
else
AC_MSG_CHECKING([for the iText PDF jar])
AC_ARG_WITH(itextpdf, [ --with-itextpdf=JARFILE use iText from JARFILE,
defaults to \$PTII/vendors/misc/itext/iText.jar],
PTITEXTPDF_JAR=$withval,
PTITEXTPDF_JAR=$PTII/vendors/misc/itext/iText.jar)
if test -f "$PTITEXTPDF_JAR"; then
PT_MSG_RESULT([$PTITEXTPDF_JAR])
# 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
AC_MSG_WARN([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.])
# 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 protobuf jar file, typically $PTII/lib/g4ltl.jar
PTG4LTL_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
PT_MSG_STATUS([$G4LTL_USER_DIR is not present, so we need not find G4LTL.])
else
AC_MSG_CHECKING([G4LTL])
if test -f "$PTII/lib/g4ltl.jar"; then
PT_MSG_RESULT($PTII/lib/g4ltl.jar)
PTG4LTL_JAR="$PTII/lib/g4ltl.jar"
PTG4LTL_DIR=g4ltl
PTG4LTL_PACKAGES="ptolemy.vergil.basic.imprt.g4ltl"
updateClasspath "$PTG4LTL_JAR"
else
AC_MSG_WARN([Failed to find $PTII/lib/g4ltl.jar,
which means that importing an FSMActor using LTL synthesis (G4LTL) will not be supported.]);
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
PT_MSG_STATUS([$MESCAL_RELSAT_USER_DIR is not present,
so we need not find GMP.])
else
case "`uname -s`" in
Linux) ARCH=linux;;
*) ARCH=unknown;;
esac
if test "$PTGMP" = "no"; then
AC_MSG_CHECKING([for GMP in \$PTII/mescal/include/gmp.h])
if test -f "$PTII/mescal/include/gmp.h"; then
PT_MSG_RESULT([ok])
PTGMP_INCLUDE="-I$PTII/mescal/include"
PTGMP_LIB="-L$PTII/mescal/lib"
PTGMP_LD_FLAGS="-Wl,-R$PTII/mescal/lib"
PTGMP=yes
else
PT_MSG_RESULT([not found, keep looking])
fi
fi
if test "$PTGMP" = "no"; then
AC_MSG_CHECKING([for GMP in /usr/local/include/gmp.h])
if test -f "/usr/local/include/gmp.h"; then
PT_MSG_RESULT([ok])
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
PT_MSG_RESULT([not found, keep looking])
fi
fi
if test "$PTGMP" = "no"; then
AC_MSG_CHECKING([for GMP])
AC_CHECK_HEADERS(gmp.h, PTGMP=yes, PTGMP=no)
fi
if test "$PTGMP" = "yes"; then
AC_MSG_CHECKING([for gcc])
AC_PATH_PROG(PTCC, gcc)
if test "${PTCC:-none}" = "none"; then
AC_MSG_WARN([Failed to find gcc])
AC_PATH_PROG(PTCC, cc)
if test "${PTCC:-none}" = "none"; then
AC_MSG_WARN([Failed to find gcc or cc, so we will
not be able to compile the mescal output]);
fi
fi
PTGMP_OK=no
startdir=$PTII
# Make sure that we check for CXX before cding in to config
AC_PROG_CXX
cd "$srcdir/config"
AC_MSG_CHECKING([gmp by compiling a C small program])
if "$PTCC" gmpTest.c $PTGMP_INCLUDE -o gmpTest $PTGMP_LD_FLAGS $PTGMP_LIB -lgmp ; then
./gmpTest
PT_MSG_RESULT([ok])
else
RESULTS=`"$PTCC" gmpTest.c $PTGMP_INCLUDE -o gmpTest $PTGMP_LD_FLAGS$PTGMP_LIB -lgmp`
AC_MSG_WARN([Failed to compile config/gmpTest.c,
"$PTCC" gmpTest.c $PTGMP_INCLUDE -o gmpTest $PTGMP_LIB -lgmp
$RESULTS])
fi
AC_MSG_CHECKING([gmp by compiling a C++ small program])
if "$CXX" gmpTest2.cc $PTGMP_INCLUDE -o gmpTest2 $PTGMP_LD_FLAGS $PTGMP_LIB -lgmpxx -lgmp ; then
./gmpTest2
PT_MSG_RESULT([ok])
else
RESULTS=`"$CXX" gmpTest2.cc $PTGMP_INCLUDE -o gmpTest2 $PTGMP_LD_FLAGS $PTGMP_LIB -lgmpcxx -lgmp`
AC_MSG_WARN([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])
fi
cd "$startdir"
fi
if test "$PTGMP" = "no"; then
AC_MSG_WARN([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])
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
PT_MSG_STATUS([$HOMER_USER_DIR is not present,
so we need not find the Netbeans visual gui interface.])
else
AC_MSG_CHECKING([for org-openide-util.jar, used by homer ])
AC_ARG_WITH(openideutil, [ --with-openideutil=JAR use org-openide-util.jar from JAR,
defaults to \$PTII/lib/org-openide-util.jar],
PTOPENIDEUTIL_JAR=$withval,
PTOPENIDEUTIL_JAR=$PTII/lib/org-openide-util.jar)
if test -f "$PTOPENIDEUTIL_JAR"; then
PT_MSG_RESULT([$PTOPENIDEUTIL_JAR])
AC_MSG_CHECKING([for org-openide-util-lookup.jar, used by homer ])
AC_ARG_WITH(openideutillookup, [ --with-openideutillookup=JAR use org-openide-util-lookup.jar from JAR,
defaults to \$PTII/lib/org-openide-util-lookup.jar],
PTOPENIDEUTILLOOKUP_JAR=$withval,
PTOPENIDEUTILLOOKUP_JAR=$PTII/lib/org-openide-util-lookup.jar)
if test -f "$PTOPENIDEUTILLOOKUP_JAR"; then
PT_MSG_RESULT([$PTOPENIDEUTILLOOKUP_JAR])
AC_MSG_CHECKING([for org-netbeans-api-visual.jar, used by homer ])
AC_ARG_WITH(netbeansapivisual, [ --with-netbeansapivisual=JAR use org-netbeans-api-visual.jar from JAR,
defaults to \$PTII/lib/org-netbeans-api-visual.jar],
PTNETBEANSAPIVISUAL_JAR=$withval,
PTNETBEANSAPIVISUAL_JAR=$PTII/lib/org-netbeans-api-visual.jar)
if test -f "$PTNETBEANSAPIVISUAL_JAR"; then
PT_MSG_RESULT([$PTNETBEANSAPIVISUAL_JAR])
# 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
AC_MSG_WARN([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] )
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
PT_MSG_STATUS([$JAI_USER_DIR is not present,
so we need not find JAI - The Java Advanced Imaging API.])
else
AC_MSG_CHECKING([for Java Advanced Imaging (JAI) API])
# 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
PT_MSG_RESULT(JAI found in the default classpath)
PTJAI_DIR=jai
# PTJAI_PACKAGES is used in ptII/doc/makefile
PTJAI_PACKAGES=ptolemy.actor.lib.jai
AC_MSG_CHECKING([for the jai jar files])
if "$JAVAC" FindClass.java ; then
# Usually jai-core.jar will be in the CLASSPATH
JAI_JAR=`CLASSPATH="$PTII/config$CLASSPATHSEPARATOR$CLASSPATH" "$JAVA" FindClass javax.media.jai.RenderedOp`
if test -f "$JAI_JAR" ; then
JAI_JARS_DIR=`dirname "$JAI_JAR"`
JAI_JARS="${JAI_JARS_DIR}/jai_core.jar${CLASSPATHSEPARATOR}${JAI_JARS_DIR}/jai_codec.jar"
PT_MSG_RESULT($JAI_JARS)
# Here, we should not be adding JAI_JAR to Eclipse
# if jai.jar was in the jre
case "`uname -s`" in
Darwin)
AC_MSG_WARN([Not including
$JAI_JARS_DIR/{jai_core.jar,jai_codec.jar}
to the Eclipse classpath under Darwin because it is already present.]);;
*)
updateClasspath "$JAI_JARS_DIR/jai_core.jar"
updateClasspath "$JAI_JARS_DIR/jai_codec.jar"
;;
esac
else
AC_MSG_WARN([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])
JAI_JAR=
fi
else
AC_MSG_WARN(['"$JAVAC" FindClass.java' failed.
This means that Eclipse might not be able to find the JAI files.
This is only a problem if you are using Eclipse])
fi
else
AC_MSG_WARN(['"$JAVAC" JAITest.java' failed.
perhaps the Java Advanced Imaging API is not installed?
You need not download Jai unless you plan on using the video
actors in $JAI_USER_DIR
The JAI API can be downloaded from
https://jai.dev.java.net/])
fi
cd "$startdir"
fi
if test -z "$PTJAI_DIR"; then
updateExcludes "ptolemy/actor/lib/jai/"
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 ptolemy/apps/hlacerti
#--------------------------------------------------------------------
# JCERTI jar files used by ptolemy/apps/hlacerti
PTJCERTI_JAR=
# We only need to look for JCERTetty if $HLACERT_USER_DIR is present
HLACERTI_USER_DIR="$PTII/ptolemy/apps/hlacerti"
if test ! -d "$HLACERTI_USER_DIR" ; then
PT_MSG_STATUS([$HLACERTI_USER_DIR is not present,
so we need not find jcerti.jar.])
else
AC_MSG_CHECKING([for Jcerti, used by hlacerti ])
AC_ARG_WITH(jcerti, [ --with-jcerti=JAR use jcert.jar from JAR,
defaults to \$PTII/lib/jcerti.jar],
PTJCERTI_JAR=$withval,
PTJCERTI_JAR=$PTII/lib/jcerti.jar)
if test -f "$PTJCERTI_JAR"; then
PT_MSG_RESULT([$PTJCERTI_JAR])
# 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="ptolemy.apps.hlacerti.lib"
updateClasspath "$PTJCERTI_JAR"
else
AC_MSG_WARN([Failed to find jcerti.jar necessary to compile ptolemy/apps/hlacerti
hlacerti is optional])
updateExcludes "ptolemy/apps/hlacerti/"
fi
fi
#--------------------------------------------------------------------
# "Jetty is a pure Java-based HTTP server and Java Servlet container."
# See http://www.eclipse.org/jetty/
# Jetty is used by Ptango and Ptserver
#--------------------------------------------------------------------
# Jetty jar files used by Ptango and ptserver.
PTJETTY_JAR=
# javax.servlet-api*.jar used by Ptango and ptserver.
PTSERVLET_JAR=
# smack.jar and smackx.jar used by Ptango, implements xmpp
PTSMACK_JAR=
PTSMACKX_JAR=
# We only need to look for Jetty if $PTANGO_USER_DIR is present
# We only need to look for Jetty if $PTSERVER_USER_DIR is present
PTANGO_USER_DIR="$PTII/org/ptolemy/ptango"
PTSERVER_USER_DIR="$PTII/ptserver"
if test ! -d "$PTANGO_USER_DIR" -a ! -d "$PTSERVER_USER_DIR"; then
PT_MSG_STATUS([$PTANGO_USER_DIR and $PTSERVER_USER_DIR are not present,
so we need not find the Jetty.])
else
AC_MSG_CHECKING([for Jetty, used by ptango and ptserver ])
AC_ARG_WITH(jetty, [ --with-jetty=JAR use jetty.jar from JAR,
defaults to \$PTII/lib/jetty-all-8.1.5-v20120716.jar],
PTJETTY_JAR=$withval,
PTJETTY_JAR=$PTII/lib/jetty-all-8.1.5-v20120716.jar)
if test -f "$PTJETTY_JAR"; then
PT_MSG_RESULT([$PTJETTY_JAR])
AC_MSG_CHECKING([for Servlet, used by ptango and ptserver])
AC_ARG_WITH(servlet, [ --with-servlet=JAR use servlet.jar from JAR,
defaults to \$PTII/lib/javax.servlet-api-3.0.1.jar],
PTSERVLET_JAR=$withval,
PTSERVLET_JAR=$PTII/lib/javax.servlet-api-3.0.1.jar)
if test -f "$PTSERVLET_JAR"; then
PT_MSG_RESULT([$PTSERVLET_JAR])
fi
fi
AC_MSG_CHECKING([for Smack, used by ptango])
AC_ARG_WITH(smack, [ --with-smack=JAR use smack.jar from JAR,
defaults to \$PTII/lib/smack.jar],
PTSMACK_JAR=$withval,
PTSMACK_JAR=$PTII/lib/smack.jar)
if test -f "$PTSMACK_JAR"; then
PT_MSG_RESULT([$PTSMACKJAR])
updateClasspath "$PTSMACK_JAR"
else
AC_MSG_WARN([Failed to find the Smack jar files necessary to compile ptango.
Ptango is the Ptolemy Internet of Things project.
For further instructions, see http://chess.eecs.berkeley.edu/ptango.])
fi
AC_MSG_CHECKING([for Smackx, used by ptango])
AC_ARG_WITH(smackx, [ --with-smackx=JAR use smackx.jar from JAR,
defaults to \$PTII/lib/smackx.jar],
PTSMACKX_JAR=$withval,
PTSMACKX_JAR=$PTII/lib/smackx.jar)
if test -f "$PTSMACKX_JAR"; then
PT_MSG_RESULT([$PTSMACKXJAR])
updateClasspath "$PTSMACKX_JAR"
else
AC_MSG_WARN([Failed to find the Smackx jar files necessary to compile ptango.
Ptango is the Ptolemy Internet of Things project.
For further instructions, see http://chess.eecs.berkeley.edu/ptango.])
fi
if ! test -f "$PTJETTY_JAR"; then
AC_MSG_WARN([Failed to find the Jetty jar files necessary to compile ptango.
Ptango is the Ptolemy Internet of Things project.
For further instructions, see http://chess.eecs.berkeley.edu/ptango.])
else
updateClasspath "$PTJETTY_JAR"
fi
if ! test -f "$PTSERVLET_JAR"; then
AC_MSG_WARN([Failed to find the Servlet jar files necessary to compile ptango.
Ptango is the Ptolemy Internet of Things project.
For further instructions, see http://chess.eecs.berkeley.edu/ptango.])
else
updateClasspath "$PTSERVLET_JAR"
fi
# We check that the appropriate jars are available below for Ptango
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
PT_MSG_STATUS([$JAVAMAIL_USER_DIR is not present,
so we need not find the JavaMail interface.])
else
AC_MSG_CHECKING([for JavaMail directory])
AC_ARG_WITH(javamail, [ --with-javamail=DIRECTORY use JavaMail interface from DIRECTORY,
defaults to \$PTII/lib],
JAVAMAIL_DIR=$withval,
JAVAMAIL_DIR=$PTII/lib)
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"
PT_MSG_RESULT([$JAVAMAIL_DIR])
fi
if test "$PTJAVAMAIL_DIR" = ""; then
AC_MSG_WARN([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])
# 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
#--------------------------------------------------------------------
# js: Rhino JavaScript implementation
# https://developer.mozilla.org/en-US/docs/Rhino
# Js is used by actors
#--------------------------------------------------------------------
# Jar files used by JavaScript.
# Rhino JavaScript jar files used by export html facility
PTJAVASCRIPT_JAR=
# Set to js if js.jar is found and used in $PTII/ptolemy/actor/lib/makefile
PTJAVASCRIPT_DIR=
# OAuth Client jar file used by the JavaScript actor $PTII/lib/org.apache.oltu.oauth2.*.jar
PTOAUTHCLIENT_JAR=
# OAuth Common jar file used by the JavaScript actor $PTII/lib/org.apache.oltu.oauth2.*.jar
PTOAUTHCOMMON_JAR=
# socketio Jar used by the JavaScript actor $PTII/lib/socketio.jar The
# socketio.jar file is built by running "ant jar" after downloading
# source from here: https://github.com/Gottox/socket.io-java-client
PTSOCKETIO_JAR=
# We only need to look for Jsoup if $PTJAVASCRIPT_USER_DIR is present
PTJAVASCRIPT_USER_DIR="$PTII/ptolemy/actor/lib/js"
if test ! -d "$PTJAVASCRIPT_USER_DIR"; then
PT_MSG_STATUS([$PTJAVASCRIPT_USER_DIR is not present,
so we need not find Rhino JavaScript Implementation.])
else
AC_MSG_CHECKING([for JavaScript, used by js and org.terraswarm.kernel actors. ])
AC_ARG_WITH(rhino, [ --with-javascript=JAR use js.jar from JAR,
defaults to \$PTII/lib/js.jar],
PTJAVASCRIPT_JAR=$withval,
PTJAVASCRIPT_JAR=$PTII/lib/js.jar)
if test -f "$PTJAVASCRIPT_JAR"; then
PT_MSG_RESULT([$PTJAVASCRIPT_JAR])
updateClasspath "$PTJAVASCRIPT_JAR"
AC_MSG_CHECKING([for OAuth client, used by js and org.terraswarm.kernel actors. ])
AC_ARG_WITH(oauthclient, [ --with-oauthclient=JAR use oauth from JAR,
defaults to \$PTII/lib/org.apache.oltu.oauth2.client-1.0.1-SNAPSHOT.jar],
PTOAUTHCLIENT_JAR=$withval,
PTOAUTHCLIENT_JAR=$PTII/lib/org.apache.oltu.oauth2.client-1.0.1-SNAPSHOT.jar)
if test -f "$PTOAUTHCLIENT_JAR"; then
PT_MSG_RESULT([$PTOAUTHCLIENT_JAR])
updateClasspath "$PTOAUTHCLIENT_JAR"
AC_MSG_CHECKING([for OAuth common, used by js and org.terraswarm.kernel actors. ])
AC_ARG_WITH(oauthcommon, [ --with-oauthcommon=JAR use oauth from JAR,
defaults to \$PTII/lib/org.apache.oltu.oauth2.common-1.0.1-SNAPSHOT.jar],
PTOAUTHCOMMON_JAR=$withval,
PTOAUTHCOMMON_JAR=$PTII/lib/org.apache.oltu.oauth2.common-1.0.1-SNAPSHOT.jar)
if test -f "$PTOAUTHCOMMON_JAR"; then
PT_MSG_RESULT([$PTOAUTHCOMMON_JAR])
updateClasspath "$PTOAUTHCOMMON_JAR"
AC_MSG_CHECKING([for socketio, used by js and org.terraswarm.kernel actors. ])
AC_ARG_WITH(socketio, [ --with-socketio=JAR use socketIO from JAR,
defaults to \$PTII/lib/socketio.jar],
PTSOCKETIO_JAR=$withval,
PTSOCKETIO_JAR=$PTII/lib/socketio.jar)
if test -f "$PTSOCKETIO_JAR"; then
PT_MSG_RESULT([$PTSOCKETIO_JAR])
updateClasspath "$PTSOCKETIO_JAR"
PTJAVASCRIPT_DIR=js
# PTJAVASCRIPT_PACKAGES is used in ptII/doc/makefile
PTJAVASCRIPT_PACKAGES="ptolemy.actor.lib.js org.terraswarm.kernel"
fi
fi
fi
fi
fi
if test -z "$PTJAVASCRIPT_DIR"; then
updateExcludes "ptolemy/actor/lib/js/"
updateExcludes "org/terraswarm/kernel/"
# Only print the message if the PTJAVASCRIPT_USER_DIR was present.
if test -d "$PTJAVASCRIPT_USER_DIR"; then
AC_MSG_WARN([Failed to find the OAuth common jar files or socketio necessary to
to compile ptolemy/actor/lib/js and org/terraswarm/kernel
Typically, the OAuth client jar is found at $PTII/lib/org.apache.oltu.oauth2.common-1.0.1-SNAPSHOT.jar.
The lib/socketio.jar, is built by running "ant jar" after downloading source from here:
https://github.com/Gottox/socket.io-java-client])
fi
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 jmf if $PTII/ptolemy/actor/lib/fmi exists
JMODELICA_USER_DIR="$PTII/ptolemy/actor/lib/fmi/fmus/jmodelica"
if test ! -d "$JMODELICA_USER_DIR"; then
PT_MSG_STATUS([$JMODELICA_USER_DIR is not present,
so we need not find JModelica.])
else
AC_MSG_CHECKING([for JModelica])
if test -f "/usr/local/jmodelica/include/jmi.h"; then
PT_MSG_RESULT([/usr/local/jmodelica/include/jmi.h])
JMODELICA_HOME="/usr/local/jmodelica"
PTJMODELICA_DIR=jmodelica
PTJMODELICA_PACKAGES=""
else
AC_MSG_WARN([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])
fi
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
PT_MSG_STATUS([$JMF_USER_DIR is not present,
so we need not find the JMF - The Java Media Framework.])
else
AC_MSG_CHECKING([for Java Media Framework (JMF)])
# 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
PT_MSG_RESULT(JMF found in the default classpath.)
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
AC_MSG_CHECKING([for the JMF directory])
if "$JAVAC" FindClass.java ; then
# Usually jmf.jar will be in the CLASSPATH
JMF_JAR=`CLASSPATH="$PTII/config$CLASSPATHSEPARATOR$CLASSPATH" "$JAVA" FindClass javax.media.CaptureDeviceInfo`
if test -f "$JMF_JAR" ; then
JMF_JARS_DIR=`dirname "$JMF_JAR"`
PT_MSG_RESULT($JMF_JARS_DIR)
# 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
AC_MSG_WARN([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])
JMF_JAR=
fi
else
AC_MSG_WARN(['"$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])
fi
else
AC_MSG_WARN(['"$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/tech/index-jsp-140239.html])
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=
# PTGDP_DIR is set to fmi if jna.jar was found
# $PTII/org/terraswarm/makefile uses PTGDP_DIR
PTGDP_DIR=
# PTGDP_PACKAGES is used in doc/makefile
PTGDP_PACKAGES=
# The location of the jna.jar file, typically $PTII/lib/jna.jar
JNA_JAR=
# We only need look for jmf if $PTII/ptolemy/actor/lib/fmi exists
JNA_USER_DIR="$PTII/ptolemy/actor/lib/fmi"
if test ! -d "$JNA_USER_DIR"; then
PT_MSG_STATUS([$JNA_USER_DIR is not present,
so we need not find the JNA - The Java Native Access utility.])
else
AC_MSG_CHECKING([for Java Native Access (JNA) jar])
AC_ARG_WITH(jna-jar, [ --with-jna-jar=JARFILE use JNA from JARFILE,
defaults to \$PTII/jna-4.0.0-variadic.jar],
JNA_JAR=$withval,
JNA_JAR=$PTII/lib/jna-4.0.0-variadic.jar)
if test -f "$JNA_JAR"; then
PT_MSG_RESULT($JNA_JAR)
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"
PTGDP_DIR=gdp
if test -d "$PTII/org/terraswarm/gdp"; then
PTGDP_PACKAGES="org.terraswarm.gdp org.terraswarm.gdp.apps"
fi
if test -d "$PTII/ptolemy/domains/fmi"; then
PTFMI_PACKAGES="$PTFMI_PACKAGES ptolemy.domains.fmi.kernel ptolemy.domains.fmi.lib"
fi
updateClasspath "$JNA_JAR"
else
AC_MSG_WARN([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])
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
PT_MSG_STATUS([$PTII/ptolemy/actor/lib/joystick is not present,
so we need not find the Joystick interface.])
else
AC_MSG_CHECKING([for joystick jar file])
AC_ARG_WITH(joystick-jar, [ --with-joystick-jar=JARFILE use JOYSTICK from JARFILE,
defaults to \$PTII/vendors/misc/joystick/Joystick.jar],
JOYSTICK_JAR=$withval,
JOYSTICK_JAR=$PTII/vendors/misc/joystick/Joystick.jar)
if test -f "$JOYSTICK_JAR"; then
PT_MSG_RESULT([$JOYSTICK_JAR])
# 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
AC_MSG_WARN([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/])
# 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
JTCLSH='["$(JAVA)" -Xmx1000M $(JAVAFLAGS) "-Dptolemy.ptII.dir=$(PTII)" $(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
PT_MSG_STATUS([$PTII/util/testsuite is not present,
so we need not find Jacl.])
else
AC_MSG_CHECKING([for ptjacl.jar])
AC_ARG_WITH(ptjacl_jar, [ --with-ptjacl_jar=PTJACL.JAR ptjacl.jar file,
used for running the test scripts],
PTJACL_JAR=$withval, PTJACL_JAR=$PTII/lib/ptjacl.jar)
if test -f "$PTJACL_JAR"; then
PT_MSG_RESULT([$PTJACL_JAR])
AC_MSG_CHECKING([for how to run jacl with "$JAVA"])
# This command starts up Jacl
if echo "set java::jdkVersion; exit" | CLASSPATH="$PTJACL_JAR" "$JAVA" tcl.lang.Shell; then
PT_MSG_RESULT($PTJACL_JAR)
PTJACL_DIR=ptjacl
else
PT_MSG_RESULT([CLASSPATH="$PTJACL_JAR" "$JAVA" tcl.lang.Shell failed])
AC_MSG_CHECKING([for how to run jacl with "$JAVA" "$PTJACL_FLAG]")
if echo "set java::jdkVersion; exit" | CLASSPATH="$PTJACL_JAR" "$JAVA" tcl.lang.Shell; then
PT_MSG_RESULT($PTJACL_JAR)
else
PT_MSG_RESULT(['CLASSPATH="$PTJACL_JAR" "$JAVA" tcl.lang.Shell' failed,
use 'CLASSPATH="$PTJACL_JAR" "$JAVA" tcl.lang.Shell'
instead. ptjacl is used by the test suite, so you may be able to
ignore this error.])
fi
JTCLSH='["$(JAVA)" $(JAVAFLAGS) "-Dptolemy.ptII.dir=$(PTII)" $(JTCLFLAGS tcl.lang.Shell]'
fi
else
AC_MSG_WARN([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])
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
PT_MSG_STATUS([$PTJSOUP_USER_DIR is not present,
so we need not find Jsoup.])
else
AC_MSG_CHECKING([for JSoup, used when exporting html pages. ])
AC_ARG_WITH(jsoup, [ --with-jsoup=JAR use jsoup.jar from JAR,
defaults to \$PTII/lib/jsoup-1.7.3.jar],
PTJSOUP_JAR=$withval,
PTJSOUP_JAR=$PTII/lib/jsoup-1.7.3.jar)
if test -f "$PTJSOUP_JAR"; then
PT_MSG_RESULT([$PTJSOUP_JAR])
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/"
AC_MSG_WARN([Failed to find the JSoup jar files necessary to
to compile the export html facility.
Typically, JSoup is found at $PTII/lib/jsoup-1.7.3.jar.])
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
PT_MSG_STATUS([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.])
else
AC_MSG_CHECKING([for the JUnit - the Java Unit Testing Framework])
AC_ARG_WITH(junit, [ --with-junit=JARFILE use JUnit Testing Framework from JARFILE,
defaults to \$PTII/lib/junit-4.8.2.jar],
JUNIT_JAR=$withval,
JUNIT_JAR=$PTII/lib/junit-4.8.2.jar)
if test -f "$JUNIT_JAR"; then
PT_MSG_RESULT([$PTJUNIT_JAR])
AC_MSG_CHECKING([for the JUnitParams, needed by our JUnit tests])
AC_ARG_WITH(junitparams, [ --with-junitparams=JARFILE use JUnitParams Testing Framework from JARFILE,
defaults to \$PTII/lib/JUnitParams-0.4.0.jar],
JUNITPARAMS_JAR=$withval,
JUNITPARAMS_JAR=$PTII/lib/JUnitParams-0.4.0.jar)
if test -f "$JUNITPARAMS_JAR"; then
PT_MSG_RESULT([$PTJUNITPARAMS_JAR])
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
AC_MSG_WARN([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.])
# 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 GPL'd.
# 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"; then
PT_MSG_STATUS([$EXCEL_USER_DIR is not present,
so we need not find JXL - The Java Excel API.])
else
AC_MSG_CHECKING([for the Java Excel API (JXL)])
AC_ARG_WITH(jxl, [ --with-jxl=JARFILE use Java Excel API from JARFILE,
defaults to \$PTII/ptolemy/actor/lib/excel/jxl.jar],
PTJXL_JAR=$withval,
PTJXL_JAR=$PTII/ptolemy/actor/lib/excel/jxl.jar)
if test -f "$PTJXL_JAR"; then
PT_MSG_RESULT([$PTJXL_JAR])
# 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
AC_MSG_WARN([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.])
# 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/"
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
PT_MSG_STATUS([$JYTHON_USER_DIR is not present,
so we need not find the Jython, the java implementation of Python.])
else
AC_PATH_PROG(PTJYTHON, jython)
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
changequote(<<, >>)dnl
# Remove /cygdrive so we can compile with MSVC
JYTHON_TMP_DIR=`echo "$JYTHON_PROG_PARENT_DIR" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
changequote([, ])dnl
AC_MSG_WARN([Found $PTJYTHON,
using $JYTHON_TMP_DIR/jython.jar instead of
$JYTHON_DIR/jython.jar])
JYTHON_DIR="$JYTHON_TMP_DIR"
fi
fi
else
AC_PATH_PROG(PTJYTHON_BAT, jython.bat)
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
changequote(<<, >>)dnl
# Remove /cygdrive so we can compile with MSVC
JYTHON_TMP_DIR=`echo "$JYTHON_PROG_PARENT_DIR" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
changequote([, ])dnl
AC_MSG_WARN([Found $PTJYTHON_BAT,
using $JYTHON_TMP_DIR/jython.jar instead of
$JYTHON_DIR/jython.jar])
JYTHON_DIR="$JYTHON_TMP_DIR"
fi
fi
fi
fi
AC_MSG_CHECKING([for Jython, the Java implementation of Python])
AC_ARG_WITH(jython, [ --with-jython=DIR use jython.jar from DIR,
defaults to \$PTII/lib, though the path
is searched for jython],
JYTHON_DIR=$withval,
JYTHON_DIR=$JYTHON_DIR)
if test -f "$JYTHON_DIR/jython.jar"; then
PT_MSG_RESULT([$JYTHON_DIR])
# 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"
PT_MSG_RESULT([$JYTHON_DIR])
# 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"
PT_MSG_RESULT([$JYTHON_DIR])
# 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
AC_MSG_WARN([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])
# 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'
GUAVA_JAR='${PTII}/lib/guava.jar'
if test ! -d "$KIELER_USER_DIR"; then
PT_MSG_STATUS([$KIELER_USER_DIR is not present,
so we need not find KIELER.])
else
AC_MSG_CHECKING([for kieler jar file used by layout ])
AC_ARG_WITH(kieler-jar, [ --with-kieler-jar=JARFILE use JARFILE,
defaults to \$PTII/lib/kieler.jar],
KIELER_JAR=$withval,
KIELER_JAR=$PTII/lib/kieler.jar)
if test -f "$KIELER_JAR"; then
PT_MSG_RESULT([$KIELER_JAR])
AC_MSG_CHECKING([for guava jar file used by Kieler layout ])
AC_ARG_WITH(guava-jar, [ --with-guava-jar=JARFILE use JARFILE,
defaults to \$PTII/lib/guava.jar],
GUAVA_JAR=$withval,
GUAVA_JAR=$PTII/lib/guava.jar)
if test -f "$GUAVA_JAR"; then
# Set to kieler and used in
# $PTII/ptolemy/vergil/basic/layout/makefile if kieler was found
PTKIELER_DIR=kieler
else
AC_MSG_WARN([Failed to find the Guava Jar file.
Guava is used by the KIELER Layout tool.
Guava is the Google Core Libraries for Java and is available from
http://code.google.com/p/guava-libraries/
You need not use KIELER unless you plan on using the KIELER layout
facility in $KIELER_USER_DIR
The Guava jar is usually found at $PTII/lib/guava.jar.])
# Note that we don't substitute in the ${PTII} here
GUAVA_JAR='${PTII}/lib/guava.jar'
fi
fi
if test "$PTKIELER_DIR" = ""; then
AC_MSG_WARN([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])
# 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"
updateClasspath "$GUAVA_JAR"
fi
#--------------------------------------------------------------------
# OpenCV is the Computer Vision platform
# For more information,
# http://ubaa.net/shared/processing/opencv
# See if there was a command-line option for where OpenVision is.
#--------------------------------------------------------------------
# PTOPENCV_DIR is set to opencv and used in
# $PTII/ptolemy/actor/lib/makefile if opencv was found
PTOPENCV_DIR=
# Used in ptolemy/actor/lib/opencv/makefile
OPENCV_JAR=
# We only need to look for OpenCVif the actor/lib/opencv directory is present
OPENCV_USER_DIR="$PTII/ptolemy/actor/lib/opencv"
# Java Native Access jar file (jna.jar). See https://jna.dev.java.net/
# JNA_JAR may be set above
#JNA_JAR=
if test ! -d "$OPENCV_USER_DIR"; then
PT_MSG_STATUS([$OPENCV_USER_DIR is not present,
so we need not find OpenCV - The Open Computer Vision API.])
else
AC_MSG_CHECKING([for OpenCV Java API])
# 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" OpenCVTest.java ; then
PT_MSG_RESULT(OpenCV found in the default classpath.)
PTOPENCV_DIR=opencv
# PTOPENCV_PACKAGES is used in ptII/doc/makefile
PTOPENCV_PACKAGES="ptolemy.actor.lib.opencv ptolemy.actor.lib.opencv.optimize"
AC_MSG_CHECKING([for the OpenCV jar files])
if "$JAVAC" FindClass.java ; then
# Usually opencv.jar will be in the CLASSPATH
OPENCV_JAR=`CLASSPATH="$PTII/config$CLASSPATHSEPARATOR$CLASSPATH" "$JAVA" FindClass hypermedia.video.OpenCV`
if test -f "$OPENCV_JAR" ; then
PT_MSG_RESULT($OPENCV_JAR)
# Here, we should not be adding OPENCV_JAR to Eclipse
# if OpenCV.jar was in the jre
#case "`uname -s`" in
#Darwin)
# AC_MSG_WARN([Not including
#$OPENCV_JAR
#to the Eclipse classpath under Darwin because it is already present.])
#;;
#*)
updateClasspath "$OPENCV_JAR"
#;;
#esac
else
AC_MSG_WARN([Either we could not find
hypermedia.video.OpenCV 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/ptolemy/actor/lib/opencv/package.html])
OPENCV_JAR=
PTOPENCV_DIR=
PTOPENCV_PACKAGES=
updateExcludes "ptolemy/actor/lib/opencv/javacv/"
fi
AC_MSG_CHECKING([for Processing Library])
if "$JAVAC" FindClass.java ; then
# Usually opencv.jar will be in the CLASSPATH
PROCESSING_CORE_JAR=`CLASSPATH="$PTII/config$CLASSPATHSEPARATOR$CLASSPATH" "$JAVA" FindClass processing.core.PImage`
if test -f "$PROCESSING_CORE_JAR"; then
PT_MSG_RESULT($PROCESSING_CORE_JAR)
PTPROCESSING_JARS=$PROCESSING_CORE_JAR
#case "`uname -s`" in
#Darwin)
# AC_MSG_WARN([Not including
#$PROCESSING_CORE_JAR
#in the Eclipse classpath under Darwin because it is already present.])
#;;
#*)
updateClasspath "$PROCESSING_CORE_JAR"
#;;
#esac
else
AC_MSG_WARN([Either we could not find
processing.core.PImage or else it was already in the JRE.
Searching for PImage returned:
$PROCESSING_CORE_JAR
If the class cannot be found, then Eclipse might not be able to find
the Processing 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
Processing is the image source processing library from
http://processing.org. It is used by the
vision actors in ptolemy/actor/lib/opencv/.
These actors are optional, but require Processing.
For details, see $PTII/ptolemy/actor/lib/opencv/package.html])
PROCESSING_CORE_JAR=
PTOPENCV_DIR=
PTOPENCV_PACKAGES=
updateExcludes "ptolemy/actor/lib/opencv/javacv/"
fi
fi
# Look for JavaCV, which is GPL'd
JAVACV_JAR=
PTJAVACV_DIR=
AC_MSG_CHECKING([for JavaCV jar file])
AC_ARG_WITH(javacv, [ --with-javacv=JAR use the javaCV JAR,
defaults to \$PTII/vendors/misc/javacv-bin/javacv.jar],
JAVACV_JAR=$withval,
JAVACV_JAR=$PTII/vendors/misc/javacv-bin/javacv.jar)
if test -f "$JAVACV_JAR"; then
PT_MSG_RESULT([$JAVACV_JAR])
# Set to javacv and used in
# $PTII/ptolemy/actor/lib/opencv/makefile if JavaCV was found
PTJAVACV_DIR=javacv
updateClasspath "$JAVACV_JAR"
else
AC_MSG_WARN([Failed to find PTII/vendors/misc/javacv-bin/javacv.jar
perhaps JavaCV is not installed?
You need only download JavaCV if you plan on using the actors in
in ptolemy/actor/lib/opencv/JavaCV
JavaCV may be downloaded from http://code.google.com/p/javacv/])
updateExcludes "ptolemy/actor/lib/opencv/javacv/"
# Note that we don't substitute in the ${PTII} here
JAVACV_JAR='${PTII}/vendors/misc/javacv-bin/javacv.jar'
fi
if test -z "$JNA_JAR"; then
AC_MSG_CHECKING([for Java Native Access (JNA) jar])
if test -f "$PTII/lib/jna.jar"; then
PT_MSG_RESULT($PTII/lib/jna.jar)
JNA_JAR="$PTII/lib/jna.jar"
updateClasspath "$JNA_JAR"
else
AC_MSG_WARN([Failed to find $PTII/lib/jna.jar,
JNA is the Java Native Access interfaced, used by the OpenCV
vision actors in ptolemy/actor/lib/opencv/javacv.
These actors are optional, but require JNA.
For more information about JNA, see https://jna.dev.java.net/])
updateExcludes "ptolemy/actor/lib/opencv/javacv/"
fi
fi
else
AC_MSG_WARN(['"$JAVAC" FindClass.java' failed.
This means that Eclipse might not be able to find the OpenCV files.
This is only a problem if you are using Eclipse])
fi
else
AC_MSG_WARN(['"$JAVAC" OpenTest.java' failed.
perhaps the OpenCV Computer Vision API is not installed?
You need not download Jai unless you plan on using the video
actors in $OPENCV_USER_DIR
The OpenCV API can be downloaded from
http://ubaa.net/shared/processing/opencv.
See ptolemy/actor/lib/opencv/package.html for installing help.])
fi
cd "$startdir"
fi
if test -z "$PTOPENCV_DIR"; then
updateExcludes "ptolemy/actor/lib/opencv/"
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
PT_MSG_STATUS([$PTOSCP5_USER_DIR is not present,
so we need not find the Open Sound Control/Processing.org interface.])
else
AC_MSG_CHECKING([for Open Sound Control/Processing.org interface (oscP5). ])
AC_ARG_WITH(oscp5, [ --with-oscp5=JAR use oscP5.jar from JAR,
defaults to \$PTII/lib/oscP5.jar],
PTOSCP5_JAR=$withval,
PTOSCP5_JAR=$PTII/lib/oscP5.jar)
if test -f "$PTOSCP5_JAR"; then
PT_MSG_RESULT([$PTOSCP5_JAR])
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
AC_MSG_WARN([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.])
fi
fi
#--------------------------------------------------------------------
# RXTX is the Serial Port interface that replaces
# Sun's commapi.
# See if there was a command-line option for rxtx is
# If not, check to see if $PTII/vendors/misc/rxtx
#--------------------------------------------------------------------
# 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}/vendors/misc/rxtx/RXTXcomm.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=
if test ! -d "$RXTX_USER_DIR"; then
PT_MSG_STATUS([$RXTX_USER_DIR is not present,
so we need not find rxtx.])
# Use curly brackets around PTII so that if rxtx is not present
# then ${PTII} will appear in ptinvoke.
else
AC_MSG_CHECKING([for rxtx directory])
AC_ARG_WITH(rxtx, [ --with-rxtx=DIR use Java Serial Port Interfacrxtx from DIR,
defaults to $RXTX_JAR_DEFAULT],
RXTX_JAR=$withval,
RXTX_JAR=$PTII/vendors/misc/rxtx/RXTXcomm.jar)
if test -f "$RXTX_JAR"; then
PT_MSG_RESULT($RXTX_JAR)
RXTX_PRESENT=yes
updateClasspath "$RXTX_JAR"
else
AC_MSG_RESULT([Did not find
'$RXTX_JAR'])
AC_MSG_CHECKING([for rxtx classes in CLASSPATH])
startdir=$PTII
cd "$srcdir/config"
if "$JAVAC" FindClass.java ; then
# Usually RXTXcomm.jar will be in the CLASSPATH
RXTX_JAR=`CLASSPATH="$PTII/config$CLASSPATHSEPARATOR$CLASSPATH" "$JAVA" FindClass gnu.io.SerialPort`
if test -f "$RXTX_JAR" ; then
PT_MSG_RESULT($RXTC_JAR)
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)
AC_MSG_WARN([Not including
$RXTX_JAR
to the Eclipse classpath under Darwin because it is already present.]);;
*)
updateClasspath "$RXTX_JAR"
;;
esac
else
# RXTX_JAR might contain a warning message from FindClass
RXTX_JAR=""
CLASSPATH="$PTII/config$CLASSPATHSEPARATOR$CLASSPATH" "$JAVA" FindClass gnu.io.SerialPort > /dev/null
retval=$?
if test "$retval" = "0"; then
PT_MSG_RESULT([ok, RXTX is probably in the jre directory])
RXTX_PRESENT=yes
fi
fi
cd "$startdir"
fi
fi
if test "$RXTX_PRESENT" = "no"; then
AC_MSG_WARN([Perhaps rxtx is not installed?
You need not download rxtx unless you plan the actors in actor.lib.comm.
The rxtx package can be found at
http://mfizz.com/oss/rxtx-for-java">http://mfizz.com/oss/rxtx-for-java
and placed in \$PTII/vendors/misc/rxtx so that
\$PTII/vendors/misc/rxtx/RXTXComm.jar exists.])
fi
fi
if test "$RXTX_PRESENT" = "yes"; then
# Subdirectories that contains Java Communications API specific code
PTLEGO_DIR=lego
PTCOMM_DIR=comm
# PTRXTX_PACKAGES is used in ptII/doc/makefile
PTRXTX_PACKAGES=ptolemy.actor.lib.io.comm
else
RXTX_JAR="$RXTX_JAR_DEFAULT"
updateExcludes "ptolemy/actor/lib/io/comm/"
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
PT_MSG_STATUS([$LEJOS_USER_DIR is not present,
so we need not find lejos.])
# 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
AC_MSG_WARN([Lejos requires rxtx, which was not found.])
else
AC_MSG_CHECKING([for lejos directory])
AC_ARG_WITH(lejos, [ --with-lejos=DIR use Java lejos from DIR,
defaults to \$PTII/vendors/lejos/lejosBeta3],
LEJOS_DIR=$withval,
LEJOS_DIR=$PTII/vendors/lejos/lejosBeta3)
if test -d "$LEJOS_DIR/classes/josx"; then
PT_MSG_RESULT([$LEJOS_DIR])
# Subdirectory that contains Java Communications API specific code
PTLEJOS_DIR=lejos
LEJOS_PRESENT=yes
else
AC_MSG_WARN([Failed to find $LEJOS_DIR/classes/josx/])
LEJOS_DIR='${PTII}/vendors/lejos'
fi
fi
if test "$LEJOS_PRESENT" = "no"; then
AC_MSG_WARN([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])
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
PT_MSG_STATUS([$PTII/ptolemy/data/expr is not present,
so we need not find JavaCC.])
JAVACC_DIR=$PTII/vendors/sun/javacc-5.0
JAVACC=javacc
JJTREE=jjtree
else
AC_MSG_CHECKING([for JavaCC])
AC_ARG_WITH(javacc, [ --with-javacc=DIR use JavaCC.zip from DIR,
defaults to \$PTII/vendors/sun/javacc-5.0],
JAVACC_DIR=$withval, JAVACC_DIR=$PTII/vendors/sun/javacc-5.0)
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'
AC_MSG_WARN([
Be sure that your CLASSPATH includes JavaCC.zip, which is located in]);
else
if test ! -d "$JAVACC_DIR"; then
AC_MSG_WARN([Could not find directory
'${JAVACC_DIR}'
so we search for the jjtree command.])
AC_PATH_PROG(JJTREE, jjtree)
if test -x "$JJTREE"; then
PT_MSG_RESULT([$JJTREE]);
JAVACCBIN=`dirname $JJTREE`
JAVACC_DIR=`dirname $JAVACCBIN`
else
AC_MSG_WARN([Failed to find jjtree]);
fi
fi
if test -d "$JAVACC_DIR"; then
PT_MSG_RESULT([$JAVACC_DIR])
AC_MSG_CHECKING([for jjtree])
if test -x "$JAVACC_DIR/bin/jjtree"; then
# Note that we don't substitute in the $(JAVACC_DIR) here
JJTREE='$(JAVACC_DIR)/bin/jjtree'
PT_MSG_RESULT([$JJTREE])
JJTREE_OPTIONS=-STATIC=false
else
AC_MSG_WARN([Failed to find jjtree in '$JAVACC_DIR/bin']);
fi
AC_MSG_CHECKING([for javacc])
if test -x "$JAVACC_DIR/bin/javacc"; then
# Note that we don't substitute in the $(JAVACC_DIR) here
JAVACC='$(JAVACC_DIR)/bin/javacc'
PT_MSG_RESULT([$JAVACC])
JAVACC_OPTIONS=-STATIC=false
else
AC_MSG_WARN([Failed to find javacc in '$JAVACC_DIR/bin']);
fi
fi
fi
if test ! -d "$JAVACC_DIR"; then
AC_MSG_WARN([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
http://javacc.dev.java.net/
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://java.net/projects/javacc/downloads/download/javacc-5.0.tar.gz
unzip javacc-5.0.tar.gz
./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.'])
JJTREE=touch
JAVACC=touch
fi
fi
#--------------------------------------------------------------------
# Test for javax.media.j3d (Java 3D)
# https://java3d.dev.java.net/
#--------------------------------------------------------------------
# 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=
# 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
PT_MSG_STATUS([$JAVA3D_USER_DIR is not present,
so we need not find Java 3D.])
else
AC_MSG_CHECKING([for Java 3D])
AC_ARG_WITH(java3D, [ --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],
JAVA3D_DIR=$withval,
JAVA3D_DIR=)
# 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 http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Java3D
if test "`uname -s`" = "Darwin"; then
directory=`ls -d $PTII/vendors/j3d/Darwin/*/lib/ext`
else
directory=`ls -d $PTII/vendors/j3d/*/lib/ext`
fi
if test -d "$directory"; then
JAVA3D_DIR="$directory"
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"
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
PT_MSG_RESULT($Java3DClasspath)
if test "`uname -s`" = "Darwin"; then
AC_MSG_CHECKING([for Jogl])
AC_ARG_WITH(jogl, [ --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],
JOGL_DIR=$withval,
JOGL_DIR=)
if test -z "$JOGL_DIR" ; then
directory=`ls -d $PTII/vendors/jogl/*/jar`
if test -d "$directory"; then
JOGL_JAR_DIR="$directory"
PTJOGL_DIR=`dirname $JOGL_JAR_DIR`
fi
if test -f "$JOGL_JAR_DIR/gluegen.jar" -a -f "$JOGL_JAR_DIR/jogl-all.jar"; then
PT_MSG_RESULT($JOGL_JAR_DIR)
JAVA3D_JARS="$JAVA3D_JARS${CLASSPATH}$JOGL_JAR_DIR/gluegen.jar$CLASSPATHSEPARATOR$JOGL_JAR_DIR/jogl-all.jar"
updateClasspath "$JOGL_JAR_DIR/gluegen.jar"
updateClasspath "$JOGL_JAR_DIR/jogl-all.jar"
else
AC_MSG_WARN([Could not fine the Jogl directory. This could be problem at runtime for Mac OS X with Java 3D.])
fi
fi
fi
PTJAVA3D_DIR=gr
PTGRDOMAIN_JAR=gr/gr.jar
# PTGR_PACKAGES is used in ptII/doc/makefile
PTGR_PACKAGES="ptolemy.domains.gr.kernel ptolemy.domains.gr.lib"
else
AC_MSG_WARN(['"$JAVAC" -classpath "$Java3DClasspath" java3dTest.java' failed.
Java 3D may be found at https://java3d.java.net/
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, a special version of Java 3D is present in $PTII/vendors/j3d/Darwin.
See http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Java3D
Under Mac OS X, Jogl must also be installed. Configure looks for Jogl
in $PTII/vendors/jogl/*/jar. Jogl may be found at http://jogamp.org/jogl/www/.
Try:
cd $PTII/vendors; mkdir jogl; cd jogl
wget http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z
7z x jogamp-all-platforms.7z
If you don't have 7z, get it from http://www.7-zip.org/download.html
Then rerun ./configure ])
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
PT_MSG_STATUS([$JINI_USER_DIR is not present,
so we need not find Jini.])
# We don't use JINI_VERSION here so that we don't expand PTII
# in the makefile
JINI_DIR='$PTII/ptolemy/distributed/jini'
else
AC_MSG_CHECKING([for jini directory])
AC_ARG_WITH(jini, [ --with-jini=DIR use Jini jars from DIR,
defaults to \$PTII/ptolemy/distributed/jini],
JINI_DIR=$withval,
JINI_DIR=$PTII/ptolemy/distributed/jini)
JINI_JARS="jini-core.jar jini-ext.jar sun-util.jar"
if test -d "$JINI_DIR"; then
PT_MSG_RESULT([$JINI_DIR])
AC_MSG_CHECKING([for jars used by jini])
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
AC_MSG_WARN([Failed to find $jar in $JINI_DIR: $jarpath])
jinijarpath=
break
fi
done
if test ! -z "$jinijarpath"; then
PT_MSG_RESULT([ok])
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
AC_MSG_WARN([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.])
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
#--------------------------------------------------------------------
PTJNI_DIR=
if test ! -d "$PTII/ptolemy/matlab/" -a ! -d "$PTII/lbnl/lib/matlab/" ; then
PT_MSG_STATUS([$PTII/ptolemy/matlab and $PTII/lbnl/lib/matlab are not present,
so we need not find gcc or cc.])
else
AC_MSG_CHECKING([for the proper JNI architecture])
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_*)
AC_PATH_PROGS(PTCCJNI, mingw32-gcc i686-pc-mingw32-gcc x86_64-w64-mingw32-gcc.exe,)
if test "${PTCCJNI:-none}" = "none"; then
AC_MSG_WARN([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])
fi;;
*) AC_PATH_PROG(PTCCJNI, gcc)
if test "${PTCCJNI:-none}" != "none"; then
AC_PATH_PROG(PTCCJNI, cc)
else
AC_MSG_WARN([Failed to find gcc or cc, so we will
not be able to compile the JNI interface in $PTII/jni]);
fi
;;
esac
AC_PATH_PROG(JAVAH, javah)
# Under MacOS X, JAVAH might be a link
if test ! -e "$JAVAH"; then
AC_MSG_WARN([ Failed to find javah at '$JAVAH', perhaps Java is not installed?])
fi
AC_MSG_CHECKING([for the cc for JNI])
if test "${PTCCJNI:-none}" != "none"; then
# PT_MSG_RESULT([$PTJNICC])
PTJNI_DIR=jni
AC_MSG_CHECKING([for that the pieces for JNI have been found])
if test ! -z $PTJNI_DIR; then
PT_MSG_RESULT(['$PTJNI_ARCHITECTURE'])
AC_MSG_CHECKING([for the proper JNI architecture include directory])
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."
AC_MSG_WARN([$APPLE_JNI_PROBLEM])
fi
fi
fi
else
PTJNI_INCLUDE="$PTJAVA_HOME/../include"
fi
if test ! -d "$PTJNI_INCLUDE"; then
AC_MSG_WARN([$PTJNI_INCLUDE was not found. As a result, compilation of JNI actors will fail.])
else
PT_MSG_RESULT([$PTJNI_INCLUDE])
fi
AC_MSG_CHECKING([for the proper JNI library architecture])
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
PT_MSG_RESULT(['$PTJNI_LIB_ARCHITECTURE'])
dnl AC_MSG_CHECKING([for the proper JNI architecture lib directory])
dnl if test $PTJNI_ARCHITECTURE = "darwin"; then
dnl if test -d "$PTJAVA_HOME/../Libraries"; then
dnl # Probably Apple Java 1.6 under Mac OS X 10.7
dnl PTJNI_LIB="$PTJAVA_HOME/../Libraries"
dnl else
dnl if test -d "$PTJAVA_HOME/lib"; then
dnl # Probably Oracle Java 1.7
dnl # Why Oracle did not put the libs in
dnl # an arch directory like ALL THE OTHER
dnl # RELEASES is beyond me. So much for write
dnl # once, run everywhere. -cxh
dnl PTJNI_LIB="$PTJAVA_HOME/lib"
dnl fi
dnl fi
dnl else
dnl PTJNI_LIB="$PTJAVA_HOME/lib/$PTJNI_LIB_ARCHITECTURE"
dnl fi
dnl if test ! -d "$PTJNI_LIB"; then
dnl AC_MSG_WARN([$PTJNI_LIB was not found.
dnl As a result, $PTII/jni/launcher/launcher might not work.])
dnl else
dnl PT_MSG_RESULT([$PTJNI_LIB])
dnl fi
AC_MSG_CHECKING([for if the -mno-cygwin flag is available])
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
PT_MSG_RESULT(['$PTJNI_NO_CYGWIN'])
AC_MSG_CHECKING([for the proper shared library gcc flag])
case "`uname -s`" in
Darwin) PTJNI_GCC_SHARED_FLAG=-dynamiclib;;
*) PTJNI_GCC_SHARED_FLAG=-shared;
esac
PT_MSG_RESULT(['$PTJNI_GCC_SHARED_FLAG'])
AC_MSG_CHECKING([for the proper shared library cc flag])
# 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
PT_MSG_RESULT(['$PTJNI_SHAREDLIBRARY_CFLAG'])
AC_MSG_CHECKING([for the proper shared library link flag])
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
PT_MSG_RESULT(['$PTJNI_SHAREDLIBRARY_LDFLAG'])
AC_MSG_CHECKING([for the proper shared library prefix])
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
PT_MSG_RESULT(['$PTJNI_SHAREDLIBRARY_PREFIX'])
AC_MSG_CHECKING([for the proper shared library suffix])
# 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
PT_MSG_RESULT(['$PTJNI_SHAREDLIBRARY_SUFFIX'])
AC_MSG_CHECKING([for JNI libraries needed to link JNI])
PTJNI_DL_LIBRARY=
case "`uname -s`" in
CYGWIN_*) PTJNI_LIBRARIES=-lcygwin;;
Linux) PTJNI_LIBRARIES=
PTJNI_DL_LIBRARY=-ldl;;
*) PTJNI_LIBRARIES=;;
esac
PT_MSG_RESULT(['$PTJNI_LIBRARIES'])
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
PT_MSG_STATUS([$PTII/vendors/jode is not present,
so we need not find Jode, which is a java disassembler.])
else
AC_MSG_CHECKING([for jode directory])
AC_ARG_WITH(jode, [ --with-jode=DIR use JODE from DIR,
defaults to \$PTII/vendors/jode/1.1.2-pre1],
JODE_DIR=$withval,
JODE_DIR=$PTII/vendors/jode/1.1.2-pre1)
if test -d "$JODE_DIR"; then
PT_MSG_RESULT([$JODE_DIR])
AC_MSG_CHECKING([for \$JODE_DIR/jode.jar])
if test -f "$JODE_DIR/jode.jar"; then
PT_MSG_RESULT([$JODE_DIR/jode.jar])
JODE_CLASSES=$JODE_DIR/jode.jar
else
JODE_CLASSES=no
fi
fi
if test "$JODE_CLASSES" = "no"; then
AC_MSG_WARN([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])
# 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/cg/syntactic
#--------------------------------------------------------------------
# PTJSON_DIR is set to json and used in
# $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 this director exists:
JSON_USER_DIR="$PTII/ptolemy/cg/lib/syntactic"
if test ! -d "$JSON_USER_DIR"; then
PT_MSG_STATUS([$JSON_USER_DIR is not present,
so we need not find JSON, the JavaScript Object Notation package.])
else
AC_MSG_CHECKING([for json directory])
AC_ARG_WITH(jode, [ --with-json=DIR use JSON from DIR,
defaults to \$PTII/org/json],
JSON_DIR=$withval,
JSON_DIR=$PTII/org/json)
if test -d "$JSON_DIR"; then
PT_MSG_RESULT([$JSON_DIR])
# Used in org/makefile
PTJSON_DIR=json
# Used in doc/makefile
PTJSON_PACKAGES="org.json ptolemy.actor.lib.conversions.json ptolemy.vergil.basic.imprt.accessor"
else
AC_MSG_WARN([Failed to find $PTII/org/json/
perhaps JSON is not installed?
JSON is the JavaScript Object Notation package used by the cg/syntactic
work. You need only have JSON if you plan on using the cg/syntactic work.])
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
PT_MSG_STATUS([$PTII/ptolemy/apps/kvm is not present,
so we need not find the PalmOS kvm.])
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
AC_MSG_CHECKING([for kvm directory])
AC_ARG_WITH(kvm, [ --with-kvm=DIR use PalmOS KVM from DIR,
defaults to \$PTII/vendors/sun/j2me_cldc],
KVM_DIR=$withval,
KVM_DIR=$PTII/vendors/sun/j2me_cldc)
if test -d "$KVM_DIR"; then
PT_MSG_RESULT([$KVM_DIR])
AC_MSG_CHECKING([for \$KVM_DIR/bin/api/classes])
if test -d "$KVM_DIR/bin/api/classes"; then
KVM_CLASSES='$(KVM_DIR)/bin/api/classes'
PT_MSG_RESULT([$KVM_CLASSES])
else
KVM_CLASSES=no
fi
else
PT_MSG_RESULT([Not found in $KVM_DIR])
AC_MSG_CHECKING([for kvm directory in /j2me_cldc])
# Likely place for kvm under windows
KVM_DIR=/j2me_cldc
if test -d "$KVM_DIR"; then
PT_MSG_RESULT([$KVM_DIR])
AC_MSG_CHECKING([for \$KVM_DIR/bin/api/classes])
if test -d "$KVM_DIR/bin/api/classes"; then
KVM_CLASSES='$(KVM_DIR)/bin/api/classes'
PT_MSG_RESULT([$KVM_CLASSES])
else
KVM_CLASSES=no
fi
else
KVM_CLASSES=no
fi
fi
if test "$KVM_CLASSES" = "no"; then
AC_MSG_WARN([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])
# 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
AC_MSG_WARN([$APPLE_JNI_PROBLEM])
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
PT_MSG_STATUS([$PTII/ptolemy/matlab and $PTII/lbnl/lib/matlab are not present,
so we need not find matlab.])
else
AC_MSG_WARN([The Matlab interface is not supported on this platform (you are running `uname -s`).])
fi
else
# We only need to look for matlab if $PTII/ptolemy/matlab exists
if test ! -d "$PTII/ptolemy/matlab"; then
PT_MSG_STATUS([$PTII/ptolemy/matlab is not present,
so we need not find matlab and gcc.])
MATLAB_DIR=/matlab
#PTCC=gcc
else
AC_PATH_PROG(MATLAB, matlab)
if test "${MATLAB:-none}" = "none"; then
AC_MSG_WARN([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.]);
else
startdir=$PTII
cd "$srcdir/config"
if "$JAVAC" RootDirectory.java ; then
AC_MSG_CHECKING([the value of the Matlab root directory ])
if env CLASSPATH="$PTII/config" "$JAVA" RootDirectory "$MATLAB"> /dev/null; then
MATLAB_DIR_TMP=`CLASSPATH="$PTII/config" "$JAVA" RootDirectory "$MATLAB"`
# Use changequote to protect the square brackets in sed
changequote(<<, >>)dnl
# Remove /cygdrive so we can compile with MSVC
MATLAB_DIR=`echo "$MATLAB_DIR_TMP" | sed 's@/cygdrive/\([a-zA-Z]\)/@\1:/@'`
changequote([, ])dnl
PT_MSG_RESULT('$MATLAB_DIR')
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVA RootDirectory "$MATLAB"' failed.
We will not be able to compile the Matlab interface in ptolemy/matlab/]);
fi
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVAC RootDirectory.java' failed.
We will not be able to compile the Matlab interface in ptolemy/matlab]);
fi
cd "$startdir"
if test ! -d "$MATLAB_DIR"; then
AC_MSG_WARN([Failed to find '${MATLAB_DIR}'
If Matlab is not present, then the Ptolemy II/Matlab interface in
\$PTII/ptolemy/matlab will not be usable.]);
else
AC_MSG_CHECKING([for gcc])
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
AC_PATH_PROGS(PTMATLAB_CC, mingw32-gcc i686-pc-mingw32-gcc)
progs="mingw32-gcc i686-pc-mingw32-gcc"
else
MATLAB_LIBDIR=${MATLAB_DIR}/bin/win64
if test ! -d "${MATLAB_LIBDIR}"; then
$AC_MSG_WARN([Failed to find ${MATLAB_DIR}/bin/win32 and ${MATLAB_LIBDIR}?])
fi
# 64-bit
AC_PATH_PROGS(PTMATLAB_CC, x86_64-w64-mingw32-gcc)
progs="x86_64-w64-mingw32-gcc"
fi
if test "${PTMATLAB_CC:-none}" = "none"; then
AC_MSG_WARN([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])
else
OLDCC="$CC"
CC="$PTMATLAB_CC"
PTJNI_LIBC=""
fi;;
*) AC_PATH_PROG(PTMATLAB_CC, gcc)
if test "${PTMATLAB_CC:-none}" != "none"; then
OLDCC="$CC"
CC="$PTMATLAB_CC"
PTJNI_LIBC="-lc"
else
AC_MSG_WARN([Failed to find gcc])
AC_PATH_PROG(PTMATLAB_CC, cc)
if test "${PTMATLAB_CC:-none}" != "none"; then
OLDCC="$CC"
CC="$PTMATLAB_CC"
PTJNI_LIBC="-lc"
else
AC_MSG_WARN([Failed to find gcc or cc, so we will
not be able to compile the Matlab interface in ptolemy/matlab]);
fi
fi;;
esac
if test "${PTMATLAB_CC:-none}" != "none"; then
AC_CHECK_FUNCS(malloc_size, MALLOC_SIZE_FLAG=-DHAVE_MALLOC_SIZE)
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;;
*) AC_MSG_CHECKING([the extension for Matlab .mex files])
PTMATLAB_MEXEXT=`"${MATLAB_DIR}/bin/mexext"`
PT_MSG_RESULT($PTMATLAB_MEXEXT);;
esac
cd "$srcdir/config"
if "$JAVAC" MajorOSName.java ; then
AC_MSG_CHECKING([which major type of OS we are running under])
# Older versions of cygwin might not have env, but 1.1 does
if env CLASSPATH="$PTII/config" "$JAVA" MajorOSName > /dev/null; then
# Run it again and get the results. We get just the first word: Windows, Linux, Mac etc.
MAJOR_OS_NAME=`CLASSPATH="$PTII/config" "$JAVA" MajorOSName | awk '{print $1}'`
PT_MSG_RESULT($MAJOR_OS_NAME)
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVA 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)]);
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
PT_MSG_STATUS([using '${MATLAB_LIBDIR}' for Matlab's engine libraries])
if test $MATLAB_USE_MSVC = "yes"; then
AC_MSG_CHECKING([for Microsoft Visual C cl])
AC_PATH_PROG(PTMATLAB_CC, cl)
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
AC_MSG_WARN([Failed to find cl])
AC_PATH_PROG(PTMATLAB_CC, gcc)
if test "${PTMATLAB_CC:-none}" != "none"; then
PTMATLAB_DIR=matlab
else
AC_MSG_WARN([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.]);
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}\" ${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}\" ${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
AC_MSG_WARN([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]);
else
PTMATLAB_DIR=matlab
fi
fi
fi
fi
fi
fi
fi
if test -z "$PTMATLAB_DIR"; then
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
PT_MSG_STATUS([$PROTOBUF_USER_DIR is not present, so we need not find ProtoBuf.])
else
AC_MSG_CHECKING([for Protocol Buffers (ProtoBuf)])
if test -f "$PTII/lib/protobuf-java-2.4.1.jar"; then
PT_MSG_RESULT($PTII/lib/protobuf-java-2.4.1.jar)
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
AC_MSG_WARN([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.])
updateExcludes "ptolemy/domains/metroII/"
fi
fi
#--------------------------------------------------------------------
# Ptango is the Ptolemy Internet of Things project
# See http://chess.eecs.berkeley.edu/ptango
#--------------------------------------------------------------------
# PTANGO_DIR is set to ptango if ptango is found.
PTANGO_DIR=
# PTXMPP_DIR is set to xmpp if smack.jar and smackx.jar are found. See org/ptolemy/ptango/makefile
PTXMPP_DIR=
# We only enable Ptango if $PTANGO_USER_DIR is present
PTANGO_USER_DIR="org/ptolemy/ptango"
if test ! -d "$PTANGO_USER_DIR"; then
PT_MSG_STATUS([$PTANGO_USER_DIR is not present])
else
# We checked for Jetty above.
if test -f "$PTJETTY_JAR"; then
# We checked for Servlet above.
if test -f "$PTSERVLET_JAR" -a -f "$PTSMACK_JAR" -a -f "$PTSMACKX_JAR"; then
PTANGO_DIR=ptango
PTXMPP_DIR=xmpp
# PTANGO_PACKAGES is used in ptII/doc/makefile
PTANGO_PACKAGES=`find $PTANGO_USER_DIR -name "*.java" | grep -v /test | awk -F / '{printf("%s", $1); for (i = 2; i < NF; i++) printf(".%s", $i); printf("\n")}' | sort | uniq | awk '{printf("%s ", $0)}'`
fi
fi
if test "$PTANGO_DIR" = ""; then
AC_MSG_WARN([Failed to find the Jetty, Servlet, Smack or SmackX jar files necessary to compile ptango.
Ptango is the Ptolemy Internet of Things project.
For further instructions, see http://chess.eecs.berkeley.edu/ptango.])
else
PTANGO_JARS="${CLASSPATHSEPARATOR}${PTJETTY_JAR}${CLASSPATHSEPARATOR}${PTSERVLET_JAR}${CLASSPATHSEPARATOR}${PTSMACK_JAR}${CLASSPATHSEPARATOR}${PTSMACKX_JAR}"
fi
fi
if test -z "$PTANGO_JARS"; then
updateExcludes "org/ptolemy/ptango/"
fi
#--------------------------------------------------------------------
# ptserver is the Ptolemy server interface to the Android client
# http://chess.eecs.berkeley.edu
#
#--------------------------------------------------------------------
# PTSERVER_DIR is set to ptserver and used in
# $PTII/makefile if ptserver is found
PTSERVER_DIR=
# Jar files used by ptserver.
PTHESSIAN_JAR=
PTWMQTT_JAR=
# Jar files necessary for compilation of ptserver.
PTSERVER_JARS=
# We only need to look for Hessian if $PTSERVER_USER_DIR is present
PTSERVER_USER_DIR="$PTII/ptserver"
PTSERVER_USER_DIR2="$PTII/ptolemy/homer"
if test ! -d "$PTSERVER_USER_DIR" -o ! -d "$PTSERVER_USER_DIR2" -o -z "$PTHOMER_DIR"; then
PT_MSG_STATUS([$PTSERVER_USER_DIR or
$PTSERVER_USER_DIR2 are not present or
Homer was not found
so we need not find the Hessian, Jetty, Servlet and WMQTT interfaces for ptserver.])
else
# We checked for Jetty above.
if test -f "$PTJETTY_JAR"; then
# We checked for Servlet above.
if test -f "$PTSERVLET_JAR"; then
AC_MSG_CHECKING([for Hessian, used by ptserver ])
AC_ARG_WITH(hessian, [ --with-hessian=JAR use Hessian.jar from JAR,
defaults to \$PTII/ptserver/lib/hessian-4.0.7.jar],
PTHESSIAN_JAR=$withval,
PTHESSIAN_JAR=$PTII/ptserver/lib/hessian-4.0.7.jar)
if test -f "$PTHESSIAN_JAR"; then
PT_MSG_RESULT([$PTHESSIAN_JAR])
AC_MSG_CHECKING([for WMQTT, used by ptserver ])
AC_ARG_WITH(wmqtt, [ --with-wmqtt=JAR use wmqtt.jar from JAR,
defaults to \$PTII/ptserver/lib/wmqtt.jar],
PTWMQTT_JAR=$withval,
PTWMQTT_JAR=$PTII/ptserver/lib/wmqtt.jar)
if test -f "$PTWMQTT_JAR"; then
PT_MSG_RESULT([$PTWMQTT_JAR])
# Set to ptserver and used in
# $PTII/makefile
PTSERVER_DIR=ptserver
# PTSERVER_PACKAGES is used in ptII/doc/makefile
PTSERVER_PACKAGES=`find ptserver -name "*.java" | grep -v /test | awk -F / '{printf("%s", $1); for (i = 2; i < NF; i++) printf(".%s", $i); printf("\n")}' | sort | uniq | awk '{printf("%s ", $0)}'`
fi
fi
fi
fi
if test "$PTSERVER_DIR" = ""; then
AC_MSG_WARN([Failed to find the jar files necessary to compile ptserver.
The ptserver interface is used to support Ptolemy running on the Android.
For further instructions, see $PTII/ptserver/package.html] )
else
PTSERVER_JARS="${CLASSPATHSEPARATOR}${PTHESSIAN_JAR}${CLASSPATHSEPARATOR}${PTJETTY_JAR}${CLASSPATHSEPARATOR}${PTSERVLET_JAR}${CLASSPATHSEPARATOR}${PTWMQTT_JAR}"
fi
fi
if test -z "$PTSERVER_JARS"; then
updateExcludes "ptserver/"
updateExcludes "ptolemy/homer/"
else
updateClasspath "$PTHESSIAN_JAR"
updateClasspath "$PTWMQTT_JAR"
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
PT_MSG_STATUS([$PSDF_USER_DIR is not present,
so we need not find the mapss.jar.])
else
AC_MSG_CHECKING([for mapss.jar, used by the PSDF domain])
AC_ARG_WITH(mapss, [ --with-mapss=DIR use mapss.jar from DIR,
defaults to \$PTII/lib],
PSDF_DIR=$withval,
PSDF_DIR=$PTII/lib)
if test -f "$PSDF_DIR/mapss.jar"; then
PT_MSG_RESULT([$PSDF_DIR])
PTPSDF_DIR=psdf
else
AC_MSG_WARN([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.])
# 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
#--------------------------------------------------------------------
# PowerMock is used for testing and is CPL'd.
# PowerMock includes JUnit and EasyMock.
#--------------------------------------------------------------------
# PTPOWERMOCK_DIR is set to test and used in
# $PTII/ptdb/makefile
PTPOWERMOCK_DIR=
# PowerMock, used for testing, see http://code.google.com/p/powermock/
# Used in ptolemy/ptdb/test/makefile
PTPOWERMOCK_JARS=
# We only need to look for PowerMock if the ptdb/test directory is present
POWERMOCK_USER_DIR="$PTII/ptdb/test"
if test ! -d "$POWERMOCK_USER_DIR"; then
PT_MSG_STATUS([$POWERMOCK_USER_DIR is not present,
so we need not find PowerMock])
else
AC_MSG_CHECKING([for PowerMock test harness])
AC_ARG_WITH(ptpowermock, [ --with-powermock=DIR use PowerMock test harness from DIR,
defaults to \$PTII/vendors/misc/powermock-easymock-junit-1.3.8],
POWERMOCK_DIR=$withval,
POWERMOCK_DIR=$PTII/vendors/misc/powermock-easymock-junit-1.3.8)
if test -d "$POWERMOCK_DIR"; then
PT_MSG_RESULT([$POWERMOCK_DIR])
AC_MSG_CHECKING([for PowerMock jars])
jars="cglib-nodep- easymock- easymockclassextension- javassist- junit- objenesis- powermock-easymock-"
powermockjarpath=
for jar in $jars
do
if test "${PTVERBOSE:-none}" = "none"; then
$PT_ECHO $ECHO_N "."
else
$PT_ECHO $ECHO_N "$jar "
fi
# Do not use a leading * before ${jar}. If we do, then we don't find the easymock jar file.
jarpath=`$FIND "$POWERMOCK_DIR" -name "${jar}*.jar" | head -1`
if test -f "$jarpath"; then
# Keep track of the jars so we can use them while building
# with make.
powermockjarpath="$powermockjarpath$CLASSPATHSEPARATOR$jarpath"
updateClasspath "$jarpath"
else
AC_MSG_WARN([Failed to find $jar in $POWERMOCK_DIR: $jarpath])
powermockjarpath=
break
fi
done
if test ! -z eclipsejarpath; then
PT_MSG_RESULT( ok)
PTPOWERMOCK_JARS=$powermockjarpath
PTPOWERMOCK_DIR=test
fi
fi
if test "$PTPOWERMOCK_DIR" = ""; then
AC_MSG_WARN([Failed to find PowerMock.
Perhaps PowerMock was not installed?
You need not download these packages if you would like
to run the tests. To install PowerMock, go to
http://code.google.com/p/powermock/ and download
http://powermock.googlecode.com/files/powermock-easymock-junit-1.3.8.zip
(which contains PowerMock for EasyMock and JUnit) and unzip it in
$PTII/vendors/misc so that
$PTII/vendors/misc/powermock-easymock-junit-1.3.8 is created,
then rerun configure.
Other versions of PowerMock _may_ work, but are untested.])
fi
fi
if test -z "$PTPOWERMOCK_DIR"; then
if test -d ptdb; then
ptdbTestDirectories=`$FIND ptdb -name test`
for ptdbTestDirectory in $ptdbTestDirectories
do
updateExcludes "$ptdbTestDirectory/"
done
fi
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
PT_MSG_STATUS([$PTALON_USER_DIR is not present,
so we need not find anltr.jar.])
else
AC_MSG_CHECKING([for anltr.jar, used by the Ptalon])
AC_ARG_WITH(antlr, [ --with-antlr=DIR use antlr.jar from DIR,
defaults to \$PTII/ptolemy/actor/ptalon/antlr'],
ANTLR_DIR=$withval,
ANTLR_DIR=$PTII/ptolemy/actor/ptalon/antlr)
if test -f "$ANTLR_DIR/antlr.jar"; then
PT_MSG_RESULT([$ANTLR_DIR])
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
AC_MSG_WARN([Failed to find PTII/ptolemy/actor/ptalon/antlr/antlr.jar
If it is not present, you will not be able to use the
Ptalon.])
# Note that we don't substitute in the ${PTII} here
PTPTALON_DIR='${PTII}/ptolemy/actor/ptalon/antlr'
fi
if test ! "$HAS_GENERICS" = "yes"; then
AC_MSG_WARN([You are running Java $JVERSION, which does not
support generics. Thus, ptolemy/actor/ptalon will not compile.])
PTPTALON_DIR=
PTPTALON_PACKAGES=
fi
fi
if test -z "$PTPTALON_DIR"; then
updateExcludes "ptolemy/actor/ptalon/"
else
updateClasspath "$ANTLR_DIR/antlr.jar"
fi
#--------------------------------------------------------------------
# Test for quicktime
#--------------------------------------------------------------------
# PTQUICKTIME_DIR is set to quicktime and used in
# $PTII/ptolemy/domains/gr/lib/makefile if Quicktime for Java was found
PTQUICKTIME_DIR=
# Set to the location of the QTJava.zip file
QTJAVA_ZIP=
# We only need to look for Java3D if the gr domain is present
QUICKTIME_USER_DIR="$PTII/ptolemy/domains/gr/lib/quicktime"
if test ! -d "$QUICKTIME_USER_DIR"; then
PT_MSG_STATUS([$QUICKTIME_USER_DIR is not present,
so we need not find Quicktime for Java.])
else
AC_MSG_CHECKING([for Quicktime for Java])
# 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
# Use -classpath here because that is what we use when we compile
# In javac 1.4.2, -classpath seems to mean we ignore $CLASSPATH
if "$JAVAC" -classpath "$PTII" quickTimeTest.java ; then
PT_MSG_RESULT(Quicktime found in the default classpath.)
PTQUICKTIME_DIR=quicktime
else
if test "${MAJOR_OS_NAME:-none}" = "none"; then
if "$JAVAC" MajorOSName.java ; then
AC_MSG_CHECKING([the which major type of OS we are running under])
# Older versions of cygwin might not have env, but 1.1 does
if env CLASSPATH="$PTII/config" "$JAVA" MajorOSName > /dev/null; then
# Run it again and get the results
MAJOR_OS_NAME=`CLASSPATH="$PTII/config" "$JAVA" MajorOSName`
PT_MSG_RESULT($MAJOR_OS_NAME)
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVA MajorOSName' failed.
This means we cannot look for the Quicktime zip file in the likely places]);
fi
fi
fi
if test "${MAJOR_OS_NAME:-none}" = "Windows"; then
SAFE_PROGRAMFILES=`echo $PROGRAMFILES | sed -e 's@\\\@/@g'`
AC_MSG_WARN(['"$JAVAC" quickTime3dTest.java' failed, looking for
QTJava.zip in $SAFE_PROGRAMFILES/java/*/lib/ext/QTJava.zip'])
# Under Windows try to find the jar file
#c:/Program Files/Java/j2re1.4.1_02/lib/ext/QTJava.zip
QTJAVA_ZIP=`cd "$SAFE_PROGRAMFILES"; ls -tr java/*/lib/ext/QTJava.zip | head -1`
if test -z "$QTJAVA_ZIP" ; then
AC_MSG_WARN(['Did not find "$SAFE_PROGRAMFILES/java/*/lib/ext/QTJava.zip"'])
else
QTJAVA_ZIP="$SAFE_PROGRAMFILES/$QTJAVA_ZIP"
PT_MSG_RESULT([ ok, found '$QTJAVA_ZIP'])
AC_MSG_CHECKING([again for Quicktime for Java])
if "$JAVAC" -classpath "$QTJAVA_ZIP" quickTimeTest.java ; then
PT_MSG_RESULT($QTJAVA_ZIP)
PTQUICKTIME_DIR=quicktime
# PTQUICKTIME_PACKAGES is used in ptII/doc/makefile
PTQUICKTIME_PACKAGES=ptolemy.domains.gr.lib.quicktime
fi
fi
fi
if test -z "$PTQUICKTIME_DIR" ; then
AC_MSG_WARN(['"$JAVAC" quickTime3dTest.java' failed.
You may need to install QuickTime with the 'QuickTime For
Java' option from http://developer.apple.com/quicktime/qtjava/
During installation, choose 'custom' and then 'select all'.
This drops QTJava.zip into the lib/ext of all your installed JREs.
Then you have to copy this zip file to the jre/lib/ext directory
of your SDK and rerun configure.
If configure still fails, you may need to unzip the QTJava.zip
file and create a QTJava.jar file:
# unzip QTJava.zip
cd QTJava
jar -cf ../QTJava.jar .
QuickTime for Java is only needed if you want to build in
$QUICKTIME_USER_DIR,
otherwise the build will proceed fine without Quicktime for Java.])
fi
fi
cd "$startdir"
fi
if test -z "$PTQUICKTIME_DIR"; then
updateExcludes "ptolemy/domains/gr/lib/quicktime/"
else
if test ! -z "$QTJAVA_ZIP"; then
updateClasspath "$QTJAVA_ZIP"
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}${SOOT_DIR}/jasminclasses.jar${CLASSPATHSEPARATOR}${SOOT_DIR}/polyglotclasses-1.3.2.jar${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
PT_MSG_STATUS([$PTII/ptolemy/copernicus is not present,
so we need not find the Soot - a Java Optimization Framework.])
SOOT_DIR='${PTII}/lib'
else
AC_MSG_CHECKING([for soot directory])
AC_ARG_WITH(soot, [ --with-soot=DIR use SOOT from DIR,
defaults to \$PTII/lib],
SOOT_DIR=$withval,
SOOT_DIR=$PTII/lib)
if test -d "$SOOT_DIR"; then
PT_MSG_RESULT([$SOOT_DIR])
AC_MSG_CHECKING([for \$SOOT_DIR/sootclasses.jar])
if test -f "$SOOT_DIR/sootclasses.jar"; then
PT_MSG_RESULT([ok])
AC_MSG_CHECKING([for \$SOOT_DIR/jasminclasses.jar])
if test -f "$SOOT_DIR/jasminclasses.jar"; then
PT_MSG_RESULT([ok])
fi
AC_MSG_CHECKING([for \$SOOT_DIR/polyglotclasses-1.3.2.jar])
if test -f "$SOOT_DIR/polyglotclasses-1.3.2.jar"; then
PT_MSG_RESULT([ok])
fi
PT_MSG_STATUS([$SOOT_CLASSES])
else
SOOT_CLASSES_FOUND=no
fi
# else
# We could look in other places . . .
fi
if test "$SOOT_CLASSES_FOUND" = "no"; then
AC_MSG_WARN([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/])
# 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
AC_MSG_CHECKING([for rt.jar by compiling config/SystemJar.java])
AC_ARG_WITH(javasystemjar, [ --with-javasystemjar=DIR use rt.lib from DIR,
defaults to JRE java.home property with lib/rt.jar appended ],
JAVA_SYSTEM_JAR=$withval,
JAVA_SYSTEM_JAR='$(PTJAVA_HOME)/lib/rt.jar')
startdir=$PTII
cd "$srcdir/config"
if "$JAVAC" SystemJar.java ; then
PT_MSG_RESULT(SystemJar.java compiled)
AC_MSG_CHECKING([the location or rt.jar])
if env CLASSPATH="$PTII/config" "$JAVA" SystemJar > /dev/null; then
# Run it again and get the results
JAVA_SYSTEM_JAR=`CLASSPATH="$PTII/config" "$JAVA" SystemJar`
PT_MSG_RESULT('$JAVA_SYSTEM_JAR')
else
AC_MSG_WARN(['CLASSPATH="$PTII/config" "$JAVA" SystemJar failed.
Classes that use Soot will compile, but will fail to run.'])
fi
else
AC_MSG_WARN(['cd "$srcdir/config"; "$JAVAC" SystemJar.java failed.
Classes that use Soot will compile, but will fail to run.'])
fi
cd "$startdir"
fi
if test -z "$PTCOPERNICUS_DIR"; then
updateExcludes "ptolemy/copernicus/"
else
updateClasspath "$SOOT_DIR/sootclasses.jar"
updateClasspath "$SOOT_DIR/polyglotclasses-1.3.2.jar"
updateClasspath "$SOOT_DIR/jasminclasses.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-5.1.6-bin.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
PT_MSG_STATUS([$SPACE_USER_DIR and $DATABASE_USER_DIR
are not present, so we need not find the Mysql jar and Oracle ojdbc6.jar.])
MYSQL_JAR=
ORACLE_OJDBC_JAR=
else
MYSQL_TARGET_JAR=mysql-connector-java-5.1.6-bin.jar
AC_MSG_CHECKING([for mysql jar, used by the database actors])
AC_ARG_WITH(mysql, [ --with-mysql=/path/to/mysql.jar path to mysql.jar
defaults to \$PTII/ptolemy/actor/lib/database/$MYSQL_TARGET_JAR],
MYSQL_JAR=$withval,
MYSQL_JAR=$PTII/ptolemy/actor/lib/database/$MYSQL_TARGET_JAR)
if test -f "$MYSQL_JAR"; then
PT_MSG_RESULT([$MYSQL_JAR])
fi
OJDBC_TARGET_JAR=ojdbc6.jar
if test "$JAVA1_6_OR_LATER" != "yes"; then
OJDBC_TARGET_JAR=ojdbc5.jar
fi
AC_MSG_CHECKING([for ojdbc.jar])
AC_ARG_WITH(ojdbc, [ --with-ojdbc=/path/to/ojdbcN.jar path to ojdbc.jar
defaults to \$PTII/ptolemy/actor/lib/database/ojdbc6.jar or ojdbc5.jar $OJDBC_TARGET_JAR],
ORACLE_OJDBC_JAR=$withval,
ORACLE_OJDBC_JAR=$PTII/ptolemy/actor/lib/database/$OJDBC_TARGET_JAR)
if test -f "$ORACLE_OJDBC_JAR"; then
PT_MSG_RESULT([$ORACLE_OJDBC_JAR])
else
AC_MSG_WARN([$OJDBC_TARGET_JAR not found,
but only necessary to use database actors with Oracle.])
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
AC_MSG_WARN([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.])
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
#--------------------------------------------------------------------
# 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
PT_MSG_STATUS([$PDFRENDERER_USER_DIR is not present,
so we need not find PDFRenderer.])
else
AC_MSG_CHECKING([for PDFRenderer])
AC_ARG_WITH(pdfrenderer, [ --with-pdfrenderer=PDFRENDERER_JAR use PDFRenderer PDFRENDERER_JAR
defaults to \$PTII/lib/PDFRenderer.jar],
PTPDFRENDERER_JAR=$withval,
PTPDFRENDERER_JAR=$PTII/lib/PDFRenderer.jar)
if test -f "$PTPDFRENDERER_JAR"; then
PT_MSG_RESULT([$PTPDFRENDERER_JAR])
PTPDFRENDERER_DIR=pdfrenderer
updateClasspath "$PTPDFRENDERER_JAR"
fi
if test "$PTPDFRENDERER_DIR" = ""; then
AC_MSG_WARN([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/])
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
PT_MSG_STATUS([$PTII/diva/util/java2d/svg is not present,
so we need not find Batik SVG.])
else
AC_MSG_CHECKING([for Batik SVG])
AC_ARG_WITH(batikjar, [ --with-batikjar=BATIK_JAR use Batik jar BATIK_JAR,
defaults to \$KEPLER/lib/jar/batik-all-1.6.jar],
PTSVG_JAR=$withval,
PTSVG_JAR=$KEPLER/lib/jar/batik-all-1.6.jar)
if test -f "$PTSVG_JAR"; then
PT_MSG_RESULT([$PTSVG_JAR])
PTSVG_DIR=svg
updateClasspath "$PTSVG_JAR"
fi
if test "$PTSVG_DIR" = ""; then
AC_MSG_WARN([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/])
PTSVG_JAR=
fi
fi
if test -z "$PTSVG_DIR"; then
updateExcludes "diva/util/java2d/svg/"
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
PT_MSG_STATUS([$PTII/ptolemy/apps/tini is not present,
so we need not find the Dallas Semiconductor tini.])
TINI_DIR='${PTII}/vendors/dalsemi/tini'
TINI_CLASSES='${TINI_DIR}/bin/tini.jar'
else
AC_MSG_CHECKING([for tini directory])
AC_ARG_WITH(tini, [ --with-tini=DIR use TINI from DIR,
defaults to \$PTII/vendors/dalsemi/tini],
TINI_DIR=$withval,
TINI_DIR=$PTII/vendors/dalsemi/tini)
if test -d "$TINI_DIR"; then
PT_MSG_RESULT([$TINI_DIR])
AC_MSG_CHECKING([for \$TINI_DIR/bin/tini.jar])
if test -f "$TINI_DIR/bin/tini.jar"; then
PT_MSG_RESULT([$TINI_DIR/bin/tini.jar])
TINI_CLASSES='${TINI_DIR}/bin/tini.jar'
else
TINI_CLASSES=no
fi
PT_MSG_RESULT([$TINI_CLASSES])
fi
if test "$TINI_CLASSES" = "no"; then
AC_MSG_WARN([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])
# 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
PT_MSG_STATUS([$PTINYOS_DIR is not present
so we need not set up for TinyOS.])
# Nothing to exclude
# updateExcludes "ptolemy/domains/nc/"
else
AC_MSG_CHECKING([the for TinyOS])
if test -z "$TOSROOT"; then
AC_MSG_WARN([\$TOSROOT is not set. It must be set to use PtinyOS.])
fi
if test ! -d "$TOSROOT"; then
AC_MSG_WARN([\$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.])
else
PT_MSG_RESULT([$TOSROOT])
# Use changequote to protect the square brackets in sed
changequote(<<, >>)dnl
TOSROOT_NO_CYGDRIVE=`echo "$TOSROOT" | sed 's@^/cygdrive/\([a-zA-Z]\)/@\1:/@'`
changequote([, ])dnl
AC_MSG_CHECKING([for TOSDIR directory])
if test ! -d "$TOSDIR"; then
AC_MSG_WARN([\$TOSDIR is set to '$TOSDIR',
but there is no directory by that name.
For details, see $PTII/ptolemy/domains/ptinyos/README.txt.])
else
PT_MSG_RESULT([$TOSDIR])
# Use changequote to protect the square brackets in sed
changequote(<<, >>)dnl
TOSDIR_NO_CYGDRIVE=`echo "$TOSDIR" | sed 's@^/cygdrive/\([a-zA-Z]\)/@\1:/@'`
changequote([, ])dnl
fi
AC_MSG_CHECKING([for PTINYOS_MOMLROOT])
if test -z "$PTINYOS_MOMLROOT"; then
AC_MSG_WARN([\$PTINYOS_MOMLROOT is not set.
For details, see $PTII/ptolemy/domains/ptinyos/README.txt.])
else
PT_MSG_RESULT($PTINYOS_MOMLROOT)
if test ! -d "$PTINYOS_MOMLROOT"; then
# Try to make the directory
mkdir -p "$PTINYOS_MOMLROOT"
fi
AC_MSG_CHECKING([for PTINYOS_MOMLROOT directory])
if test ! -d "$PTINYOS_MOMLROOT"; then
AC_MSG_WARN([\$PTINYOS_MOMLROOT is set to '$PTINYOS_MOMLROOT',
but there is no directory by that name.
For details, see $PTII/ptolemy/domains/ptinyos/README.txt.])
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 classpat
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
AC_MSG_WARN([\$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.])
fi
else
AC_MSG_WARN([\$PTINYOS_MOMLROOT_NO_CYGDRIVE does not exist])
fi
PT_MSG_RESULT([$PTINYOS_MOMLROOT])
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
AC_MSG_WARN([\$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.])
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
PT_MSG_STATUS([$PTII/ptolemy/domains/giotto is not present,
so we need not find the Giotto SDK.])
GIOTTO_DIR='${PTII}/vendors/giotto'
GIOTTO_CLASSES='${GIOTTO_DIR}/gdk.jar'
else
AC_MSG_CHECKING([for giotto directory])
AC_ARG_WITH(giotto, [ --with-giotto=DIR use GiottoSDF from DIR,
defaults to \$PTII/vendors/giotto],
GIOTTO_DIR=$withval,
GIOTTO_DIR=$PTII/vendors/giotto)
GIOTTO_CLASSES=no
if test -d "$GIOTTO_DIR"; then
PT_MSG_RESULT([$GIOTTO_DIR])
AC_MSG_CHECKING([for \$GIOTTO_DIR/gdk.jar])
if test -f "$GIOTTO_DIR/gdk.jar"; then
PT_MSG_RESULT([$GIOTTO_DIR/gdk.jar])
GIOTTO_CLASSES='${GIOTTO_DIR}/gdk.jar'
else
GIOTTO_CLASSES=no
fi
fi
if test "$GIOTTO_CLASSES" = "no"; then
AC_MSG_WARN([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 http://www-cad.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/])
# 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 actor.lib.vertx
PTVERTX_JARS=
# Set to vertx if the Vertx jars are found
PTVERTX_DIR=
# Set to ptolemy.actor.lib.vertx and used in $PTII/doc/makefile if the Vertx jars are found
PTVERTX_PACKAGES=
# We only need to look for the Vertx jar files if $PTVERTX_USER_DIR is present
PTVERTX_USER_DIR="$PTII/ptolemy/actor/lib/vertx"
if test ! -d "$PTVERTX_USER_DIR"; then
PT_MSG_STATUS([$PTVERTX_USER_DIR is not present,
so we need not find the Vertx application platform interface.])
else
# PRE_JDK18 is set above.
if test "$PRE_JDK18" = "yes"; then
AC_MSG_WARN([Vertx requires Java 1.8 or later, you are running $JVERSION.
Vertx is the application platform interface used in actor.lib.vertx
To use Vertx, choose a Java 1.8 or later JVM and rerun configure.])
else
AC_MSG_CHECKING([for the Vertx application platform interface. ])
AC_ARG_WITH(oscp5, [ --with-vertx=LIB use vertx jars from JAR,
defaults to \$PTII/lib],
PTVERTX_JAR_DIR=$withval,
PTVERTX_JAR_DIR=$PTII/lib)
if test -d "$PTVERTX_JAR_DIR"; then
PTVERTX_DIR=vertx
# Keep these alphabetic
jars="hazelcast-*.jar jackson-annotations-*.jar jackson-core-*.jar jackson-databind-*.jar java-xmlhttprequest-*.jar netty-all-*.jar vertx-core-*.jar vertx-hazelcast-*.jar vertx-platform-*.jar"
for jar in $jars
do
file=`find "$PTVERTX_JAR_DIR" -name "$jar"`
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
AC_MSG_WARN([Failed to the Vertx file $jar in $PTVERTX_JAR_DIR.])
PTVERTX_DIR=
break;
fi
done
fi
if test ! -z "$PTVERTX_DIR"; then
PT_MSG_RESULT([$PTVERTX_JARS])
PTVERTX_PACKAGES=ptolemy.actor.lib.vertx
fi
fi
fi
if test -z "$PTVERTX_DIR"; then
updateExcludes "ptolemy/actor/lib/vertx/"
if test -d "$PTVERTX_USER_DIR"; then
AC_MSG_WARN([Failed to find the the Vertx application platform interface jar files,
or a version of Java before 1.8 was found
so $PTVERTX_USER_DIR will not be compiled.
Vertx consists of a number of jar files that are typically in $PTII/lib.])
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
PT_MSG_STATUS([$PTII/ptolemy/apps/kvm is not present,
so we need not find the PalmOS waba.])
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
AC_MSG_CHECKING([for waba directory])
AC_ARG_WITH(waba, [ --with-waba=DIR use PalmOS WABA from DIR,
defaults to \$PTII/vendors/misc/waba/wabasdk],
WABA_DIR=$withval,
WABA_DIR=$PTII/vendors/misc/waba/wabasdk)
if test -d "$WABA_DIR"; then
PT_MSG_RESULT([$WABA_DIR])
AC_MSG_CHECKING([for \$WABA_DIR/classes])
if test -d "$WABA_DIR/classes"; then
WABA_CLASSES='$(WABA_DIR)/classes'
PT_MSG_RESULT([$WABA_CLASSES])
else
WABA_CLASSES=no
fi
else
PT_MSG_RESULT([Not found in $WABA_DIR])
AC_MSG_CHECKING([for waba directory in /waba])
# Likely place for waba under windows
WABA_DIR=/waba/wabasdk
if test -d "$WABA_DIR"; then
PT_MSG_RESULT([$WABA_DIR])
AC_MSG_CHECKING([for \$WABA_DIR/classes])
if test -d "$WABA_DIR/classes"; then
WABA_CLASSES='$(WABA_DIR)/classes'
PT_MSG_RESULT([$WABA_CLASSES])
else
WABA_CLASSES=no
fi
else
WABA_CLASSES=no
fi
fi
if test "$WABA_CLASSES" = "no"; then
AC_MSG_WARN([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])
# 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
#--------------------------------------------------------------------
# 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
PT_MSG_STATUS([$LIBEXPAT_USER_DIR is not present,
so we need not find libexpat.])
else
# Cygwin gcc can be used to compile files that do not link
# with Java, so we don't need mingw here
AC_PATH_PROG(PTCC, gcc)
if test "${PTCC:-none}" = "none"; then
AC_MSG_WARN([Failed to find gcc])
AC_PATH_PROG(PTCC, cc)
if test "${PTCC:-none}" != "none"; then
PT_MSG_RESULT([$PTCC])
else
AC_MSG_WARN([Failed to find gcc or cc, so we will
not be able use LIBEXPAT in $LIBEXPAT_USER_DIR]);
fi
fi
if test "${PTCC:-none}" != "none"; then
AC_MSG_CHECKING([for libexpat])
# FIXME: This will not work if $PTII has spaces
dirs="$PTII/vendors/libexpat /usr/local/lib /usr/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
PT_MSG_RESULT([$libexpat}])
LIBEXPAT_LIB_DIR=`dirname $libexpat`
break;
fi
fi
done
if test ! -d "$LIBEXPAT_LIB_DIR"; then
AC_MSG_WARN([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.])
fi
fi
AC_MSG_CHECKING([for expat.h])
AC_ARG_WITH(expat-include, [ --with-expat-include=DIR use expat.h from DIR
defaults to /usr/include],
LIBEXPAT_INCLUDE_DIR=$withval,
LIBEXPAT_INCLUDE_DIR=/usr/include)
if test -f "$LIBEXPAT_INCLUDE_DIR/expat.h"; then
PT_MSG_RESULT([$LIBEXPAT_INCLUDE_DIR/expat.h])
else
# FIXME: This will not work if $PTII has spaces
dirs="$PTII/vendors/libexpat /usr/local/include /usr/include"
for dir in $dirs
do
if test -f "$dir/expat.h"; then
LIBEXPAT_INCLUDE_DIR=$dir
PT_MSG_RESULT([$LIBEXPAT_INCLUDE_DIR/expat.h])
fi
done
if test ! -f "$LIBEXPAT_INCLUDE_DIR/expat.h"; then
AC_MSG_WARN([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.])
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
AC_MSG_WARN([Failed to find boost/numeric/odeint.hpp, so FMI ++
will not be compiled. FMI++ is an extension of the Funcional Mockup Interface, see
http://sourceforge.net/p/fmipp/wiki/Home/])
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@@@g' | sed 's@/@.@g' | awk '{for (i=1;i <= NF; i++) { if ($i !~ /\*\*/) {printf("%s*,", $i)}}}'`
# Keep these substitutions alphabetical, with a description
# Paths to always exclude in Ant's build.xml
AC_SUBST(ANT_ALWAYS_EXCLUDE)
# Jar files to include in Ant's build.xml
AC_SUBST(ANT_CLASSPATH)
# Paths to exclude in Ant's build.xml
AC_SUBST(ANT_EXCLUDE)
# Paths of tests to exclude in Ant's build.xml
AC_SUBST(ANT_EXCLUDE_TESTS)
# Packages to exclude from Ant targets that call javadoc
AC_SUBST(ANT_JAVADOC_EXCLUDEPACKAGENAMES)
# Variables used in build.xml by Ant to run Mav
AC_SUBST(ANT_MAVEN_ARTIFACT)
AC_SUBST(ANT_MAVEN_SUBPROJECTS)
AC_SUBST(ANT_MAVEN_BUILD_WEBSENSOR)
AC_SUBST(ANT_WEBSENSOR_FILESET)
AC_SUBST(ANT_WEBSENSOR_SOURCEPATH)
AC_SUBST(ANT_WEBSENSOR_SRC)
# Path of directories that contain source, used by the Ant's build rule.
AC_SUBST(ANT_SRC)
# Directory that contains the Caltrop jar file ptCal.jar
# used by bin/ptinvoke.in
AC_SUBST(CALTROP_DIR)
# The directory that contains the Checkstyle jar file. Used in build.xml.in.
AC_SUBST(CHECKSTYLE_DIR)
# The Checkstyle jar file, used for code coverage. Used in build.xml.in.
AC_SUBST(CHECKSTYLE_JAR)
# Directory that contains chic.jar.
# Chic is a modular verifier for behavioral compatibility checking of
# software and hardware components.
# Used in bin/ptinvoke.in
AC_SUBST(CHIC_DIR)
# Separator in CLASSPATH, For Unix, this should be :, for Cygwin use ;
AC_SUBST(CLASSPATHSEPARATOR)
# 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
AC_SUBST(COLT_DIR)
# The directory that contains the Cobertura jar file. Used in build.xml.in.
AC_SUBST(COBERTURA_DIR)
# The Cobertura jar file, used for code coverage. Used in build.xml.in.
AC_SUBST(COBERTURA_JAR)
# Directory that contains the CaffeineMark Java Benchmark kit
# used by C code generation in copernicus/c
AC_SUBST(CMKIT_DIR)
# Text for .classpath. Under all platforms other than Mac OS X, this will be:
#
# Under Mac OS X, the plug-ins will not work in the project, see
# http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Mac#EclipseProblems
AC_SUBST(ECLIPSE_CLASSPATHENTRY_PDE_REQUIREDPLUGINS)
# Location of Eclipse, which is used by ptolemy/backtracking
AC_SUBST(ECLIPSE_DIR)
# Location of GNU Awk, used by maven
AC_SUBST(GAWK)
# The Guava Jar file, used by Kieler which is used to layout models. See
# http://code.google.com/p/guava-libraries/
AC_SUBST(GUAVA_JAR)
# Directory that contains gc.h, used in copernicus/c
AC_SUBST(GC_INCLUDE_DIR)
# 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/
AC_SUBST(GC_LD_DIRECTIVE)
# Eclipse .classpath excluding src values
# of the form "vendors/|ptolemy/matlab/"
AC_SUBST(ECLIPSE_EXCLUDING_SRC)
# Eclipse .classpath lib elements of the format
#
AC_SUBST(ECLIPSE_CLASSPATHENTRY_LIBS)
# ImageJ jar file
AC_SUBST(IMAGEJ_JAR)
# Jar files for Java Advanced Imaging (JAI) used by ptolemy/actor/lib/jai/makefile
AC_SUBST(JAI_JARS)
# The jar command
AC_SUBST(JAR)
# Command to run that indexes a jar file named tmp.jar
# Usually it looks like '"$(JAR)" -i $@'
AC_SUBST(JAR_INDEX)
# The jarsigner command is used to create signed jar files for Webstart JNLP files
AC_SUBST(JARSIGNER)
# 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
AC_SUBST(JAVA_SYSTEM_JAR)
# 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.
AC_SUBST(JAVA3D_JARS)
# javac binary
AC_SUBST(JAVAC)
# javacc binary
AC_SUBST(JAVACC)
# javacc command line arguments, -STATIC=false if javacc is 5.0 or later.
AC_SUBST(JAVACC_OPTIONS)
# Directory that contains JavaCC, which is used in ptolemy/data/expr
AC_SUBST(JAVACC_DIR)
# The JavaCV jar file, used in actor/lib/opencv/javacv for computer vision
AC_SUBST(JAVACV_JAR)
# The javadoc binary, used to create html documentation of java classes.
AC_SUBST(JAVADOC)
# The javah binary, used by jni for matlab.
AC_SUBST(JAVAH)
# The javaws command is used to test Webstart JNLP files.
AC_SUBST(JAVAWS)
# 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
AC_SUBST(JAVAX_CRYPTO_JAR)
# If we are running under JDK1.4, then set JDOCBREAKITERATOR = -breakiterator
AC_SUBST(JDOCBREAKITERATOR)
# Ptalon uses generics, if we are running JDK1.5,
# then JDOCSOURCEFLAGS = -source 1.5
AC_SUBST(JDOCSOURCEFLAGS)
# If we can compile in doc/doclets, we set JDOCTAG appropriately
# and use JDOCTAG in doc/makefile
AC_SUBST(JDOCTAG)
# If we can compile in doc/doclets, we set JDOCTAGLET appropriately
# and use JDOCTAGLET in doc/makefile
AC_SUBST(JDOCTAGLET)
# Jini home directory, see https://jini.dev.java.net/
AC_SUBST(JINI_DIR)
# If Jini is present, the set to yes, otherwise, set to no
AC_SUBST(JINI_PRESENT)
# Jar file that contains Joystick interface,
# see http://sourceforge.net/projects/javajoystick/
AC_SUBST(JOYSTICK_JAR)
# jtclsh script, used for test suites
AC_SUBST(JTCLSH)
# jjtree binary
AC_SUBST(JJTREE)
# jjtree command line arguments, -STATIC=false if javacc is 5.0 or later.
AC_SUBST(JJTREE_OPTIONS)
# JDK Version determined by running confTest.class and getting java.version
AC_SUBST(JVERSION)
# The Major and Minor version of the JDK. 1.6, 1.8 etc. Used by ant in build.xml.in.
AC_SUBST(JVERSION_TARGET)
# Jar files for Java Media Framework (JMF) used by ptolemy/actor/lib/makefile
AC_SUBST(JMF_JARS)
# Directory that contains JModelica.
AC_SUBST(JMODELICA_HOME)
# Java Native Access jar file (jna.jar). See
# https://jna.dev.java.net/. Used in ptolemy/actor/lib/opencv
AC_SUBST(JNA_JAR)
# jode.jar used in bin/ptinvoke to start up Jode, the .class disassembler
AC_SUBST(JODE_CLASSES)
# Used in many test/makefiles
AC_SUBST(JUNIT_JARS)
# Jython home directory that contains jython.jar, see http://www.jython.org
AC_SUBST(JYTHON_DIR)
# keytool command used to generate a certificate for testing actor.lib.security actors
AC_SUBST(KEYTOOL)
# The Kieler jar file, used to layout models
AC_SUBST(KIELER_JAR)
# kvm/tools/classes.jar file used by the PalmOS KVM
AC_SUBST(KVM_CLASSES)
# Directory that contains the kvm used by PalmOS
AC_SUBST(KVM_DIR)
# Set to the location of the lejos installation, usually in
# $PTII/vendors/lejos
AC_SUBST(LEJOS_DIR)
# Set to the directory that contains expat.h and used in $PTII/lbnl/lib/util
AC_SUBST(LIBEXPAT_INCLUDE_DIR)
# Set to the directory that contains libexpat.{so,jnilib,dll} and used in $PTII/lbnl/lib/util
AC_SUBST(LIBEXPAT_LIB_DIR)
# 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
AC_SUBST(MAJOR_OS_NAME)
# Set to the location of the matlab installation, e.g. /matlabr11
# This directory usually contains bin,...
AC_SUBST(MATLAB_DIR)
# Set the location of Matlab's engine libraries
AC_SUBST(MATLAB_LIBDIR)
# Set the location of Matlab's engine libraries (64bit)
AC_SUBST(MATLAB_64LIBDIR)
# Mysql Java Database jar (mysql-connector-java-5.1.6-bin.jar),
# used by domains/space and actor/lib/database
AC_SUBST(MYSQL_JAR)
# Jar file for Open Computer Vision (OpenCV)
AC_SUBST(OPENCV_JAR)
# Oracle Java Database jar (ojdbc6.jar), used by domains/space
# and actor/lib/database
AC_SUBST(ORACLE_OJDBC_JAR)
# Set to $PTII/lib if $PTII/lib/mapss.jar was found and used
# in $PTII/bin/ptinvoke.in
AC_SUBST(PSDF_DIR)
# Set to ptango if jetty and javax.servlet jar files are found.
# Used in org/ptolemy/makefile.
AC_SUBST(PTANGO_DIR)
# Jar files for Ptango.
AC_SUBST(PTANGO_JARS)
# PTANGO_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTANGO_PACKAGES)
# Set to backtrack if Java 1.5 or later is present
AC_SUBST(PTBACKTRACK_DIR)
# Set to eclipse if Eclipse was found
AC_SUBST(PTBACKTRACK_ECLIPSE_DIR)
# Plugin Eclipse jar files, used by $PTII/doc
AC_SUBST(PTBACKTRACK_ECLIPSE_DOC_JARS)
# Eclipse jar files used by ptolemy/backtrack
AC_SUBST(PTBACKTRACK_ECLIPSE_JARS)
# Ptolemy II packages that use Eclipse
# PTBACKTRACK_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTBACKTRACK_ECLIPSE_PACKAGES)
# Set to the directory that contains boost/numeric/odeint.hpp
# and used in actor/lib/fmi/fmipp
AC_SUBST(PTBOOST_INCLUDE_DIR)
# Set to the BSH jar file and used to compile org/mlc
AC_SUBST(PTBSH_JAR)
# Set to mlc and used in $PTII/org/makefile if Java Bean Shell is found.
AC_SUBST(PTBSH_MLC_DIR)
# PTBSH_RUN_DIR is set to run and used in
# $PTII/ptolemy/actor/gui/makefile if bsh.jar was found.
AC_SUBST(PTBSH_RUN_DIR)
# Set to the packages that require bsh and used in $PTII/doc/makefile
AC_SUBST(PTBSH_PACKAGES)
# Set to caltrop and used in $PTII/ptolemy/makefile if Cal was found.
AC_SUBST(PTCALTROP_DIR)
# Set to gcc if gcc was found and used in $PTII/ptolemy/matlab/makefile.
AC_SUBST(PTCC)
# Set to mingw32-gcc or gcc and used in $PTII/ptolemy/matlab/makefile and jni
AC_SUBST(PTCCJNI)
# Set to chic and used in $PTII/ptolemy/makefile if chic was found.
AC_SUBST(PTCHIC_DIR)
# PTCM_DIR is set to cm and used in $PTII/ptolemy/copernicus/c/test/makefile
# if the CaffeineMark Java Benchmark kit is found
AC_SUBST(PTCM_DIR)
# Set to colt and used in $PTII/ptolemy/actor/lib/makefile if colt was found.
AC_SUBST(PTCOLT_DIR)
# Colt jar files. We ship $PTII/lib/ptcolt.jar, which is a subset
# of $PTII/vendors/misc/colt.jar
AC_SUBST(PTCOLT_JARS)
# Ptolemy II packages that use COLT
# PTCOLT_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTCOLT_PACKAGES)
# PTCOMM_DIR is set to comm and used in
# $PTII/ptolemy/actor/lib/makefile if the Java Communications API was found
#
AC_SUBST(PTCOMM_DIR)
# Ptolemy II packages that use the Java Serial Communication facility
# PTCOMM_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTCOMM_PACKAGES)
# Set to copernicus and used in $PTII/ptolemy/makefile if Soot was found
AC_SUBST(PTCOPERNICUS_DIR)
# PTCUNIT_DIR is set to test and used in
# ptolemy/cg/kernle/generic/program/procedural/c/type
# if CUnit is found
AC_SUBST(PTCUNIT_DIR)
# PTDATABASE_DIR is set to database and used in
# $PTII/ptolemy/actor/lib/makefile if ojdbc6.jar was found.
AC_SUBST(PTDATABASE_DIR)
# PTDATABASE_JNLP_JARS is set to the database jars that need to be signed
# and used in mk/jnlp.mk
AC_SUBST(PTDATABASE_JNLP_JARS)
# PTDATABASE_PACKAGES is set if ojdbc6.jar was found and
# used in ptII/doc/makefile
AC_SUBST(PTDATABASE_PACKAGES)
# PTDB_DIR is set to ptdb and used in
# $PTII/makefile if dbxml is found
AC_SUBST(PTDB_DIR)
# PTDB_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTDB_PACKAGES)
# PTDBXML_JARS includes dbxml.jar and db.xml and is used by $PTII/ptdb
AC_SUBST(PTDBXML_JARS)
# Directory that contains libdbxml-X.Y.{so,dll,dylib}. Used in $PTII/ptdb
AC_SUBST(PTDBXML_LIB)
# Set to distributed and used in
# $PTII/ptolemy/makefile if jini was found
AC_SUBST(PTDISTRIBUTED_DIR)
# Set to jini jar file and used
# $PTII/ptolemy/distributed/*/makefile if jini was found
AC_SUBST(PTDISTRIBUTED_JARS)
# Ptolemy II packages that use the distributed
# PTDISTRIBUTED_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTDISTRIBUTED_PACKAGES)
# PTDOCLETS_DIR is set to doclets and used in
# $PTII/doc if tools.jar can be found.
AC_SUBST(PTDOCLETS_DIR)
# PTEXCEL_DIR is set to excel and used in
# $PTII/ptolemy/actor/lib/makefile if jxl was found
AC_SUBST(PTEXCEL_DIR)
# PTEXCEL_PACKAGES is used in doc/makefile
AC_SUBST(PTEXCEL_PACKAGES)
# PTFMI_DIR is set to fmi if jna.jar was found
# $PTII/ptolemy/actor/lib/makefile uses PTFMI_DIR
AC_SUBST(PTFMI_DIR)
# PTFMI_PACKAGES is used in doc/makefile
AC_SUBST(PTFMI_PACKAGES)
# Set to fmipp and used in ptolemy/actor/lib/fmi/makefile if odeint.hpp is found.
AC_SUBST(PTFMIPP_DIR)
# PTFMIPP_PACKAGES is used in doc/makefile
AC_SUBST(PTFMIPP_PACKAGES)
# The G4LTL jar file, used for Import an FSMActor using LTL synthesis (G4LTL)
AC_SUBST(PTG4LTL_JAR)
# If the g4ltl.jar file is set, then PTG4LTL_DIR is set to g4ltl and used in vergil/actor/makefile.
AC_SUBST(PTG4LTL_DIR)
# Packages in Ptolemy that depend on g4ltl.jar
AC_SUBST(PTG4LTL_PACKAGES)
# PTGDP_DIR is set to fmi if jna.jar was found
# $PTII/ptolemy/actor/lib/makefile uses PTGDP_DIR
AC_SUBST(PTGDP_DIR)
# PTGDP_PACKAGES is used in doc/makefile
AC_SUBST(PTGDP_PACKAGES)
# Set to -I$PTII/mescal/include or -I/usr/local/include if gmp.h is found
# and used in $PTII/mescal/relsat
AC_SUBST(PTGMP_INCLUDE)
# 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
AC_SUBST(PTGMP_LD_FLAGS)
# Set to -L$PTII/mescal/lib or -L/usr/local/lib if the gmp libraries are found
# and used in $PTII/mescal/relsat
AC_SUBST(PTGMP_LIB)
# Name of the jar file that includes the GR domain if Java 3D was found.
# Used in domains/makefile.
AC_SUBST(PTGRDOMAIN_JAR)
# Ptolemy II packages that use the Java 3D facility
# PTGR_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTGR_PACKAGES)
# Set to hlacerti and used in $PTII/ptolemy/apps/makefile is lib/jcerti.jar is found
AC_SUBST(PTHLACERTI_DIR)
# Ptolemy II packages that use jcerti.
AC_SUBST(PTHLACERTI_PACKAGES)
# Set to homer and used in $PTII/ptolemy/makefile if the netbeans visual gui code is found.
AC_SUBST(PTHOMER_DIR)
# Netbeans Jar files necessary for compilation of homer
AC_SUBST(PTHOMER_JARS)
# Ptolemy II packages that use Netbeans gui code
AC_SUBST(PTHOMER_PACKAGES)
# Location of the the PTII directory
# $PTII/ptolemy/plot/ptplot.jnlp.in reads this
AC_SUBST(PTII)
# Set to itextpdf and used in
# $PTII/ptolemy/vergil/basic/export/makefile if iText.jar was found
AC_SUBST(PTITEXTPDF_DIR)
# iText PDF jar file. iText is from
# http://itextpdf.com
AC_SUBST(PTITEXTPDF_JAR)
# PTITEXTPDF_PACKAGES is used in ptII/doc/makefile if iTextjar is found
AC_SUBST(PTITEXTPDF_PACKAGES)
# Set to ptjacl and used in
# $PTII/ptolemy/actor/gui/makefile if ptjacl.jar was found
AC_SUBST(PTJACL_DIR)
# ptjacl.jar file, used to run the test suites
AC_SUBST(PTJACL_JAR)
# Set to jai and used in
# $PTII/ptolemy/actor/lib/makefile if Java Advanced Imaging was found
AC_SUBST(PTJAI_DIR)
# Ptolemy II packages that use Java Advanced Imaging
# PTJAI_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTJAI_PACKAGES)
# Set to javacv and used in
# $PTII/ptolemy/actor/lib/opencv/makefile if JavaCV was found
AC_SUBST(PTJAVACV_DIR)
# Ptolemy II packages that use JavaCV.
# PTJAVACV_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTJAVACV_PACKAGES)
# Location of the JDK
AC_SUBST(PTJAVA_DIR)
# Location of the JDK
AC_SUBST(PTJAVA_DIR_NO_CYGDRIVE)
# Value of java.home property, location of the JDK with /cygdrive/c/ converted to c:/
AC_SUBST(PTJAVA_HOME)
# Location of the JDK
AC_SUBST(PTJAVA32_DIR)
# Set to gr and used in
# $PTII/ptolemy/domains/makefile if Java 3D was found
AC_SUBST(PTJAVA3D_DIR)
# Set to mail and used in
# $PTII/ptolemy/actor/lib/makefile if JavaMail's javax.mail.jar was found.
AC_SUBST(PTJAVAMAIL_DIR)
# Java OpenGL (JavaMail) jar files. Used to compile the mail actors.
AC_SUBST(PTJAVAMAIL_JARS)
# Ptolemy II packages that use JavaMail framework.
# PTJMF_PACKAGES is used in ptII/doc/makefile.
AC_SUBST(PTJAVAMAIL_PACKAGES)
# Rhino JavaScript jar files used by ptolemy.actor.lib.js
AC_SUBST(PTJAVASCRIPT_JAR)
# Set to jsoup if jsoup is found and used in $PTII/ptolemy/actor/lib/js/makefile
AC_SUBST(PTJAVASCRIPT_DIR)
# Set to ptolemy.actor.lib.js and used int $PTII/doc/makefile if Rhino JavaScript is found.
AC_SUBST(PTJAVASCRIPT_PACKAGES)
# lib/jcerti.jar, used by ptolemy/apps/hlacerti
AC_SUBST(PTJCERTI_JAR)
# Jetty jar files used by Ptango and ptserver.
AC_SUBST(PTJETTY_JAR)
# Set to jmf if jmf.jar was found
AC_SUBST(PTJMF_DIR)
# Ptolemy II packages that use Java Media Framwork
# PTJMF_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTJMF_PACKAGES)
# PTJMODELICA_DIR is set to jmodelica if JModelica was found
# $PTII/ptolemy/actor/lib/fmi/fmus/makefile uses PTJMODELICA_DIR
AC_SUBST(PTJMODELICA_DIR)
# PTJMODELICA_PACKAGES is used in doc/makefile
AC_SUBST(PTJMODELICA_PACKAGES)
# JNI architecture, used to compile C files
AC_SUBST(PTJNI_ARCHITECTURE)
# set to jni include directory
AC_SUBST(PTJNI_INCLUDE)
# Set to -ldl for use by jni/launcher/makefile under Linux
AC_SUBST(PTJNI_DL_LIBRARY)
# JNI lib architecture, used to run jni/launcher
AC_SUBST(PTJNI_LIB_ARCHITECTURE)
# Flag to use with TinyOS under Cygwin (-mno-cygwin)
AC_SUBST(PTJNI_NO_CYGWIN)
# GCC shared flag. Usually -shared, except on the mac, where it is -dynamiclib
AC_SUBST(PTJNI_GCC_SHARED_FLAG)
# JNI shared library C compiler flag, under Solaris this would be -fPIC.
AC_SUBST(PTJNI_SHAREDLIBRARY_CFLAG)
# JNI shared library linker flag, under Solaris this would be -fPIC.
AC_SUBST(PTJNI_SHAREDLIBRARY_LDFLAG)
# JNI shared library prefix, under Solaris this would be lib.
AC_SUBST(PTJNI_SHAREDLIBRARY_PREFIX)
# JNI shared library suffix, under Windows this would be dll.
AC_SUBST(PTJNI_SHAREDLIBRARY_SUFFIX)
# JNI shared library suffix, under Mac OS X, this would by dylib
AC_SUBST(PTJNI_SHAREDLIBRARY_SUFFIX2)
# JNI libraries needed to link, such as -lcygwin (Used by Viptos)
AC_SUBST(PTJNI_LIBRARIES)
# Set to $PTII/vendors/jogl/* and used in ptinvoke.in under Mac OS X.
AC_SUBST(PTJOGL_DIR)
# Set to joystick if Joystick.jar was found
AC_SUBST(PTJOYSTICK_DIR)
# Ptolemy II packages that use the Java Joystick facilty
# PTJOYSTICK_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTJOYSTICK_PACKAGES)
# Set to json and used in $PTII/org/makefile if the JavaScript Object Notation was found.
AC_SUBST(PTJSON_DIR)
# Set to json.org and used in $PTII/doc/makefile if JSON was found.
AC_SUBST(PTJSON_PACKAGES)
# JSoup jar files used by export html facility
AC_SUBST(PTJSOUP_JAR)
# Set to jsoup if jsoup is found and used in $PTII/ptolemy/vergil/basic/export/makefile
AC_SUBST(PTJSOUP_DIR)
# Set to ptolemy.vergil.basic.export.html.jsoup and used int $PTII/doc/makefile if jsoup is found.
AC_SUBST(PTJSOUP_PACKAGES)
# Set to junit and used in $PTII/util/testsuite/makefile if junit was found.
AC_SUBST(PTJUNIT_DIR)
# PTJUNIT_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTJUNIT_PACKAGES)
# Used in ptolemy/actor/lib/excel/makefile
AC_SUBST(PTJXL_JAR)
# Set to python if jython.jar was found
AC_SUBST(PTJYTHON_DIR)
# Ptolemy II packages that use Jython
# PTJYTHON_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTJYTHON_PACKAGES)
# Set to kieler and used in
# $PTII/ptolemy/vergil/basic/layout/makefile if kieler was found
AC_SUBST(PTKIELER_DIR)
# Set to kvm and used in
# $PTII/ptolemy/apps/makefile if kvm was found
AC_SUBST(PTKVM_DIR)
# Set to lbnl and used in $PTII/makefile if libexpat was found.
AC_SUBST(PTLBNL_DIR)
# Set to CRoom if libexpat is found and used in lbnl/demo/makefile
AC_SUBST(PTLBNL_CROOM_DIR)
# Set to CRoom/CRoom.jar if libexpat is found and used in lbnl/demo/makefile
AC_SUBST(PTLBNL_CROOM_JAR)
# Set to the lbnl jars that need to be signed if libexpat was found
# and used in jnlp.mk and $PTII/doc/makefile.
AC_SUBST(PTLBNL_JARS)
# PTLBNL_PACKAGES is set to the packages in lbnl if libexpat was found and
# used in ptII/doc/makefile.
AC_SUBST(PTLBNL_PACKAGES)
# Set to lego and used in
# $PTII/ptolemy/apps/makefile if the Java Communications API was found
AC_SUBST(PTLEGO_DIR)
# Set to lejos and used in
# $PTII/ptolemy/apps/makefile if the Java Communications API was found
# and Legos was found
AC_SUBST(PTLEJOS_DIR)
# Set to util and used in $PTII/lbnl/lib/makefile if libexpat was found
AC_SUBST(PTLIBEXPAT_DIR)
# Set to gcc or cl and used in
# $PTII/ptolemy/matlab/makefile if the Matlab was found.
AC_SUBST(PTMATLAB_CC)
# Set to -m64 under Solaris if libs are in bin/sol64
# and used $PTII/ptolemy/matlab/makefile if the Matlab was found.
AC_SUBST(PTMATLAB_CC_FLAGS)
# Set to matlab and used in
# $PTII/ptolemy/makefile if the Matlab was found.
AC_SUBST(PTMATLAB_DIR)
# Set to the matlab jars that need to be signed if matlab was found.
# Used in jnlp.mk
AC_SUBST(PTMATLAB_JARS)
# Linker args for Matlab
# $PTII/ptolemy/matlab/makefile
AC_SUBST(PTMATLAB_LD_ARGS)
# Linker args for Matlab
# $PTII/ptolemy/matlab/makefile
AC_SUBST(PTMATLAB_64LD_ARGS)
# Extension for matlab .mex files, for example "mexmaci64"
AC_SUBST(PTMATLAB_MEXEXT)
# Used in $PTII/doc/makefile
AC_SUBST(PTMATLAB_PACKAGES)
# Set to mescal and used in $PTII/makefile
# if $PTII/mescal was found
AC_SUBST(PTMESCAL_DIR)
# PTMETROII_DIR is set to metroII if the ProtoBuf jar file was found
# $PTII/ptolemy/domains/makefile uses PTMETROII_DIR
AC_SUBST(PTMETROII_DIR)
# PTMETROII_PACKAGES is used in doc/makefile
AC_SUBST(PTMETROII_PACKAGES)
# OAuth Client jar file used by JavaScript Actor.
# Typically lib/org.apache.oltu.oauth2.client-1.0.1-SNAPSHOT.jar
AC_SUBST(PTOAUTHCLIENT_JAR)
# OAuth Client jar file used by JavaScript Actor.
# Typically lib/org.apache.oltu.oauth2.common-1.0.1-SNAPSHOT.jar
AC_SUBST(PTOAUTHCOMMON_JAR)
# Set to opencv and used in
# $PTII/ptolemy/actor/lib/makefile if OpenCV Open Computer Vision was found
AC_SUBST(PTOPENCV_DIR)
# Directory that contains cv.h
AC_SUBST(PTOPENCV_INCLUDE_DIR)
# Ptolemy II packages that use OpenCV
# PTOPENCV_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTOPENCV_PACKAGES)
# Open Sound Control/Processing.org jar file used by org.ptolemy.js
AC_SUBST(PTOSCP5_JAR)
# Set to osc if oscp5.jar is found
AC_SUBST(PTOSCP5_DIR)
# Set to org.ptolemy.osc and used int $PTII/doc/makefile if oscp5 is found
AC_SUBST(PTOSCP5_PACKAGES)
# Set to pdf and used in ptolemy/vergil/makefile if
# PDFRenderer.jar is found.
AC_SUBST(PTPDFRENDERER_DIR)
# Jar file used in ptolemy/vergil/pdf
AC_SUBST(PTPDFRENDERER_JAR)
# Set to psdf and used in $PTII/ptolemy/domains/makefile if
# $PTII/lib/mapss.jar was found
AC_SUBST(PTPSDF_DIR)
# PTSVG_DIR is set to svg and used in
# $PTII/diva/util/java2d/makefile if Batik SVG jar files were found
AC_SUBST(PTSVG_DIR)
# Jar file used by diva/util/java2d/svg/makefile
AC_SUBST(PTSVG_JAR)
# PTPOWERMOCK_DIR is set to test and used in
# $PTII/ptdb/makefile
AC_SUBST(PTPOWERMOCK_DIR)
# PowerMock, used for testing, see http://code.google.com/p/powermock/
# Used in ptolemy/ptdb/test/makefile
AC_SUBST(PTPOWERMOCK_JARS)
# Jar files used by the Image Processing library from http://processing.org
AC_SUBST(PTPROCESSING_JARS)
# The location of the protobuf jar file, typically $PTII/lib/protobuf-java-2.4.1.jar
AC_SUBST(PTPROTOBUF_JAR)
# PTPTALON_DIR is set to ptalon and used in
# $PTII/ptolemy/actor/makefile if antlr.jar was found.
AC_SUBST(PTPTALON_DIR)
# PTALON_PACKAGES is used in $PTII/doc/makefile
AC_SUBST(PTPTALON_PACKAGES)
# Directory that contains the antlr.jar file, used by ptalon
AC_SUBST(ANTLR_DIR)
# Set to quicktime and used in $PTII/ptolemy/domains/gr/lib/makefile if
# QuickTime for Java was found.
AC_SUBST(PTQUICKTIME_DIR)
# Ptolemy II packages that use the Quicktime facility
# PTQUICKTIME_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTQUICKTIME_PACKAGES)
# Ptolemy II packages that use the RXTX Java Serial Communication facility
# PTRXTX_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTRXTX_PACKAGES)
# PTSERVER_DIR is set to ptserver and used in
# $PTII/makefile if dbxml is found
AC_SUBST(PTSERVER_DIR)
# PTSERVER_PACKAGES is used in ptII/doc/makefile
AC_SUBST(PTSERVER_PACKAGES)
# PTSERVER_JARS includes hessian, jetty, servlet and mqtt jars and is used by $PTII/ptserver
AC_SUBST(PTSERVER_JARS)
# javax.servlet-api*.jar used by Ptango and ptserver.
AC_SUBST(PTSERVLET_JAR)
# socketio Jar used by the JavaScript actor $PTII/lib/socketio.jar The
# socketio.jar file is built by running "ant jar" after downloading
# source from here: https://github.com/Gottox/socket.io-java-client
AC_SUBST(PTSOCKETIO_JAR)
# PTSPACE_DIR is set to space and used in
# $PTII/ptolemy/domains/makefile if ojdbc6.jar was found.
AC_SUBST(PTSPACE_DIR)
# 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
AC_SUBST(PTSPACEDOMAIN_JAR)
# PTSPACEDOMAIN_PACKAGES is set if ojdbc6.jar was found and
# used in ptII/doc/makefile
AC_SUBST(PTSPACEDOMAIN_PACKAGES)
# Set to tini and used in
# $PTII/ptolemy/apps/makefile if TINI was found
AC_SUBST(PTTINI_DIR)
# PTTINYOS_DIR is set to ptinyos and used in
# $PTII/ptolemy/domains/makefile if TinyOS is found
AC_SUBST(PTTINYOS_DIR)
# Set to giotto and used in
# $PTII/ptolemy/apps/makefile if Giotto was found
AC_SUBST(PTGIOTTO_DIR)
# Set to quicktime and used in
# $PTII/ptolemy/domains/gr/lib/makefile if Quicktime for Java was found
AC_SUBST(PTQUICKTIME_DIR)
# Set to waba and used in
# $PTII/ptolemy/apps/makefile if Waba was found
AC_SUBST(PTWABA_DIR)
# PTXMPP_DIR is set to xmpp if smack.jar and smackx.jar are found. See org/ptolemy/ptango/makefile
AC_SUBST(PTXMPP_DIR)
# Location of the local $PTII directory as a file:/// URL
# This variable is used with the Java Network Launching Protocol files
AC_SUBST(PTII_LOCALURL)
# Set to the location of the QTJava.zip file
AC_SUBST(QTJAVA_ZIP)
# Jar file that contains RXTX Serial Port Interface
AC_SUBST(RXTX_JAR)
# If Rxtx is present, then set to yes, otherwise set to no
AC_SUBST(RXTX_PRESENT)
# tini/bin/tinclasses.jar file used Soot - a Java Optimization Framework
AC_SUBST(SOOT_CLASSES)
# Directory that contains the Soot installation
AC_SUBST(SOOT_DIR)
# tini/bin/tiniclasses.jar file used by the Dallas Semi Tini
AC_SUBST(TINI_CLASSES)
# Directory that contains the Tini installation
AC_SUBST(TINI_DIR)
# Location of tools.jar, usually $(PTJAVA_HOME)/../lib/tools.jar
AC_SUBST(TOOLS_JAR)
# Location of TinyOS, used by ptinyos domain
AC_SUBST(TOSROOT_NO_CYGDRIVE)
AC_SUBST(TOSDIR_NO_CYGDRIVE)
# giotto/gdk.jar file used by GiottoSDK
AC_SUBST(GIOTTO_CLASSES)
# Directory that contains the GiottoSDK installation
AC_SUBST(GIOTTO_DIR)
# Vertx jars used by actor.lib.vertx
AC_SUBST(PTVERTX_JARS)
# Set to vertx if the Vertx jars are found
AC_SUBST(PTVERTX_DIR)
# Set to ptolemy.actor.lib.vertx and used in $PTII/doc/makefile if the Vertx jars are found
AC_SUBST(PTVERTX_PACKAGES)
# waba/tools/classes.jar file used by the PalmOS WABA
AC_SUBST(WABA_CLASSES)
# Directory that contains the waba used by PalmOS
AC_SUBST(WABA_DIR)
# Files we substitute in
AC_OUTPUT(mk/ptII.mk bin/ptinvoke build.xml .classpath bin/comm.policy lib/ptII.properties ptolemy/util/test/junit/javachdir32, chmod a+x bin/ptinvoke ptolemy/util/test/junit/javachdir32)