bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

update javaexec module


From: Bruno Haible
Subject: update javaexec module
Date: Sat, 22 Jul 2006 17:15:23 +0200
User-agent: KMail/1.9.1

Merge from gettext.

2006-05-17  Bruno Haible  <address@hidden>

        Cygwin portability.
        * javaexec.c (execute_java_class): Test for jview program also on
        Cygwin.

2006-05-09  Bruno Haible  <address@hidden>

        * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set CLASSPATH_SEPARATOR to a
        semicolon.

2006-03-12  Bruno Haible  <address@hidden>

        * javaexec.m4 (gt_JAVAEXEC): Make the result of the test available as
        variable CONF_JAVA, for subsequent autoconf tests. Also log error
        output in config.log.

2006-03-12  Bruno Haible  <address@hidden>

        * javaexec.sh.in: Update for changed javaexec.m4.

*** m4/javaexec.m4      26 Jan 2005 17:01:02 -0000      1.1
--- m4/javaexec.m4      22 Jul 2006 15:13:23 -0000
***************
*** 1,5 ****
! # javaexec.m4 serial 2 (gettext-0.13)
! dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
  dnl with or without modifications, as long as this notice is preserved.
--- 1,5 ----
! # javaexec.m4 serial 4 (gettext-0.15)
! dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
  dnl with or without modifications, as long as this notice is preserved.
***************
*** 12,24 ****
  [
    AC_MSG_CHECKING([for Java virtual machine])
    AC_EGREP_CPP(yes, [
! #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined 
__DJGPP__
    yes
  #endif
  ], CLASSPATH_SEPARATOR=';', CLASSPATH_SEPARATOR=':')
    HAVE_JAVAEXEC=1
    if test -n "$JAVA"; then
!     ac_result="$JAVA"
    else
      pushdef([AC_MSG_CHECKING],[:])dnl
      pushdef([AC_CHECKING],[:])dnl
--- 12,31 ----
  [
    AC_MSG_CHECKING([for Java virtual machine])
    AC_EGREP_CPP(yes, [
! #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined 
__EMX__ || defined __DJGPP__
    yes
  #endif
  ], CLASSPATH_SEPARATOR=';', CLASSPATH_SEPARATOR=':')
+   CONF_JAVA=
+   HAVE_JAVA_ENVVAR=
+   HAVE_GIJ=
+   HAVE_JAVA=
+   HAVE_JRE=
+   HAVE_JVIEW=
    HAVE_JAVAEXEC=1
    if test -n "$JAVA"; then
!     HAVE_JAVA_ENVVAR=1
!     CONF_JAVA="$JAVA"
    else
      pushdef([AC_MSG_CHECKING],[:])dnl
      pushdef([AC_CHECKING],[:])dnl
***************
*** 37,66 ****
      export CLASSPATH
      if test -n "$HAVE_GIJ_IN_PATH" \
         && gij --version >/dev/null 2>/dev/null \
!        ifelse([$1], , , [&& gij $1 >/dev/null 2>/dev/null]); then
        HAVE_GIJ=1
!       ac_result="gij"
      else
        if test -n "$HAVE_JAVA_IN_PATH" \
           && java -version >/dev/null 2>/dev/null \
!          ifelse([$1], , , [&& java $1 >/dev/null 2>/dev/null]); then
          HAVE_JAVA=1
!         ac_result="java"
        else
          if test -n "$HAVE_JRE_IN_PATH" \
             && (jre >/dev/null 2>/dev/null || test $? = 1) \
!            ifelse([$1], , , [&& jre $1 >/dev/null 2>/dev/null]); then
            HAVE_JRE=1
!           ac_result="jre"
          else
            if test -n "$HAVE_JVIEW_IN_PATH" \
               && (jview -? >/dev/null 2>/dev/null || test $? = 1) \
!              ifelse([$1], , , [&& jview $1 >/dev/null 2>/dev/null]); then
              HAVE_JVIEW=1
!             ac_result="jview"
            else
              HAVE_JAVAEXEC=
-             ac_result="no"
            fi
          fi
        fi
--- 44,84 ----
      export CLASSPATH
      if test -n "$HAVE_GIJ_IN_PATH" \
         && gij --version >/dev/null 2>/dev/null \
!        ifelse([$1], , , [&& {
!          echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
!          gij $1 >&AS_MESSAGE_LOG_FD 2>&1
!        }]); then
        HAVE_GIJ=1
!       CONF_JAVA="gij"
      else
        if test -n "$HAVE_JAVA_IN_PATH" \
           && java -version >/dev/null 2>/dev/null \
!          ifelse([$1], , , [&& {
!            echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
!            java $1 >&AS_MESSAGE_LOG_FD 2>&1
!          }]); then
          HAVE_JAVA=1
!         CONF_JAVA="java"
        else
          if test -n "$HAVE_JRE_IN_PATH" \
             && (jre >/dev/null 2>/dev/null || test $? = 1) \
!            ifelse([$1], , , [&& {
!              echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
!              jre $1 >&AS_MESSAGE_LOG_FD 2>&1
!            }]); then
            HAVE_JRE=1
!           CONF_JAVA="jre"
          else
            if test -n "$HAVE_JVIEW_IN_PATH" \
               && (jview -? >/dev/null 2>/dev/null || test $? = 1) \
!              ifelse([$1], , , [&& {
!                echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
!                jview $1 >&AS_MESSAGE_LOG_FD 2>&1
!              }]); then
              HAVE_JVIEW=1
!             CONF_JAVA="jview"
            else
              HAVE_JAVAEXEC=
            fi
          fi
        fi
***************
*** 69,78 ****
        CLASSPATH="$save_CLASSPATH"
      ])
    fi
    AC_MSG_RESULT([$ac_result])
!   AC_SUBST(JAVA)
    AC_SUBST(CLASSPATH)
    AC_SUBST(CLASSPATH_SEPARATOR)
    AC_SUBST(HAVE_GIJ)
    AC_SUBST(HAVE_JAVA)
    AC_SUBST(HAVE_JRE)
--- 87,102 ----
        CLASSPATH="$save_CLASSPATH"
      ])
    fi
+   if test -n "$HAVE_JAVAEXEC"; then
+     ac_result="$CONF_JAVA"
+   else
+     ac_result="no"
+   fi
    AC_MSG_RESULT([$ac_result])
!   AC_SUBST(CONF_JAVA)
    AC_SUBST(CLASSPATH)
    AC_SUBST(CLASSPATH_SEPARATOR)
+   AC_SUBST(HAVE_JAVA_ENVVAR)
    AC_SUBST(HAVE_GIJ)
    AC_SUBST(HAVE_JAVA)
    AC_SUBST(HAVE_JRE)
*** build-aux/javaexec.sh.in    9 Jan 2006 13:46:55 -0000       1.1
--- build-aux/javaexec.sh.in    22 Jul 2006 15:13:23 -0000
***************
*** 1,7 ****
  #!/bin/sh
  # Execute a Java program.
  
! # Copyright (C) 2001 Free Software Foundation, Inc.
  # Written by Bruno Haible <address@hidden>, 2001.
  #
  # This program is free software; you can redistribute it and/or modify
--- 1,7 ----
  #!/bin/sh
  # Execute a Java program.
  
! # Copyright (C) 2001, 2006 Free Software Foundation, Inc.
  # Written by Bruno Haible <address@hidden>, 2001.
  #
  # This program is free software; you can redistribute it and/or modify
***************
*** 16,22 ****
  #
  # You should have received a copy of the GNU General Public License
  # along with this program; if not, write to the Free Software Foundation,
! # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
  
  # This uses the same choices as javaexec.c, but instead of relying on the
  # environment settings at run time, it uses the environment variables
--- 16,22 ----
  #
  # You should have received a copy of the GNU General Public License
  # along with this program; if not, write to the Free Software Foundation,
! # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  
  # This uses the same choices as javaexec.c, but instead of relying on the
  # environment settings at run time, it uses the environment variables
***************
*** 27,35 ****
  #
  # The extra CLASSPATH must have been set prior to calling this script.
  
! CONF_JAVA='@JAVA@'
  CONF_CLASSPATH='@CLASSPATH@'
! if test -n "$CONF_JAVA"; then
    # Combine given CLASSPATH and configured CLASSPATH.
    if test -n "$CLASSPATH"; then
      CLASSPATH="$CLASSPATH${CONF_CLASSPATH:address@hidden@$CONF_CLASSPATH}"
--- 27,35 ----
  #
  # The extra CLASSPATH must have been set prior to calling this script.
  
! CONF_JAVA='@CONF_JAVA@'
  CONF_CLASSPATH='@CLASSPATH@'
! if test -n "@HAVE_JAVA_ENVVAR@"; then
    # Combine given CLASSPATH and configured CLASSPATH.
    if test -n "$CLASSPATH"; then
      CLASSPATH="$CLASSPATH${CONF_CLASSPATH:address@hidden@$CONF_CLASSPATH}"
***************
*** 43,62 ****
    unset JAVA_HOME
    export CLASSPATH
    if test -n "@HAVE_GIJ@"; then
!     test -z "$JAVA_VERBOSE" || echo gij "$@"
!     exec gij "$@"
    else
      if test -n "@HAVE_JAVA@"; then
!       test -z "$JAVA_VERBOSE" || echo java "$@"
!       exec java "$@"
      else
        if test -n "@HAVE_JRE@"; then
!         test -z "$JAVA_VERBOSE" || echo jre "$@"
!         exec jre "$@"
        else
          if test -n "@HAVE_JVIEW@"; then
!           test -z "$JAVA_VERBOSE" || echo jview "$@"
!           exec jview "$@"
          else
            echo 'Java virtual machine not found, try installing gij or set 
$JAVA, then reconfigure' 1>&2
            exit 1
--- 43,66 ----
    unset JAVA_HOME
    export CLASSPATH
    if test -n "@HAVE_GIJ@"; then
!     # In this case, $CONF_JAVA is "gij".
!     test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
!     exec $CONF_JAVA "$@"
    else
      if test -n "@HAVE_JAVA@"; then
!       # In this case, $CONF_JAVA is "java".
!       test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
!       exec $CONF_JAVA "$@"
      else
        if test -n "@HAVE_JRE@"; then
!         # In this case, $CONF_JAVA is "jre".
!         test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
!         exec $CONF_JAVA "$@"
        else
          if test -n "@HAVE_JVIEW@"; then
!           # In this case, $CONF_JAVA is "jview".
!           test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
!           exec $CONF_JAVA "$@"
          else
            echo 'Java virtual machine not found, try installing gij or set 
$JAVA, then reconfigure' 1>&2
            exit 1
*** lib/javaexec.c      14 May 2005 06:03:58 -0000      1.2
--- lib/javaexec.c      22 Jul 2006 15:13:23 -0000
***************
*** 1,5 ****
  /* Execute a Java program.
!    Copyright (C) 2001-2003 Free Software Foundation, Inc.
     Written by Bruno Haible <address@hidden>, 2001.
  
     This program is free software; you can redistribute it and/or modify
--- 1,5 ----
  /* Execute a Java program.
!    Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
     Written by Bruno Haible <address@hidden>, 2001.
  
     This program is free software; you can redistribute it and/or modify
***************
*** 360,367 ****
        }
    }
  
! #if defined _WIN32 || defined __WIN32__
!   /* Win32 */
    {
      static bool jview_tested;
      static bool jview_present;
--- 360,367 ----
        }
    }
  
! #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
!   /* Win32, Cygwin */
    {
      static bool jview_tested;
      static bool jview_present;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]