configure looks for gcj before javac

By default configure looks for gcj before javac.  gcj does not work for our code.  Changed the configure script to look only for javac.

refs 
This commit is contained in:
Alex Lin 2015-06-11 15:46:10 -05:00
parent 2eeb311a70
commit 657c7ee921
3 changed files with 59 additions and 60 deletions

1
.gitignore vendored
View File

@ -21,3 +21,4 @@ bin/trick-gxplot
bin/trick-trk2ascii
bin/trick-trk2csv
aclocal.m4
autom4te.cache

116
configure vendored
View File

@ -639,7 +639,11 @@ DMTCP_HOME
HDF5_HOME
LLVM_HOME
LIBXML
JAVAC
JAVA_CC_OPTS
GCJ_OPTS
ac_ct_JAVA_CC
JAVA_CC_FLAGS
JAVA_CC
SWIG_LIB
SWIG
PERL
@ -719,6 +723,8 @@ CPPFLAGS
CXX
CXXFLAGS
CCC
JAVA_CC
JAVA_CC_FLAGS
PYTHON_VERSION
CXXCPP'
@ -1347,6 +1353,9 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
JAVA_CC java compiler command
JAVA_CC_FLAGS
java compiler flags
PYTHON_VERSION
The installed Python version to use, for example '2.3'. This
string will be appended to the Python interpreter canonical
@ -3687,19 +3696,18 @@ $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
fi
if test "x$JAVAPREFIX" = x; then :
test "x$JAVAC" = x && for ac_prog in "gcj -C" guavac jikes javac
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
if test -n "$ac_tool_prefix"; then
for ac_prog in javac
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_JAVAC+:} false; then :
if ${ac_cv_prog_JAVA_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$JAVAC"; then
ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
if test -n "$JAVA_CC"; then
ac_cv_prog_JAVA_CC="$JAVA_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@ -3708,7 +3716,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_JAVAC="$ac_prog"
ac_cv_prog_JAVA_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@ -3718,40 +3726,41 @@ IFS=$as_save_IFS
fi
fi
JAVAC=$ac_cv_prog_JAVAC
if test -n "$JAVAC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
$as_echo "$JAVAC" >&6; }
JAVA_CC=$ac_cv_prog_JAVA_CC
if test -n "$JAVA_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CC" >&5
$as_echo "$JAVA_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$JAVAC" && break
done
else
test "x$JAVAC" = x && for ac_prog in "gcj -C" guavac jikes javac
test -n "$JAVA_CC" && break
done
fi
if test -z "$JAVA_CC"; then
ac_ct_JAVA_CC=$JAVA_CC
for ac_prog in javac
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_JAVAC+:} false; then :
if ${ac_cv_prog_ac_ct_JAVA_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$JAVAC"; then
ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
if test -n "$ac_ct_JAVA_CC"; then
ac_cv_prog_ac_ct_JAVA_CC="$ac_ct_JAVA_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $JAVAPREFIX/bin
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_JAVAC="$ac_prog"
ac_cv_prog_ac_ct_JAVA_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@ -3761,53 +3770,42 @@ IFS=$as_save_IFS
fi
fi
JAVAC=$ac_cv_prog_JAVAC
if test -n "$JAVAC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
$as_echo "$JAVAC" >&6; }
ac_ct_JAVA_CC=$ac_cv_prog_ac_ct_JAVA_CC
if test -n "$ac_ct_JAVA_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_JAVA_CC" >&5
$as_echo "$ac_ct_JAVA_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$JAVAC" && break
test -n "$ac_ct_JAVA_CC" && break
done
if test "x$ac_ct_JAVA_CC" = x; then
JAVA_CC=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
JAVA_CC=$ac_ct_JAVA_CC
fi
fi
test "x$JAVAC" = x && as_fn_error $? "no acceptable Java compiler found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVAC works" >&5
$as_echo_n "checking if $JAVAC works... " >&6; }
if ${ac_cv_prog_javac_works+:} false; then :
$as_echo_n "(cached) " >&6
else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 3789 "configure" */
public class Test {
}
EOF
if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; } >/dev/null 2>&1; then
ac_cv_prog_javac_works=yes
else
as_fn_error $? "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
echo "configure: failed program was:" >&5
cat $JAVA_TEST >&5
fi
rm -f $JAVA_TEST $CLASS_TEST
if test "$JAVA_CC" = "gcj"; then
if test "$GCJ_OPTS" = ""; then
GCJ_OPTS=-C
fi
JAVA_CC_OPTS=@GCJ_OPTS@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_works" >&5
$as_echo "$ac_cv_prog_javac_works" >&6; }
test -z "$JAVA_CC" && as_fn_error $? "no acceptable java compiler found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lxml2" >&5

View File

@ -105,7 +105,7 @@ AC_PROG_LEX
AC_PATH_PROG(BISON, bison, bison)
AC_PATH_PROG(PERL, perl, perl)
AX_PKG_SWIG(1.3.29, [], [ AC_MSG_ERROR([SWIG is required to build..]) ])
AX_PROG_JAVAC
AX_PROG_JAVA_CC(javac)
AC_CHECK_LIB(xml2, main,
[LIBXML=-lxml2