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 57836 2010-05-12 17:57:52Z cxh $ # Copyright (c) 1997-2010 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 # 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') 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 ME is not a real os, and it does not have CMD. # So, we punt PTII_DIR=$PTII ;; CYGWIN_98-*) # Windows 98 is not a real os, and it does not have CMD. # So, we punt PTII_DIR=$PTII ;; CYGWIN*) # 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'` ;; *) 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 #-------------------------------------------------------------------- # 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 # 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 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.3 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:\jdk1.3.1\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/jdk1.3.1/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/jdk1.3.1 export PATH 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 # # 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(ok) 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 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.*) # If we call the jdk1.4 javadoc without -breakiterator, # then we get lots of warnings # -breakiterator is only present in jdk1.4 and later JDOCBREAKITERATOR=-breakiterator # Ptalon uses generics JDOCSOURCEFLAGS="-source 1.5" HAS_GENERICS=yes PT_MSG_RESULT([ok, you are running $JVERSION]) ;; *) # -breakiterator is only present in jdk1.4 and later JDOCBREAKITERATOR=-breakiterator # Ptalon uses generics, assume 1.6 or greater here HAS_GENERICS=yes JAVA1_6_OR_LATER=yes PT_MSG_RESULT([ok, you are running $JVERSION]) ;; esac if test "$UPGRADE_JVM" = "yes"; then AC_MSG_ERROR([Ptolemy II requires JDK 1.4 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 Please upgrade your JDK to 1.5 and try again]) 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(ok) 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. # 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 # # keytool command used to generate a certificate for testing actor.lib.security actors # 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 #-------------------------------------------------------------------- # 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 #-------------------------------------------------------------------- # These directories are always excluded from Eclipse # To add to this list, edit .classpath.in ECLIPSE_EXCLUDING_SRC="" # Jar files to include in the Eclipse library #ECLIPSE_CLASSPATHENTRY_LIBS='' ECLIPSE_CLASSPATHENTRY_LIBS='' case "`uname -s`" in Darwin) AC_MSG_WARN([Under Eclipse on Mac OS X, there are various problems with Eclipse. - To run Eclipse-3.4.0 on the Mac, you must use Java 1.5. However, You can still run Eclipse with 1.5 and have Eclipse invoke your application with Java 1.6. The problem is that Eclipse itself must be run with Java 1.5. This may change with Eclipse Galileo. - 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/Mac 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.]) ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/apps/eclipse/awt/" fi ;; *) ECLIPSE_CLASSPATHENTRY_PDE_REQUIREDPLUGINS='' ;; esac ##################################################################### ##################################################################### # 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 ##################################################################### ##################################################################### #-------------------------------------------------------------------- # Boost is used by Mescal, which is not shipped with # the standard Ptolemy II download # See http://www.boost.org #-------------------------------------------------------------------- # Set to -Ixxx if we found boost/static_assert.hpp PTBOOST_INCLUDE= # Set to yes if we found boost PTBOOST=no # We only need to look for Boost if mescal is present MESCAL_USER_DIR=$PTII/mescal/views/simulation/model/UINT.H if test ! -f "$MESCAL_USER_DIR"; then PT_MSG_STATUS([$MESCAL_USER_DIR is not present, so we need not find Boost.]) else case "`uname -s`" in Linux) ARCH=linux;; *) ARCH=unknown;; esac if test "$PTBOOST" = "no"; then AC_MSG_CHECKING([for Boost in \$PTII/mescal/include/boost/static_assert.hpp]) if test -f "$PTII/mescal/include/boost/static_assert.hpp"; then PT_MSG_RESULT([ok]) PTBOOST_INCLUDE="-I$PTII/mescal/include" PTBOOST=yes else PT_MSG_RESULT([not found, keep looking]) fi fi if test "$PTBOOST" = "no"; then AC_MSG_CHECKING([for Boost in /usr/local/include/boost/static_assert.hpp]) if test -f "/usr/local/include/boost/static_assert.hpp"; then PT_MSG_RESULT([ok]) if test "$ARCH" != "linux"; then PTBOOST_INCLUDE="-I/usr/local/include" fi PTBOOST=yes else PT_MSG_RESULT([not found, keep looking]) fi fi if test "$PTBOOST" = "no"; then AC_MSG_WARN([Failed to find boost/static_assert.hpp, which is only needed to compile files that include $MESCAL_USER_DIR boost can be found at http://www.boost.org To install boost, download the source and then do cd boost-1.30.2 mkdir $PTII/mescal/include cp -r boost $PTII/mescal/include]) fi AC_CHECK_HEADER(stdint.h, PTSTDINT_H=yes, PTSTDINT_H=no) if test "$PTSTDINT_H" = "no"; then AC_MSG_WARN([Failed to find stdint.h mescal/views/simulation/model/UINT.h includes stdint.h so that uint32_t and uint64_t are properly typedefd. Older versions of Cygwin might not include stdint.h, the solution is to update Cygwin from http://sources.redhat.com/cygwin See mescal/views/simulation/model/UINT.h for details.]) fi 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" ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/caltrop/" else # Note that jasminclasses.jar in soot also includes java_cup ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ \ \ \ " 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(ok) # 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/chic/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 #-------------------------------------------------------------------- # Codegen directories # Check for various codegen directories that are in the devel # tree, but not shipped. #-------------------------------------------------------------------- PTCODEGEN_OPTIONAL_PACKAGES= # We only need to look for if $PTII/ptolemy/codegen exists CODEGEN_USER_DIR="$PTII/ptolemy/codegen" if test ! -d "$CODEGEN_USER_DIR"; then PT_MSG_STATUS([$CODEGEN_USER_DIR is not present, so we need not check for optional codegen target packages for javadoc.]) else AC_MSG_CHECKING([for optional codegen packages on which to run javadoc]) codegendocpackages="ptolemy.codegen.c.targets.arduino ptolemy.codegen.c.targets.pret ptolemy.codegen.c.targets.pret.actor.lib.gui ptolemy.codegen.c.targets.pret.domains.fsm.kernel ptolemy.codegen.c.targets.pret.domains.giotto.kernel ptolemy.codegen.c.targets.win32 ptolemy.codegen.c.targets.win32.actor.lib.io ptolemy.codegen.c.targets.win32.domains.pn.kernel ptolemy.domains.giotto.cgc" for package in $codegendocpackages do if test "${PTVERBOSE:-none}" = "none"; then $PT_ECHO $ECHO_N "." else $PT_ECHO $ECHO_N "$package " fi path="${PTII}/`echo $package | sed 's@\.@/@g'`" if test -d "${path}"; then PTCODEGEN_OPTIONAL_PACKAGES="$PTCODEGEN_OPTIONAL_PACKAGES $package" fi done PT_MSG_RESULT(ok) fi #-------------------------------------------------------------------- # 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 ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " if test -z "$PTCOLT_DIR"; then ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " fi # We found colt PTCOLT_DIR=colt # PTCOLT_PACKAGES is used in ptII/doc/makefile PTCOLT_PACKAGES=ptolemy.actor.lib.colt else PTCOLT_JARS=$PTCOLT_JAR 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 PT_MSG_RESULT([$COLT_DIR/colt.jar not found, using $PTCOLT_JAR]) ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " fi fi fi if test -z "$PTCOLT_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/colt/" 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/codegen/c/kernel/type/test" # PTCUNIT_DIR is set to test and used in # ptII/ptolemy/codegen/c/kernel/type/test/makefile # 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 codegen templates]) AC_ARG_WITH(tools_jar, [ --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]) 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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.]) ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 PT_MSG_RESULT([$ECLIPSE_DIR]) AC_MSG_CHECKING([for jars used by backtracking in $ECLIPSE_DIR]) # 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.equinox.preferences eclipse.core.jobs eclipse.core.contenttype eclipse.equinox.common_ eclipse.core.jobs_ eclipse.core.contenttype_ eclipse.equinox.preferences_" eclipsejarpath= for jar in $jars do if test "${PTVERBOSE:-none}" = "none"; then $PT_ECHO $ECHO_N "." else $PT_ECHO $ECHO_N "$jar " fi jarpath=`$FIND "$ECLIPSE_DIR/plugins" -name "*${jar}*.jar" | head -1` if test -f "$jarpath"; then # Keep track of the jars so we can use them while building # with make. eclipsejarpath="$eclipsejarpath$CLASSPATHSEPARATOR$jarpath" # NOTE: Eclipse 3.0 has problems if we include these # jars in the .classpath, instead, .classpath.in includes: # #ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ #" 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" ;; *) 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 jarpath=`$FIND "$ECLIPSE_DIR/plugins" -name "*${jar}*.jar" | head -1` if test -f "$jarpath"; then # Keep track of the jars so we can use them while # building with make. PTBACKTRACK_ECLIPSE_DOC_JARS="$PTBACKTRACK_ECLIPSE_DOC_JARS$CLASSPATHSEPARATOR$jarpath" # case "`uname -s`" in # Darwin) ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ # ";; # 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]) # 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/backtrack/|ptolemy/backtrack/ast/" fi #-------------------------------------------------------------------- # FuzzyEngine is an "Open source fuzzy inference engine for Java" # http://people.clarkson.edu/~esazonov/FuzzyEngine.htm # However, FuzzyEngine is GPL'd, so we don't ship it. # # See if there was a command-line option for where FuzzyEngine interface is # If not, look for $PTII/vendors/misc/FuzzyEngine/fuzzy/FuzzyEngine.class #-------------------------------------------------------------------- # PTFUZZY_DIR is set to fuzzy and used in # $PTII/ptolemy/actor/lib/logic/makefile if FuzzyEngine.class was found PTFUZZY_DIR= # FuzzyEngine Directory # http://people.clarkson.edu/~esazonov/FuzzyEngine.htm PTFUZZYENGINE_DIR='${PTII}/vendors/misc/FuzzyEngine' FUZZYLOGIC_USER_DIR="$PTII/ptolemy/actor/lib/logic/fuzzy" # We only need to look for FuzzyEngine if $FUZZYLOGIC_USER_DIR if test ! -d "$FUZZYLOGIC_USER_DIR"; then PT_MSG_STATUS([$FUZZYLOGIC_USER_DIR is not present, so we need not find the FuzzyEngine interface.]) else AC_MSG_CHECKING([for FuzzyEngine directory]) AC_ARG_WITH(fuzzyengine, [ --with-fuzzyengine=DIRECTORY use FuzzyEngine from DIRECTORY, defaults to \$PTII/vendors/misc/FuzzyEngine], PTFUZZYENGINE_DIR=$withval, PTFUZZYENGINE_DIR=$PTII/vendors/misc/FuzzyEngine) if test -f "$PTFUZZYENGINE_DIR/fuzzy/FuzzyEngine.class"; then PT_MSG_RESULT([$PTFUZZYENGINE_DIR]) # Set to fuzzy and used in # $PTII/ptolemy/actor/lib/logic/makefile if FuzzyEngine.class PTFUZZY_DIR=fuzzy # PTFUZZYLOGIC_PACKAGES is used in ptII/doc/makefile PTFUZZY_PACKAGES=ptolemy.actor.lib.logic.fuzzy fi if test "$PTFUZZY_DIR" = ""; then AC_MSG_WARN([Failed to find fuzzy/FuzzyEngine.class in $PTFUZZYENGINE_DIR. Perhaps the FuzzyEngine is not installed? You need not download the FuzzyEngine interface unless you plan on using the actor.lib.logic.fuzzy actors with Ptolemy II. The FuzzyEngine interface can be downloaded from http://people.clarkson.edu/~esazonov/FuzzyEngine.htm an untar'd into $PTII/vendors/misc so that $PTII/vendors/misc/FuzzyEngine/fuzzy/FuzzyEngine.class exists.] ) # Note that we don't substitute in the ${PTII} here PTFUZZYENGINE_DIR='${PTII}/vendors/misc/FuzzyEngine' fi fi if test -z "$PTFUZZY_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/logic/fuzzy/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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/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/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/makefile if iText.jar is found PTITEXTPDF_DIR=itextpdf # PTITEXTPDF_PACKAGES is used in ptII/doc/makefile PTITEXTPDF_PACKAGES=ptolemy.vergil.basic.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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/vergil/basic/itextpdf/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 #-------------------------------------------------------------------- # JAI is the Java Advanced Imaging Framework # For more information, # see http://java.sun.com/products/java-media/jai/ # 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(ok) 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.]);; *) ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ \ " ;; 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 http://java.sun.com/products/java-media/jai/]) fi cd "$startdir" fi if test -z "$PTJAI_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/jai/" fi #-------------------------------------------------------------------- # JMF is the Java Media Framework # For more information, # see http://java.sun.com/products/java-media/jmf # 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(ok) 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 ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ "\ JMF_JARS="$JMF_JAR" if test -f "$JMF_JARS_DIR/sound.jar" ; then ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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://java.sun.com/products/java-media/jmf]) fi cd "$startdir" fi if test -z "$PTJMF_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/jmf/" fi #-------------------------------------------------------------------- # Jogl is Java bindings for OpenGL # https://jogl.dev.java.net/ # Jogl is BSD licensed, but platform dependent, so we don't # include Jogl in the Ptolemy II tree #-------------------------------------------------------------------- # PTGRO_DIR is set to gro # $PTII/ptolemy/domains/makefile if Jogl was found PTGRO_DIR= # Jogl Directory. Jogl is available from # https://jogl.dev.java.net/ PTJOGL_DIR='${PTII}/vendors/sun/jogl' # Java OpenGL (Jogl) jar files. Used to compile gro domain. PTJOGL_JARS= GRO_USER_DIR="$PTII/ptolemy/domains/gro" # We only need to look for Jogl if $GRO_USER_DIR if test ! -d "$GRO_USER_DIR"; then PT_MSG_STATUS([$GRO_USER_DIR is not present, so we need not find the Jogl interface.]) else AC_MSG_CHECKING([for Jogl directory]) AC_ARG_WITH(jogl, [ --with-jogl=DIRECTORY use Java OpenGL interface (jogl) from DIRECTORY, defaults to \$PTII/vendors/sun/jogl], PTJOGL_DIR=$withval, PTJOGL_DIR=$PTII/vendors/sun/jogl) if test -f "$PTJOGL_DIR/lib/jogl.jar"; then PT_MSG_RESULT([$PTJOGL_DIR]) # Set to gro and used in # $PTII/ptolemy/domains/makefile if jogl.jar was found. PTGRO_DIR=gro # PTGRO_PACKAGES is used in ptII/doc/makefile PTGRO_PACKAGES="ptolemy.domains.gro.kernel ptolemy.domains.gro.lib" # Look for Jogl jar files jogljars="jogl.jar gluegen-rt.jar" for jar in $jogljars do if test "${PTVERBOSE:-none}" = "none"; then $PT_ECHO $ECHO_N "." else $PT_ECHO $ECHO_N "$jar " fi if test -f "$PTJOGL_DIR/lib/$jar"; then PTJOGL_JARS="${PTJOGL_JARS}${CLASSPATHSEPARATOR}${PTJOGL_DIR}/lib/$jar" ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " fi done fi if test "$PTGRO_DIR" = ""; then AC_MSG_WARN([Failed to find lib/jogl.jar in $PTJOGL_DIR perhaps the Java OpenGL (Jogl) interface is not installed? You need not download the Jogl interface unless you plan on using the GRO domain with Ptolemy II. The Jogl interface can be downloaded from https://jogl.dev.java.net/ an untar'd into $PTII/vendors/sun. Note that configure looks for $PTII/vendors/sun/jogl, so either move the Jogl distribution or create a symbolic link and then rerun configure.] ) # Note that we don't substitute in the ${PTII} here PTJOGL_DIR='${PTII}/vendors/sun/jogl' fi fi if test -z "$PTJOGL_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/domains/gro/" 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/joystick/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 itextpdf and used in # $PTII/ptolemy/vergil/basic/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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/excel/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/jython/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " fi #-------------------------------------------------------------------- # "JXTA technology is a set of open protocols that allow any # connected device on the network ranging from cell phones and wireless # PDAs to PCs and servers to communicate and collaborate in a P2P # manner." # # See http://www.jxta.org # See if there was a command-line option for where JXTA is # If not, look for $PTII/vendors/sun/jxta/jxta.jar #-------------------------------------------------------------------- # We only need to look for jxta if $PTII/ptolemy/actor/lib/jxta is present JXTA_USER_DIR="$PTII/ptolemy/actor/lib/jxta" # PTJXTA_DIR is set to jxta and used in # $PTII/actor/lib/makefile if jxta was found PTJXTA_DIR= # Directory that contains the jxta jar files JXTA_DIR='${PTII}/vendors/sun/jxta' if test ! -d "$JXTA_USER_DIR"; then PT_MSG_STATUS([$JXTA_USER_DIR is not present, so we need not find JXTA.]) else AC_MSG_CHECKING([for jxta directory that contains jxta.jar]) AC_ARG_WITH(jxta, [ --with-jxta=DIR use jxta.jar from DIR, defaults to \$PTII/vendors/sun/jxta], JXTA_DIR=$withval, JXTA_DIR=$PTII/vendors/sun/jxta) if test -f "$JXTA_DIR/jxta.jar"; then PT_MSG_RESULT([$JXTA_DIR]) # Set to jxta and used in # $PTII/ptolemy/actor/lib/makefile if jxta was found PTJXTA_DIR=jxta fi if test "$PTJXTA_DIR" = ""; then AC_MSG_WARN([Failed to find PTII/vendors/sun/jxta/jxta.jar perhaps JXTA is not installed? You need not download JXTA unless you plan on using the peer to peer actors in ptolemy/actor/lib/jxta The JXTA SDK can be downloaded from http://www.jxta.org]) # Note that we don't substitute in the ${PTII} here JXTA_DIR='${PTII}/vendors/sun/jxta' fi fi if test -z "$PTJXTA_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|vendors/sun/jxta/|ptolemy/actor/lib/jxta/|ptolemy/moml/jxta/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ \ \ \ \ \ \ \ " 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 jxta 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 jxta jar files KIELER_JAR='${PTII}/lib/kieler.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(jxta, [ --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]) # Set to kieler and used in # $PTII/ptolemy/vergil/basic/layout/makefile if kieler was found PTKIELER_DIR=kieler fi if test "$PTKIELER_DIR" = ""; then 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/vergil/basic/layout/kieler/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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= 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(ok) PTOPENCV_DIR=opencv # PTOPENCV_PACKAGES is used in ptII/doc/makefile PTOPENCV_PACKAGES=ptolemy.actor.lib.opencv 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.]) ;; *) ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " ;; 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= ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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.]) ;; *) ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " ;; 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= ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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/]) ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 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" ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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/]) ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/opencv/javacv/" 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/opencv/" fi # PTCGOPENCV_DIR is set to OpenCVTracking and used in # $PTII/ptolemy/codegen/demo/makefile if opencv was found PTOPENCVCG_DIR=OpenCVTracking # We only need to look for OpenCVif the actor/lib/opencv directory is present OPENCVCG_USER_DIR="$PTII/ptolemy/codegen/demo/OpenCVTracking" if test ! -d "$OPENCVCG_USER_DIR"; then PT_MSG_STATUS([$OPENCVCG_USER_DIR is not present, so we need not find OpenCV - The Open Computer Vision API.]) 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 the OpenCV Codegen code in $OPENCVCG_USER_DIR]); fi fi if test "${PTCC:-none}" != "none"; then AC_MSG_CHECKING([for OpenCV C API]) # FIXME: This will not work if $PTII has spaces dirs="/Library/Frameworks/OpenCV.framework/Headers /usr/local/include/opencv" for dir in $dirs do if test -f "$dir/cv.h"; then PT_MSG_RESULT([$dir/cv.h}]) PTOPENCV_INCLUDE_DIR=$dir break; fi done if test ! -f "$PTOPENCV_INCLUDE_DIR/cv.h"; then AC_MSG_WARN([Failed to find cv.h Checked the following directories: $dirs The OpenCV Codegen facility in $OPENCVCG_USER_DIR requires cv.h. However, Ptolemy will run without this facility.]) fi 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/sun/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=$RXTX_JAR_DEFAULT) if test -f "$RXTX_JAR"; then PT_MSG_RESULT(ok) RXTX_PRESENT=yes 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.]);; *) ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " ;; 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://rxtx.qbang.org/wiki/index.php/Download]) 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" ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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-4.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-4.0], JAVACC_DIR=$withval, JAVACC_DIR=$PTII/vendors/sun/javacc-4.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]) 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]) 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. Configure looks for JavaCC in $PTII/vendors/sun/javacc-4.0 so either install JavaCC in that location or use the --with-javacc= flag and then rerun configure.']) JJTREE=touch JAVACC=touch fi fi #-------------------------------------------------------------------- # See if there was a command-line option for where Jacl is #-------------------------------------------------------------------- # 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(ok) 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(ok) 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/gui/ptjacl/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " fi #-------------------------------------------------------------------- # Test for javax.media.j3d (Java 3D) #-------------------------------------------------------------------- # 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]) # 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" java3dTest.java ; then PT_MSG_RESULT(ok) 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" java3dTest.java' failed. http://java.sun.com/products/java-media/3D/download.html Java 3D is only needed if you want to build in $JAVA3D_USER_DIR, otherwise the build will proceed fine without Java 3D.]) fi cd "$startdir" fi if test -z "$PTJAVA3D_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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/mescal/kirika" ; then PT_MSG_RESULT([$PTII/jni, $PTII/ptolemy/matlab and $PTII/mescal/kirika 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_PROG(PTCCJNI, mingw32-gcc) if test "${PTCCJNI:-none}" = "none"; then AC_MSG_WARN([Failed to find mingw32-gcc. 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 if test "${PTCCJNI:-none}" != "none"; then PT_MSG_RESULT([$PTJNICC]) PTJNI_DIR=jni 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 PTJNI_INCLUDE="$PTJAVA_HOME/../Headers" 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']) AC_MSG_CHECKING([for the proper JNI architecture lib directory]) if test $PTJNI_ARCHITECTURE = "darwin"; then PTJNI_LIB="$PTJAVA_HOME/../Libraries" else PTJNI_LIB="$PTJAVA_HOME/lib/$PTJNI_LIB_ARCHITECTURE" fi if test ! -d "$PTJNI_LIB"; then AC_MSG_WARN([$PTJNI_LIB was not found. As a result, $PTII/jni/launcher/launcher might not work.]) else PT_MSG_RESULT([$PTJNI_LIB]) 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;; 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="" case "`uname -s`" in CYGWIN_*) PTJNI_SHAREDLIBRARY_SUFFIX=dll PTJNI_SHAREDLIBRARY_SUFFIX2=dll.a;; SunOS) PTJNI_SHAREDLIBRARY_SUFFIX=so;; Linux) PTJNI_SHAREDLIBRARY_SUFFIX=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 #-------------------------------------------------------------------- # 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= PTMATLAB_SUPPORTED=no case "`uname -s`" in Darwin) PTMATLAB_SUPPORTED=yes ;; Linux) PTMATLAB_SUPPORTED=yes ;; CYGWIN*) PTMATLAB_SUPPORTED=yes ;; SunOS*) PTMATLAB_SUPPORTED=yes ;; esac if test "$PTMATLAB_SUPPORTED" = "no"; then AC_MSG_WARN([The Matlab interface is not supported on this platform (you are running `uname -s`).]) 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" MatlabRootDirectory.java ; then AC_MSG_CHECKING([the value of the Matlab root directory ]) if env CLASSPATH="$PTII/config" "$JAVA" MatlabRootDirectory "$MATLAB"> /dev/null; then MATLAB_DIR_TMP=`CLASSPATH="$PTII/config" "$JAVA" MatlabRootDirectory "$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 MatlabRootDirectory "$MATLAB"' failed. We will not be able to compile the Matlab interface in ptolemy/matlab/]); fi else AC_MSG_WARN(['CLASSPATH="$PTII/config" $JAVAC MatlabRootDirectory.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_*) AC_PATH_PROG(PTMATLAB_CC, mingw32-gcc) if test "${PTMATLAB_CC:-none}" = "none"; then AC_MSG_WARN([Failed to find mingw32-gcc. 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" 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 ;; 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|**/devel/|mescal/apps/|mescal/totem/domains/meta/codegen/|mescal/views/memory/registerfile/|mescal/views/simulation/model/probe/|mescal/xml2hmdes/" 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/domains/psdf/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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(mapss, [ --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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/ptalon/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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(ok) 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(ok) 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/domains/gr/lib/quicktime/" else if test ! -z "$QTJAVA_ZIP"; then ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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(ok) 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/copernicus/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ \ \ " # 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) 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(ojdbc6, [ --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, used by the database actors]) 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]) 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/database/|ptolemy/domains/space/" else if test -f "$MYSQL_JAR"; then ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " fi if test -f "$ORACLE_OJDBC_JAR"; then ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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([$PTII/$PDFRENDERER_USER_DIR is not present, so we need not find PDFRenderer.]) else AC_MSG_CHECKING([for PDFRenderer]) AC_ARG_WITH(pdfrendererjar, [ --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 ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|$PDFRENDERER_USER_DIR" 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 ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 # ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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(ok) 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/@@"` ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ \ " # 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/@@"` ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|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 PT_MSG_RESULT([$GIOTTO_CLASSES]) 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 #-------------------------------------------------------------------- # 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 #-------------------------------------------------------------------- # X10 is the interface library for power line communication, see # http://x10.homelinux.org/download.html # See if there was a command-line option for where # the X10 sdk is; if not, # check to see if $PTII/vendors/misc/x10 exists #-------------------------------------------------------------------- # PTX10_DIR is set to x10 and used in # $PTII/ptolemy/actor/lib/x10/makefile if x10 was found PTX10_DIR= # Set to the location of the X10 classes X10_CLASSES= # We only need to look for x10 if $PTII/ptolemy/actor/lib/x10 exists X10_USER_DIR="$PTII/ptolemy/actor/lib/x10" if test ! -d "$X10_USER_DIR"; then PT_MSG_STATUS([$X10_USER_DIR is not present, so we need not find the X10 SDK. X10 is the power line comm interface.]) else if test "$RXTX_PRESENT" = "no"; then AC_MSG_WARN([The Java Serial Port Communications API is not installed. The X10 Interface requires rxtx to interface to the serial port The commapi can be downloaded from http://java.sun.com/products/javacomm/ and placed in \$PTII/vendors/sun/commapi]) else AC_MSG_CHECKING([for X10 directory]) AC_ARG_WITH(x10, [ --with-X10=DIR use X10 from DIR, defaults to \$PTII/vendors/misc/x10], X10_DIR=$withval, X10_DIR=$PTII/vendors/misc/x10) if test -d "$X10_DIR"; then PT_MSG_RESULT([$X10_DIR]) AC_MSG_CHECKING([for \$X10_DIR/tjx10p-13/lib/x10.jar]) if test -f "$X10_DIR/tjx10p-13/lib/x10.jar"; then X10_CLASSES=${X10_DIR}/tjx10p-13/lib/x10.jar PT_MSG_RESULT([$X10_CLASSES]) PTX10_DIR=x10 # PTX10_PACKAGES is used in ptII/doc/makefile PTX10_PACKAGES=ptolemy.actor.lib.x10 else AC_MSG_WARN([not found, keeping looking]) AC_MSG_CHECKING([for \$X10_DIR/tjx10p-12/lib/x10.jar]) if test -f "$X10_DIR/tjx10p-12/lib/x10.jar"; then X10_CLASSES=${X10_DIR}/tjx10p-12/lib/x10.jar PT_MSG_RESULT([$X10_CLASSES]) PTX10_DIR=x10 # PTX10_PACKAGES is used in ptII/doc/makefile PTX10_PACKAGES=ptolemy.actor.lib.x10 else AC_MSG_WARN([not found, keeping looking]) AC_MSG_CHECKING([for \$X10_DIR/tjx10p-11/lib/x10.jar]) if test -f "$X10_DIR/tjx10p-11/lib/x10.jar"; then X10_CLASSES=${X10_DIR}/tjx10p-11/lib/x10.jar PT_MSG_RESULT([$X10_CLASSES]) PTX10_DIR=x10 else AC_MSG_WARN([not found]) # PTX10_PACKAGES is used in ptII/doc/makefile PTX10_PACKAGES= X10_CLASSES= fi fi fi fi if test -z "$PTX10_DIR"; then AC_MSG_WARN([Failed to find tjx10p-13/lib/x10.jar tjx10p-12/lib/x10.jar or tjx10p-11/lib/x10.jar. Perhaps X10 is not installed? You need not download X10 unless you plan on building applications using the X10 interface. The X10 SDK can be downloaded from http://x10.homelinux.org. See also $PTII/vendors/misc/x10/README.txt]) # Note that we don't substitute in the ${PTII} or $(X10_DIR) here X10_DIR='${PTII}/vendors/misc/x10' X10_CLASSES='${X10_DIR}/tjx10p-13/lib/x10.jar' else # Set to x10 and used in # $PTII/ptolemy/actor/lib/x10/makefile if x10 was found PTX10_DIR=x10 fi fi fi if test -z "$PTX10_DIR"; then ECLIPSE_EXCLUDING_SRC="$ECLIPSE_EXCLUDING_SRC|ptolemy/actor/lib/x10/|ptolemy/actor/lib/x10/" else ECLIPSE_CLASSPATHENTRY_LIBS="$ECLIPSE_CLASSPATHENTRY_LIBS \ " 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 if test -f "$dir/libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX}"; then PT_MSG_RESULT([$dir/libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX}]) LIBEXPAT_LIB_DIR=$dir break; else # Mac OS X could have jnilib or dylib, Cygwin has /usr/lib/libexpat.dll.a if test -f "$dir/libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX2}"; then PT_MSG_RESULT([$dir/libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX2}]) LIBEXPAT_LIB_DIR=$dir 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"; then if test -f "$LIBEXPAT_LIB_DIR/libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX}" -o -f "$LIBEXPAT_LIB_DIR/libexpat.${PTJNI_SHAREDLIBRARY_SUFFIX}.a"; then # Used in $PTII/lbnl/lib/util/makefile PTLIBEXPAT_DIR=util # Used in $PTII/makefile PTLBNL_DIR=lbnl fi fi # Keep these substitutions alphabetical, with a description # Directory that contains the Caltrop jar file ptCal.jar # used by bin/ptinvoke.in AC_SUBST(CALTROP_DIR) # 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) # 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) # 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) # javac binary AC_SUBST(JAVAC) # javacc binary AC_SUBST(JAVACC) # 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 http://www.sun.com/jini/ 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) # jtree binary AC_SUBST(JTREE) # JDK Version determined by running confTest.class and getting java.version AC_SUBST(JVERSION) # Jar files for Java Media Framework (JMF) used by ptolemy/actor/lib/makefile AC_SUBST(JMF_JARS) # 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) # Jython home directory that contains jython.jar, see http://www.jython.org AC_SUBST(JYTHON_DIR) # JXTA home directory that contains jxta.jar, see http://www.jxta.org AC_SUBST(JXTA_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 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 -I$PTII/mescal/include or -I/usr/local/include # if we found boost/static_assert.hpp (mescal) AC_SUBST(PTBOOST_INCLUDE) # 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) # Optional codegen package that are in the devel tree, but not shipped. # Used in doc/makefile AC_SUBST(PTCODEGEN_OPTIONAL_PACKAGES) # 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 # ptII/ptolemy/codegen/c/kernel/type/test/makefile # 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) # 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) # Set to fuzzy and used in # $PTII/ptolemy/actor/lib/logic/makefile if FuzzyEngine.jar was found AC_SUBST(PTFUZZY_DIR) # FuzzyEngine directory. FuzzyEngine is from # http://people.clarkson.edu/~esazonov/FuzzyEngine.htm AC_SUBST(PTFUZZYENGINE_DIR) # PTFUZZYLOGIC_PACKAGES is used in ptII/doc/makefile if FuzzyEngine.jar is found AC_SUBST(PTFUZZY_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 gro and used in # $PTII/ptolemy/domains/makefile if the Java OpenGL (Jogl) interface was found. AC_SUBST(PTGRO_DIR) # PTGRO_PACKAGES is used in ptII/doc/makefile if Jogl was found. AC_SUBST(PTGRO_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/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) # Set to gr and used in # $PTII/ptolemy/domains/makefile if Java 3D was found AC_SUBST(PTJAVA3D_DIR) # 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) # 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 libraries needed to link, such as -lcygwin (Used by Viptos) AC_SUBST(PTJNI_LIBRARIES) # Java OpenGL (Jogl) directory. FuzzyEngine is from # https://jogl.dev.java.net/ AC_SUBST(PTJOGL_DIR) # Java OpenGL (Jogl) jar files. Used to compile gro domain. AC_SUBST(PTJOGL_JARS) # 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) # 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 jxta ans used in # $PTII/actor/lib/makefile if jxta.jar was found AC_SUBST(PTJXTA_DIR) # Set to opencv and used in # $PTII/ptolemy/actor/lib/makefile if OpenCV Open Computer Vision was found AC_SUBST(PTOPENCV_DIR) # PTCGOPENCV_DIR is set to OpenCVTracking and used in # $PTII/ptolemy/codegen/demo/makefile if opencv was found AC_SUBST(PTOPENCVCG_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) # 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 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/util/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) # 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) # Set to mescal and used in $PTII/makefile # if $PTII/mescal was found AC_SUBST(PTMESCAL_DIR) # 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) # Jar files used by the Image Processing library from http://processing.org AC_SUBST(PTPROCESSING_JARS) # 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) # 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) # Set to x10 and used in # $PTII/ptolemy/actor/lib/x10/makefile if the X10 jar files were found AC_SUBST(PTX10_DIR) # Ptolemy II packages that use the X10 facilty. # PTX10_PACKAGES is used in ptII/doc/makefile AC_SUBST(PTX10_PACKAGES) # 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) # 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) # tjx10p-11/lib/x10.jar file used for X10 AC_SUBST(X10_CLASSES) # Directory that contains the X10 installation AC_SUBST(X10_DIR) # Files we substitute in AC_OUTPUT(mk/ptII.mk bin/ptinvoke .classpath bin/comm.policy lib/ptII.properties, chmod a+x bin/ptinvoke)