Ignore:
Timestamp:
2020-02-15T18:55:27+13:00 (3 years ago)
Author:
davidb
Message:

Streamlining of how test for JDK/javac is done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/packages/javagdbm/configure

    r30751 r33928  
    22# From configure.in Revision: 26707 .
    33# Guess values for system-dependent variables and create Makefiles.
    4 # Generated by GNU Autoconf 2.68.
     4# Generated by GNU Autoconf 2.69.
    55#
    66#
    7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
    8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
    9 # Foundation, Inc.
     7# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
    108#
    119#
     
    136134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    137135
     136# Use a proper internal environment variable to ensure we don't fall
     137  # into an infinite loop, continuously re-executing ourselves.
     138  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
     139    _as_can_reexec=no; export _as_can_reexec;
     140    # We cannot yet assume a decent shell, so we have to provide a
     141# neutralization value for shells without unset; and this also
     142# works around shells that cannot unset nonexistent variables.
     143# Preserve -v and -x to the replacement shell.
     144BASH_ENV=/dev/null
     145ENV=/dev/null
     146(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
     147case $- in # ((((
     148  *v*x* | *x*v* ) as_opts=-vx ;;
     149  *v* ) as_opts=-v ;;
     150  *x* ) as_opts=-x ;;
     151  * ) as_opts= ;;
     152esac
     153exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
     154# Admittedly, this is quite paranoid, since all the known shells bail
     155# out after a failed `exec'.
     156$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
     157as_fn_exit 255
     158  fi
     159  # We don't want this to propagate to other subprocesses.
     160          { _as_can_reexec=; unset _as_can_reexec;}
    138161if test "x$CONFIG_SHELL" = x; then
    139162  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
     
    169192  exitcode=1; echo positional parameters were not saved.
    170193fi
    171 test x\$exitcode = x0 || exit 1"
     194test x\$exitcode = x0 || exit 1
     195test -x / || exit 1"
    172196  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
    173197  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
     
    214238
    215239      if test "x$CONFIG_SHELL" != x; then :
    216   # We cannot yet assume a decent shell, so we have to provide a
    217     # neutralization value for shells without unset; and this also
    218     # works around shells that cannot unset nonexistent variables.
    219     # Preserve -v and -x to the replacement shell.
    220     BASH_ENV=/dev/null
    221     ENV=/dev/null
    222     (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
    223     export CONFIG_SHELL
    224     case $- in # ((((
    225       *v*x* | *x*v* ) as_opts=-vx ;;
    226       *v* ) as_opts=-v ;;
    227       *x* ) as_opts=-x ;;
    228       * ) as_opts= ;;
    229     esac
    230     exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
     240  export CONFIG_SHELL
     241             # We cannot yet assume a decent shell, so we have to provide a
     242# neutralization value for shells without unset; and this also
     243# works around shells that cannot unset nonexistent variables.
     244# Preserve -v and -x to the replacement shell.
     245BASH_ENV=/dev/null
     246ENV=/dev/null
     247(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
     248case $- in # ((((
     249  *v*x* | *x*v* ) as_opts=-vx ;;
     250  *v* ) as_opts=-v ;;
     251  *x* ) as_opts=-x ;;
     252  * ) as_opts= ;;
     253esac
     254exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
     255# Admittedly, this is quite paranoid, since all the known shells bail
     256# out after a failed `exec'.
     257$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
     258exit 255
    231259fi
    232260
     
    330358
    331359} # as_fn_mkdir_p
     360
     361# as_fn_executable_p FILE
     362# -----------------------
     363# Test if FILE is an executable regular file.
     364as_fn_executable_p ()
     365{
     366  test -f "$1" && test -x "$1"
     367} # as_fn_executable_p
    332368# as_fn_append VAR VALUE
    333369# ----------------------
     
    451487    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
    452488
     489  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
     490  # already done that, so ensure we don't try to do so again and fall
     491  # in an infinite loop.  This has already happened in practice.
     492  _as_can_reexec=no; export _as_can_reexec
    453493  # Don't try to exec as it changes $[0], causing all sort of problems
    454494  # (the dirname of $[0] is not the place where we might find the
     
    485525    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    486526    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    487     # In both cases, we have to default to `cp -p'.
     527    # In both cases, we have to default to `cp -pR'.
    488528    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    489       as_ln_s='cp -p'
     529      as_ln_s='cp -pR'
    490530  elif ln conf$$.file conf$$ 2>/dev/null; then
    491531    as_ln_s=ln
    492532  else
    493     as_ln_s='cp -p'
     533    as_ln_s='cp -pR'
    494534  fi
    495535else
    496   as_ln_s='cp -p'
     536  as_ln_s='cp -pR'
    497537fi
    498538rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
     
    506546fi
    507547
    508 if test -x / >/dev/null 2>&1; then
    509   as_test_x='test -x'
    510 else
    511   if ls -dL / >/dev/null 2>&1; then
    512     as_ls_L_option=L
    513   else
    514     as_ls_L_option=
    515   fi
    516   as_test_x='
    517     eval sh -c '\''
    518       if test -d "$1"; then
    519     test -d "$1/.";
    520       else
    521     case $1 in #(
    522     -*)set "./$1";;
    523     esac;
    524     case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
    525     ???[sx]*):;;*)false;;esac;fi
    526     '\'' sh
    527   '
    528 fi
    529 as_executable_p=$as_test_x
     548as_test_x='test -x'
     549as_executable_p=as_fn_executable_p
    530550
    531551# Sed expression to map a string onto a valid CPP name.
     
    611631GDBM_INCLUDE
    612632GDBM_LIBPATH
    613 javagdbm_cv_path_java
    614 javagdbm_cv_path_javah
    615 JAVA_HOME
     633JAVACFLAGS
     634JAVAC
    616635EGREP
    617636GREP
     
    660679oldincludedir
    661680includedir
     681runstatedir
    662682localstatedir
    663683sharedstatedir
     
    731751sharedstatedir='${prefix}/com'
    732752localstatedir='${prefix}/var'
     753runstatedir='${localstatedir}/run'
    733754includedir='${prefix}/include'
    734755oldincludedir='/usr/include'
     
    9831004    silent=yes ;;
    9841005
     1006  -runstatedir | --runstatedir | --runstatedi | --runstated \
     1007  | --runstate | --runstat | --runsta | --runst | --runs \
     1008  | --run | --ru | --r)
     1009    ac_prev=runstatedir ;;
     1010  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
     1011  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
     1012  | --run=* | --ru=* | --r=*)
     1013    runstatedir=$ac_optarg ;;
     1014
    9851015  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    9861016    ac_prev=sbindir ;;
     
    11201150        datadir sysconfdir sharedstatedir localstatedir includedir \
    11211151        oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
    1122         libdir localedir mandir
     1152        libdir localedir mandir runstatedir
    11231153do
    11241154  eval ac_val=\$$ac_var
     
    11481178  if test "x$build_alias" = x; then
    11491179    cross_compiling=maybe
    1150     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
    1151     If a cross compiler is detected then cross compile mode will be used" >&2
    11521180  elif test "x$build_alias" != "x$host_alias"; then
    11531181    cross_compiling=yes
     
    12751303  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
    12761304  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
     1305  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
    12771306  --libdir=DIR            object code libraries [EPREFIX/lib]
    12781307  --includedir=DIR        C header files [PREFIX/include]
     
    13851414  cat <<\_ACEOF
    13861415configure
    1387 generated by GNU Autoconf 2.68
    1388 
    1389 Copyright (C) 2010 Free Software Foundation, Inc.
     1416generated by GNU Autoconf 2.69
     1417
     1418Copyright (C) 2012 Free Software Foundation, Inc.
    13901419This configure script is free software; the Free Software Foundation
    13911420gives unlimited permission to copy, distribute and modify it.
     
    14951524{
    14961525static int test_array [1 - 2 * !(($2) >= 0)];
    1497 test_array [0] = 0
     1526test_array [0] = 0;
     1527return test_array [0];
    14981528
    14991529  ;
     
    15111541{
    15121542static int test_array [1 - 2 * !(($2) <= $ac_mid)];
    1513 test_array [0] = 0
     1543test_array [0] = 0;
     1544return test_array [0];
    15141545
    15151546  ;
     
    15371568{
    15381569static int test_array [1 - 2 * !(($2) < 0)];
    1539 test_array [0] = 0
     1570test_array [0] = 0;
     1571return test_array [0];
    15401572
    15411573  ;
     
    15531585{
    15541586static int test_array [1 - 2 * !(($2) >= $ac_mid)];
    1555 test_array [0] = 0
     1587test_array [0] = 0;
     1588return test_array [0];
    15561589
    15571590  ;
     
    15871620{
    15881621static int test_array [1 - 2 * !(($2) <= $ac_mid)];
    1589 test_array [0] = 0
     1622test_array [0] = 0;
     1623return test_array [0];
    15901624
    15911625  ;
     
    17511785       } && test -s conftest$ac_exeext && {
    17521786     test "$cross_compiling" = yes ||
    1753      $as_test_x conftest$ac_exeext
     1787     test -x conftest$ac_exeext
    17541788       }; then :
    17551789  ac_retval=0
     
    17741808
    17751809It was created by $as_me, which was
    1776 generated by GNU Autoconf 2.68.  Invocation command line was
     1810generated by GNU Autoconf 2.69.  Invocation command line was
    17771811
    17781812  $ $0 $@
     
    20322066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    20332067as_fn_error $? "failed to load site script $ac_site_file
    2034 See \`config.log' for more details" "$LINENO" 5 ; }
     2068See \`config.log' for more details" "$LINENO" 5; }
    20352069  fi
    20362070done
     
    21802214case $ac_cv_build in
    21812215*-*-*) ;;
    2182 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
     2216*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
    21832217esac
    21842218build=$ac_cv_build
     
    22132247case $ac_cv_host in
    22142248*-*-*) ;;
    2215 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
     2249*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
    22162250esac
    22172251host=$ac_cv_host
     
    22462280case $ac_cv_target in
    22472281*-*-*) ;;
    2248 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
     2282*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
    22492283esac
    22502284target=$ac_cv_target
     
    22962330  test -z "$as_dir" && as_dir=.
    22972331    for ac_exec_ext in '' $ac_executable_extensions; do
    2298   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    22992333    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    23002334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    23362370  test -z "$as_dir" && as_dir=.
    23372371    for ac_exec_ext in '' $ac_executable_extensions; do
    2338   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    23392373    ac_cv_prog_ac_ct_CC="gcc"
    23402374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    23892423  test -z "$as_dir" && as_dir=.
    23902424    for ac_exec_ext in '' $ac_executable_extensions; do
    2391   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    23922426    ac_cv_prog_CC="${ac_tool_prefix}cc"
    23932427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    24302464  test -z "$as_dir" && as_dir=.
    24312465    for ac_exec_ext in '' $ac_executable_extensions; do
    2432   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    24332467    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
    24342468       ac_prog_rejected=yes
     
    24882522  test -z "$as_dir" && as_dir=.
    24892523    for ac_exec_ext in '' $ac_executable_extensions; do
    2490   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    24912525    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    24922526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    25322566  test -z "$as_dir" && as_dir=.
    25332567    for ac_exec_ext in '' $ac_executable_extensions; do
    2534   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    25352569    ac_cv_prog_ac_ct_CC="$ac_prog"
    25362570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     
    25752609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    25762610as_fn_error $? "no acceptable C compiler found in \$PATH
    2577 See \`config.log' for more details" "$LINENO" 5 ; }
     2611See \`config.log' for more details" "$LINENO" 5; }
    25782612
    25792613# Provide some information about the compiler.
     
    26902724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    26912725as_fn_error 77 "C compiler cannot create executables
    2692 See \`config.log' for more details" "$LINENO" 5 ; }
     2726See \`config.log' for more details" "$LINENO" 5; }
    26932727else
    26942728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     
    27332767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    27342768as_fn_error $? "cannot compute suffix of executables: cannot compile and link
    2735 See \`config.log' for more details" "$LINENO" 5 ; }
     2769See \`config.log' for more details" "$LINENO" 5; }
    27362770fi
    27372771rm -f conftest conftest$ac_cv_exeext
     
    27922826as_fn_error $? "cannot run C compiled programs.
    27932827If you meant to cross compile, use \`--host'.
    2794 See \`config.log' for more details" "$LINENO" 5 ; }
     2828See \`config.log' for more details" "$LINENO" 5; }
    27952829    fi
    27962830  fi
     
    28442878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    28452879as_fn_error $? "cannot compute suffix of object files: cannot compile
    2846 See \`config.log' for more details" "$LINENO" 5 ; }
     2880See \`config.log' for more details" "$LINENO" 5; }
    28472881fi
    28482882rm -f conftest.$ac_cv_objext conftest.$ac_ext
     
    29783012#include <stdarg.h>
    29793013#include <stdio.h>
    2980 #include <sys/types.h>
    2981 #include <sys/stat.h>
     3014struct stat;
    29823015/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
    29833016struct buf { int x; };
     
    31013134    for ac_prog in ginstall scoinst install; do
    31023135      for ac_exec_ext in '' $ac_executable_extensions; do
    3103     if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
     3136    if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
    31043137      if test $ac_prog = install &&
    31053138        grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
     
    33243357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    33253358as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
    3326 See \`config.log' for more details" "$LINENO" 5 ; }
     3359See \`config.log' for more details" "$LINENO" 5; }
    33273360fi
    33283361
     
    33503383    for ac_exec_ext in '' $ac_executable_extensions; do
    33513384      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
    3352       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
     3385      as_fn_executable_p "$ac_path_GREP" || continue
    33533386# Check for GNU ac_path_GREP and select it if it is found.
    33543387  # Check for GNU $ac_path_GREP
     
    34163449    for ac_exec_ext in '' $ac_executable_extensions; do
    34173450      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
    3418       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
     3451      as_fn_executable_p "$ac_path_EGREP" || continue
    34193452# Check for GNU ac_path_EGREP and select it if it is found.
    34203453  # Check for GNU $ac_path_EGREP
     
    36093642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    36103643as_fn_error 77 "cannot compute sizeof (void *)
    3611 See \`config.log' for more details" "$LINENO" 5 ; }
     3644See \`config.log' for more details" "$LINENO" 5; }
    36123645   else
    36133646     ac_cv_sizeof_void_p=0
     
    36423675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    36433676as_fn_error 77 "cannot compute sizeof (int)
    3644 See \`config.log' for more details" "$LINENO" 5 ; }
     3677See \`config.log' for more details" "$LINENO" 5; }
    36453678   else
    36463679     ac_cv_sizeof_int=0
     
    36753708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    36763709as_fn_error 77 "cannot compute sizeof (long)
    3677 See \`config.log' for more details" "$LINENO" 5 ; }
     3710See \`config.log' for more details" "$LINENO" 5; }
    36783711   else
    36793712     ac_cv_sizeof_long=0
     
    36953728######## check for the JDK and tools within the JDK
    36963729######## look in the JAVA_HOME environment variable at configure-time
    3697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the JDK" >&5
    3698 $as_echo_n "checking for the JDK... " >&6; }
    3699 if test "z$JAVA_HOME" != z &&
    3700    test -d $JAVA_HOME &&
    3701   (test -d $JAVA_HOME/bin)
    3702 # The following used to be the test, but failed on newer versions of MacOS
    3703 # Cut back to something simpler, and rely on the later tests for JNIINC to confirm
    3704 # files like 'jni.h' can be found
     3730#AC_MSG_CHECKING([for the JDK])
     3731#if test "z$JAVA_HOME" != z &&
    37053732#   test -d $JAVA_HOME &&
    3706 #   (test -d $JAVA_HOME/include || test -d $JAVA_HOME/../Headers)
    3707 then
    3708 
    3709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $JAVA_HOME" >&5
    3710 $as_echo "found in $JAVA_HOME" >&6; }
    3711 else
    3712     as_fn_error $? "not found in \$JAVA_HOME" "$LINENO" 5
    3713 fi
    3714 
    3715 # TODO: Check for specific header files in the JDK, or
    3716 # functions/definitions within those headers?
    3717 
    3718 # TODO: guess which include directory to use under the JDK
    3719 
    3720 # Extract the first word of "javah", so it can be a program name with args.
    3721 set dummy javah; ac_word=$2
     3733#  (test -d $JAVA_HOME/bin)
     3734## The following used to be the test, but failed on newer versions of MacOS
     3735## Cut back to something simpler, and rely on the later tests for JNIINC to confirm
     3736## files like 'jni.h' can be found
     3737##   test -d $JAVA_HOME &&
     3738##   (test -d $JAVA_HOME/include || test -d $JAVA_HOME/../Headers)
     3739#then
     3740#   AC_SUBST(JAVA_HOME)
     3741#   AC_MSG_RESULT([found in $JAVA_HOME])
     3742#else
     3743#   AC_MSG_ERROR([not found in \$JAVA_HOME])
     3744#fi
     3745
     3746## TODO: Check for specific header files in the JDK, or
     3747## functions/definitions within those headers?
     3748
     3749## TODO: guess which include directory to use under the JDK
     3750
     3751#AC_PATH_PROG(javagdbm_cv_path_javah, javah, missing_javah)
     3752#if test "$javagdbm_cv_path_javah" = missing_javah; then
     3753#   AC_MSG_ERROR([javah not found.])
     3754#fi
     3755
     3756#AC_PATH_PROG(javagdbm_cv_path_java, java, missing)
     3757#if test "$javagdbm_cv_path_java" = missing; then
     3758#   AC_MSG_ERROR([java not found.])
     3759#fi
     3760
     3761# Replacing the above with a more streamlined test for 'javac'
     3762# This should have the advantage of meaning its not mandated
     3763# that JAVA_HOME must be set for it to locate a javac
     3764
     3765
     3766if test "x$JAVAC" = x ; then
     3767    if test "x$JAVAPREFIX" = x; then
     3768    test "x$JAVAC" = x && for ac_prog in javac$EXEEXT
     3769do
     3770  # Extract the first word of "$ac_prog", so it can be a program name with args.
     3771set dummy $ac_prog; ac_word=$2
    37223772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    37233773$as_echo_n "checking for $ac_word... " >&6; }
    3724 if ${ac_cv_path_javagdbm_cv_path_javah+:} false; then :
     3774if ${ac_cv_prog_JAVAC+:} false; then :
    37253775  $as_echo_n "(cached) " >&6
    37263776else
    3727   case $javagdbm_cv_path_javah in
    3728   [\\/]* | ?:[\\/]*)
    3729   ac_cv_path_javagdbm_cv_path_javah="$javagdbm_cv_path_javah" # Let the user override the test with a path.
    3730   ;;
    3731   *)
    3732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3777  if test -n "$JAVAC"; then
     3778  ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
     3779else
     3780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    37333781for as_dir in $PATH
    37343782do
     
    37363784  test -z "$as_dir" && as_dir=.
    37373785    for ac_exec_ext in '' $ac_executable_extensions; do
    3738   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    3739     ac_cv_path_javagdbm_cv_path_javah="$as_dir/$ac_word$ac_exec_ext"
     3786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3787    ac_cv_prog_JAVAC="$ac_prog"
    37403788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    37413789    break 2
     
    37453793IFS=$as_save_IFS
    37463794
    3747   test -z "$ac_cv_path_javagdbm_cv_path_javah" && ac_cv_path_javagdbm_cv_path_javah="missing_javah"
    3748   ;;
    3749 esac
    3750 fi
    3751 javagdbm_cv_path_javah=$ac_cv_path_javagdbm_cv_path_javah
    3752 if test -n "$javagdbm_cv_path_javah"; then
    3753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $javagdbm_cv_path_javah" >&5
    3754 $as_echo "$javagdbm_cv_path_javah" >&6; }
     3795fi
     3796fi
     3797JAVAC=$ac_cv_prog_JAVAC
     3798if test -n "$JAVAC"; then
     3799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
     3800$as_echo "$JAVAC" >&6; }
    37553801else
    37563802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     
    37593805
    37603806
    3761 if test "$javagdbm_cv_path_javah" = missing_javah; then
    3762     as_fn_error $? "javah not found." "$LINENO" 5
    3763 fi
    3764 
    3765 # Extract the first word of "java", so it can be a program name with args.
    3766 set dummy java; ac_word=$2
     3807  test -n "$JAVAC" && break
     3808done
     3809
     3810  else
     3811    test "x$JAVAC" = x && for ac_prog in javac$EXEEXT
     3812do
     3813  # Extract the first word of "$ac_prog", so it can be a program name with args.
     3814set dummy $ac_prog; ac_word=$2
    37673815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    37683816$as_echo_n "checking for $ac_word... " >&6; }
    3769 if ${ac_cv_path_javagdbm_cv_path_java+:} false; then :
     3817if ${ac_cv_prog_JAVAC+:} false; then :
    37703818  $as_echo_n "(cached) " >&6
    37713819else
    3772   case $javagdbm_cv_path_java in
    3773   [\\/]* | ?:[\\/]*)
    3774   ac_cv_path_javagdbm_cv_path_java="$javagdbm_cv_path_java" # Let the user override the test with a path.
    3775   ;;
    3776   *)
    3777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3820  if test -n "$JAVAC"; then
     3821  ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
     3822else
     3823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    37783824for as_dir in $PATH
    37793825do
     
    37813827  test -z "$as_dir" && as_dir=.
    37823828    for ac_exec_ext in '' $ac_executable_extensions; do
    3783   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    3784     ac_cv_path_javagdbm_cv_path_java="$as_dir/$ac_word$ac_exec_ext"
     3829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3830    ac_cv_prog_JAVAC="$ac_prog"
    37853831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    37863832    break 2
     
    37903836IFS=$as_save_IFS
    37913837
    3792   test -z "$ac_cv_path_javagdbm_cv_path_java" && ac_cv_path_javagdbm_cv_path_java="missing"
    3793   ;;
    3794 esac
    3795 fi
    3796 javagdbm_cv_path_java=$ac_cv_path_javagdbm_cv_path_java
    3797 if test -n "$javagdbm_cv_path_java"; then
    3798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $javagdbm_cv_path_java" >&5
    3799 $as_echo "$javagdbm_cv_path_java" >&6; }
     3838fi
     3839fi
     3840JAVAC=$ac_cv_prog_JAVAC
     3841if test -n "$JAVAC"; then
     3842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
     3843$as_echo "$JAVAC" >&6; }
    38003844else
    38013845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     
    38043848
    38053849
    3806 if test "$javagdbm_cv_path_java" = missing; then
    3807     as_fn_error $? "java not found." "$LINENO" 5
    3808 fi
     3850  test -n "$JAVAC" && break
     3851done
     3852test -n "$JAVAC" || JAVAC="$JAVAPREFIX"
     3853
     3854  fi
     3855  test "x$JAVAC" = x && as_fn_error $? "no acceptable Java compiler found in \$PATH" "$LINENO" 5
     3856else
     3857  echo "Checking for javac... $JAVAC"
     3858fi
     3859
     3860
     3861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVAC works" >&5
     3862$as_echo_n "checking if $JAVAC works... " >&6; }
     3863if ${ac_cv_prog_javac_works+:} false; then :
     3864  $as_echo_n "(cached) " >&6
     3865else
     3866
     3867JAVA_TEST=Test.java
     3868CLASS_TEST=Test.class
     3869cat << \EOF > $JAVA_TEST
     3870/* #line 3870 "configure" */
     3871public class Test {
     3872}
     3873EOF
     3874if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST'
     3875  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
     3876  (eval $ac_try) 2>&5
     3877  ac_status=$?
     3878  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     3879  test $ac_status = 0; }; } >/dev/null 2>&1; then
     3880  ac_cv_prog_javac_works=yes
     3881else
     3882  as_fn_error $? "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
     3883  echo "configure: failed program was:" >&5
     3884  cat $JAVA_TEST >&5
     3885fi
     3886rm -f $JAVA_TEST $CLASS_TEST
     3887
     3888fi
     3889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_works" >&5
     3890$as_echo "$ac_cv_prog_javac_works" >&6; }
     3891if test "x$JAVACFLAGS" = x ; then
     3892  JAVACFLAGS="-source 1.4 -target 1.4"
     3893fi
     3894
     3895
     3896
    38093897
    38103898# check for gdbm library
     
    39444032  JNISUFFIX="jnilib"
    39454033  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
    3946   if test -d "$JAVA_HOME/include/darwin"; then
    3947       JNICFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
    3948   fi
    39494034fi
    39504035if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then
     
    44204505    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    44214506    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    4422     # In both cases, we have to default to `cp -p'.
     4507    # In both cases, we have to default to `cp -pR'.
    44234508    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    4424       as_ln_s='cp -p'
     4509      as_ln_s='cp -pR'
    44254510  elif ln conf$$.file conf$$ 2>/dev/null; then
    44264511    as_ln_s=ln
    44274512  else
    4428     as_ln_s='cp -p'
     4513    as_ln_s='cp -pR'
    44294514  fi
    44304515else
    4431   as_ln_s='cp -p'
     4516  as_ln_s='cp -pR'
    44324517fi
    44334518rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
     
    44894574fi
    44904575
    4491 if test -x / >/dev/null 2>&1; then
    4492   as_test_x='test -x'
    4493 else
    4494   if ls -dL / >/dev/null 2>&1; then
    4495     as_ls_L_option=L
    4496   else
    4497     as_ls_L_option=
    4498   fi
    4499   as_test_x='
    4500     eval sh -c '\''
    4501       if test -d "$1"; then
    4502     test -d "$1/.";
    4503       else
    4504     case $1 in #(
    4505     -*)set "./$1";;
    4506     esac;
    4507     case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
    4508     ???[sx]*):;;*)false;;esac;fi
    4509     '\'' sh
    4510   '
    4511 fi
    4512 as_executable_p=$as_test_x
     4576
     4577# as_fn_executable_p FILE
     4578# -----------------------
     4579# Test if FILE is an executable regular file.
     4580as_fn_executable_p ()
     4581{
     4582  test -f "$1" && test -x "$1"
     4583} # as_fn_executable_p
     4584as_test_x='test -x'
     4585as_executable_p=as_fn_executable_p
    45134586
    45144587# Sed expression to map a string onto a valid CPP name.
     
    45324605ac_log="
    45334606This file was extended by $as_me, which was
    4534 generated by GNU Autoconf 2.68.  Invocation command line was
     4607generated by GNU Autoconf 2.69.  Invocation command line was
    45354608
    45364609  CONFIG_FILES    = $CONFIG_FILES
     
    45854658ac_cs_version="\\
    45864659config.status
    4587 configured by $0, generated by GNU Autoconf 2.68,
     4660configured by $0, generated by GNU Autoconf 2.69,
    45884661  with options \\"\$ac_cs_config\\"
    45894662
    4590 Copyright (C) 2010 Free Software Foundation, Inc.
     4663Copyright (C) 2012 Free Software Foundation, Inc.
    45914664This config.status script is free software; the Free Software Foundation
    45924665gives unlimited permission to copy, distribute and modify it."
     
    46664739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    46674740if \$ac_cs_recheck; then
    4668   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
     4741  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
    46694742  shift
    46704743  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
     
    46994772    "java/Makefile") CONFIG_FILES="$CONFIG_FILES java/Makefile" ;;
    47004773
    4701   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
     4774  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
    47024775  esac
    47034776done
     
    49074980  case $ac_mode$ac_tag in
    49084981  :[FHL]*:*);;
    4909   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
     4982  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
    49104983  :[FH]-) ac_tag=-:-;;
    49114984  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
     
    49355008       *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
    49365009       esac ||
    4937        as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
     5010       as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
    49385011      esac
    49395012      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
     
    49625035    case $ac_tag in
    49635036    *:-:* | *:-) cat >"$ac_tmp/stdin" \
    4964       || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
     5037      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
    49655038    esac
    49665039    ;;
Note: See TracChangeset for help on using the changeset viewer.