mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 12:56:26 +00:00
./configure needs to properly enforce java version dependency
Added a javac version check >= 1.8 to configure. refs #234
This commit is contained in:
parent
ee8f07469e
commit
c9b8992fc1
@ -160,7 +160,15 @@ AC_PATH_PROG(SWIG, swig, noswig, "/bin:/usr/bin:/usr/local/bin:/sw/bin")
|
||||
AS_IF([test "$ac_cv_path_SWIG" = "noswig"],AC_MSG_ERROR([could not find swig]),[])
|
||||
AC_PATH_PROG(GNUPLOT, gnuplot, nognuplot)
|
||||
AS_IF([test "$ac_cv_path_GNUPLOT" = "nognuplot"],AC_MSG_NOTICE([could not find gnuplot]),[])
|
||||
dnl AX_COMPARE_VERSION requires awk.
|
||||
AC_PROG_AWK
|
||||
AX_PROG_JAVA_CC(javac)
|
||||
JAVA_VER=`$JAVA_CC -version |& $ac_cv_path_PERL -ne 'print $& if /\d+\.\d+/'`
|
||||
AC_MSG_CHECKING([$JAVA_CC version >= 1.8])
|
||||
AX_COMPARE_VERSION([$JAVA_VER],[ge],[1.8], [AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Trick requires javac version >= 1.8])
|
||||
])
|
||||
|
||||
dnl look for libraries and headers we need to compile
|
||||
AC_PATH_X
|
||||
|
132
configure
vendored
132
configure
vendored
@ -633,10 +633,10 @@ UDUNITS_HOME
|
||||
CLANG
|
||||
LLVM_CONFIG
|
||||
LLVM_HOME
|
||||
PYTHON_EXTRA_LDFLAGS
|
||||
PYTHON_EXTRA_LIBS
|
||||
PYTHON_EXTRA_LDFLAGS
|
||||
PYTHON_SITE_PKG
|
||||
PYTHON_LDFLAGS
|
||||
PYTHON_LIBS
|
||||
PYTHON_CPPFLAGS
|
||||
PYTHON_VERSION
|
||||
PTHREAD_CFLAGS
|
||||
@ -662,6 +662,7 @@ GCJ_OPTS
|
||||
ac_ct_JAVA_CC
|
||||
JAVA_CC_FLAGS
|
||||
JAVA_CC
|
||||
AWK
|
||||
GNUPLOT
|
||||
SWIG
|
||||
PYTHON
|
||||
@ -3688,6 +3689,48 @@ if test "$ac_cv_path_GNUPLOT" = "nognuplot"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: could not find gnuplot" >&5
|
||||
$as_echo "$as_me: could not find gnuplot" >&6;}
|
||||
fi
|
||||
for ac_prog in gawk mawk nawk awk
|
||||
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_AWK+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$AWK"; then
|
||||
ac_cv_prog_AWK="$AWK" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_AWK="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
AWK=$ac_cv_prog_AWK
|
||||
if test -n "$AWK"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
|
||||
$as_echo "$AWK" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$AWK" && break
|
||||
done
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
for ac_prog in javac
|
||||
do
|
||||
@ -3799,6 +3842,49 @@ if test "$JAVA_CC" = "gcj"; then
|
||||
fi
|
||||
test -z "$JAVA_CC" && as_fn_error $? "no acceptable java compiler found in \$PATH" "$LINENO" 5
|
||||
|
||||
JAVA_VER=`$JAVA_CC -version |& $ac_cv_path_PERL -ne 'print $& if /\d+\.\d+/'`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $JAVA_CC version >= 1.8" >&5
|
||||
$as_echo_n "checking $JAVA_CC version >= 1.8... " >&6; }
|
||||
|
||||
|
||||
|
||||
# Used to indicate true or false condition
|
||||
ax_compare_version=false
|
||||
|
||||
# Convert the two version strings to be compared into a format that
|
||||
# allows a simple string comparison. The end result is that a version
|
||||
# string of the form 1.12.5-r617 will be converted to the form
|
||||
# 0001001200050617. In other words, each number is zero padded to four
|
||||
# digits, and non digits are removed.
|
||||
|
||||
ax_compare_version_A=`echo "$JAVA_VER" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
|
||||
-e 's/Z\([0-9]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
|
||||
-e 's/[^0-9]//g'`
|
||||
|
||||
|
||||
ax_compare_version_B=`echo "1.8" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
|
||||
-e 's/Z\([0-9]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
|
||||
-e 's/[^0-9]//g'`
|
||||
|
||||
|
||||
ax_compare_version=`echo "x$ax_compare_version_A
|
||||
x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
|
||||
|
||||
|
||||
|
||||
if test "$ax_compare_version" = "true" ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
as_fn_error $? "Trick requires javac version >= 1.8" "$LINENO" 5
|
||||
|
||||
fi
|
||||
|
||||
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
@ -5100,7 +5186,7 @@ as_fn_error $? "
|
||||
This version of the AC_PYTHON_DEVEL macro
|
||||
doesn't work properly with versions of Python before
|
||||
2.1.0. You may need to re-run configure, setting the
|
||||
variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
|
||||
variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
|
||||
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
|
||||
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
|
||||
to something else than an empty string.
|
||||
@ -5185,7 +5271,7 @@ $as_echo "$PYTHON_CPPFLAGS" >&6; }
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
|
||||
$as_echo_n "checking for Python library path... " >&6; }
|
||||
if test -z "$PYTHON_LDFLAGS"; then
|
||||
if test -z "$PYTHON_LIBS"; then
|
||||
# (makes two attempts to ensure we've got a version number
|
||||
# from the interpreter)
|
||||
ac_python_version=`cat<<EOD | $PYTHON -
|
||||
@ -5243,25 +5329,25 @@ EOD`
|
||||
then
|
||||
# use the official shared library
|
||||
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
|
||||
PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
|
||||
PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library"
|
||||
else
|
||||
# old way: use libpython from python_configdir
|
||||
ac_python_libdir=`$PYTHON -c \
|
||||
"from distutils.sysconfig import get_python_lib as f; \
|
||||
import os; \
|
||||
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
|
||||
PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||
fi
|
||||
|
||||
if test -z "PYTHON_LDFLAGS"; then
|
||||
if test -z "PYTHON_LIBS"; then
|
||||
as_fn_error $? "
|
||||
Cannot determine location of your Python DSO. Please check it was installed with
|
||||
dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
|
||||
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
|
||||
" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
|
||||
$as_echo "$PYTHON_LDFLAGS" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LIBS" >&5
|
||||
$as_echo "$PYTHON_LIBS" >&6; }
|
||||
|
||||
|
||||
#
|
||||
@ -5282,13 +5368,13 @@ $as_echo "$PYTHON_SITE_PKG" >&6; }
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5
|
||||
$as_echo_n "checking python extra libraries... " >&6; }
|
||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5
|
||||
$as_echo "$PYTHON_EXTRA_LIBS" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5
|
||||
$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; }
|
||||
|
||||
|
||||
#
|
||||
@ -5296,13 +5382,13 @@ $as_echo "$PYTHON_EXTRA_LIBS" >&6; }
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5
|
||||
$as_echo_n "checking python extra linking flags... " >&6; }
|
||||
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print (conf('LINKFORSHARED'))"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5
|
||||
$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5
|
||||
$as_echo "$PYTHON_EXTRA_LIBS" >&6; }
|
||||
|
||||
|
||||
#
|
||||
@ -5312,8 +5398,10 @@ $as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; }
|
||||
$as_echo_n "checking consistency of all components of python development environment... " >&6; }
|
||||
# save current global flags
|
||||
ac_save_LIBS="$LIBS"
|
||||
ac_save_LDFLAGS="$LDFLAGS"
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS"
|
||||
LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
|
||||
LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
|
||||
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
@ -5350,6 +5438,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
# turn back to default flags
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
LDFLAGS="$ac_save_LDFLAGS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
|
||||
$as_echo "$pythonexists" >&6; }
|
||||
@ -5360,8 +5449,8 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "
|
||||
Could not link test program to Python. Maybe the main Python library has been
|
||||
installed in some non-standard library path. If so, pass it to configure,
|
||||
via the LDFLAGS environment variable.
|
||||
Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
|
||||
via the LIBS environment variable.
|
||||
Example: ./configure LIBS=\"-L/usr/non-standard-path/python/lib\"
|
||||
============================================================================
|
||||
ERROR!
|
||||
You probably have to install the development version of the Python package
|
||||
@ -6628,6 +6717,7 @@ gives unlimited permission to copy, distribute and modify it."
|
||||
|
||||
ac_pwd='$ac_pwd'
|
||||
srcdir='$srcdir'
|
||||
AWK='$AWK'
|
||||
test -n "\$AWK" || AWK=awk
|
||||
_ACEOF
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user