📄 configure.in
字号:
#! /bin/shdnldnl Caching is usually WRONG for systems with cross-mounted file systemsdnl (the cache file may correspond to a different system). Since configurednl is not on a performance-critical path, go for robustness over speed.dnldefine([AC_CACHE_LOAD], )dnldefine([AC_CACHE_SAVE], )dnldnldnlAC_INIT()dnl Strictly speaking slog2sdk/src does not need 2.52, but since the parentdnl package, slog2sdk or mpe2, require 2.5x, which allows environmentdnl variables set in configure command not allowed in 2.13. Because ofdnl that reason, it is safer to use 2.5x here in this package so mpe2'sdnl or slog2sdk configure can complete successfully.AC_PREREQ(2.52)AC_CONFIG_AUX_DIR([..]) AC_ARG_ENABLE(echo, [--enable-echo - Turn on strong echoing. The default is enable=no.] ,set -x) AC_ARG_ENABLE(softerror, [--enable-softerror - Turn on soft error, i.e. instead of issuing MSG_ERROR, MSG_WARN + exit 0 are used. The default is enable=no.],, enable_softerror=${slog2_enable_softerror:-no})AC_ARG_ENABLE(g, [--enable-g - Turn on the debugging flags, -g, and uses jdb to run the GUI. The default is enable=no], ,enable_g=no)AC_ARG_ENABLE(checkversion, [--enable-checkversion - Turn on the Java version checking code. The default is enable=yes],, enable_checkversion=yes) echo "Configuring the Build of SLOG-2/Jumpshot-4 with $ac_configure_args"## Find the home directory if not specifiedif test "X$srcdir" != "X." -a -s $srcdir/base/drawable/Makefile.in ; then top_srcdir_abs=$srcdirelse PAC_GETWD(top_srcdir_abs, base/drawable/Makefile.in)fi if test -z "$top_srcdir_abs" ; then top_srcdir_abs=`pwd`fiif test ! -d "$top_srcdir_abs" ; then PAC_MSG_ERROR($enable_softerror, [*** $top_srcdir_abs is not a valid directory - cannot continue])fiAC_SUBST(top_srcdir_abs) # Cannot use JAVA_HOME here in this configure.in.# Because JAVA_HOME is used in Blackdown's .java_wrapper in jdk117_v3# Using JAVA_HOME here would mistakenly set some variable in .java_wrapper# when .java_wrapper is invoked. i.e. causes mysterious error in tests.AC_ARG_WITH(java, [--with-java=JDK_TOPDIR - The path of the top-level directory of the Java SDK installation. If this option or with-java2 is not given, configure will try to locate java for you. Also, with-java2 option overwrites the with-java option to set JDK_TOPDIR.],JDK_TOPDIR=$withval, JDK_TOPDIR="") AC_ARG_WITH(java2, [--with-java2=JDK_TOPDIR - The path of the top-level directory of the Java SDK installation. If this option or with-java is not given, configure will try to locate java for you. Also, with-java2 option overwrites the with-java option to set JDK_TOPDIR.],JDK_TOPDIR=$withval, )AC_ARG_WITH(jflags, [--with-jflags=JFLAGS - supply java compiler flags, e.g. optimization flags, -O, to the java compiler], JFLAGS="$withval")AC_ARG_ENABLE(clog,[--enable-clog - Build CLOG related utility jar files, clog2TOslog2.jar, clog2print.jar.... Java Standard Development Kit, SDK, is needed. The default is enable=yes.],,enable_clog=yes)AC_ARG_WITH(oldsource,[--with-oldsource=OLD_SRCDIR - Build slog2updater from the given OLD Java source directory OLD_SRCDIR which should be a valid directory name in the parent directory of this configure. e.g. src_205, --with-oldsource=src_205. The default is old_src.],old_slog2srcdir="$withval", old_slog2srcdir="old_src")AC_SUBST(old_slog2srcdir)# Append "-g" to JFLAGS if enable_g=yesif test "$enable_g" = "yes" ; then if test -z "`echo $JFLAGS | grep "\-g"`" ; then JFLAGS="-g $JFLAGS" fifi# Fixup for makeMAKE=${MAKE:-make}PAC_MAKE_IS_GNUMAKEPAC_MAKE_IS_BSD44PAC_MAKE_IS_OSFPAC_MAKE_VPATH# If we are relying on VPATH and no VPATH is set, then we must exitif test ! -s base/drawable/TimeBoundingBox.java -a -z "$VPATH" ; then AC_MSG_ERROR([No virtual MAKE path command found. You may need to set your make command. The GNU make (sometimes available as gnumake) can be used.])fiAC_SUBST(MAKE) # Check if --without-java is specifiedif test "$JDK_TOPDIR" = "no" ; then PAC_MSG_ERROR($enable_softerror, [--without-java is specified, exit!])fiis_javac_working=noif test "x$JDK_TOPDIR" != "x" ; thendnl JC="$JDK_TOPDIR/bin/javac" AC_MSG_CHECKING([if $JC exists]) if test -x "$JC" ; then AC_MSG_RESULT(yes) jac_javac_working=yes else AC_MSG_RESULT(no) jac_javac_working=no fidnl if test "$jac_javac_working" = "yes" ; then AC_MSG_CHECKING([if $JC compiles]) JAC_TRY_COMPILE( [$JC], , , [ public static void main( String args[] ) { System.out.println( "Hello world" ); } ], [ jac_javac_working=yes ], [ jac_javac_working=no ] ) if test "$jac_javac_working" = "yes" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fidnl if test "$jac_javac_working" = "yes" ; then AC_MSG_CHECKING([if $JC accepts -classpath, -d & -sourcepath]) JAC_TRY_COMPILE( [$JC], [-classpath . -d . -sourcepath .], , [ public static void main( String args[] ) { System.out.println( "Hello world" ); } ], [ jac_javac_working=yes ], [ jac_javac_working=no ] ) if test "$jac_javac_working" = "yes" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fidnl if test "$jac_javac_working" = "yes" ; then AC_MSG_CHECKING([if $JC understands List & Map]) JAC_TRY_COMPILE( [$JC], [-classpath . -d . -sourcepath .], [ import java.util.List; import java.util.Map; ], [ public static void main( String args[] ) { List list; Map map; } ], [ jac_javac_working=yes ], [ jac_javac_working=no ] ) if test "$jac_javac_working" = "yes" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fidnl if test "$jac_javac_working" = "yes" ; then AC_MSG_CHECKING([if $JC handles static-inner-class reference]) JAC_TRY_COMPILE( [$JC], [-classpath . -d . -sourcepath .], , [ public class RecType { static final int STATEDEF = 6; } public static void main( String args[] ) { int itmp = conftest.RecType.STATEDEF; System.out.println( itmp ); } ], [ jac_javac_working=yes ], [ jac_javac_working=no ] ) if test "$jac_javac_working" = "yes" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fidnl if test "$jac_javac_working" = "yes" ; then AC_MSG_CHECKING([if $JC compiles Swing-1.1.1 code]) JAC_TRY_COMPILE( [$JC], ,[ import javax.swing.*; ], [ public static void main( String args[] ) { JFrame frame = new JFrame(); System.out.println( "Checking Swing" ); } ], [ jac_javac_working=yes ], [ jac_javac_working=no ] ) if test "$jac_javac_working" = "yes" ; then AC_MSG_RESULT([yes, assume Java 2 SDK!])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -