/[classpath]/gjdoc/m4/ac_prog_jar.m4
ViewVC logotype

Diff of /gjdoc/m4/ac_prog_jar.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by julian, Wed Feb 9 20:33:55 2005 UTC revision 1.3 by julian, Mon Feb 14 23:05:31 2005 UTC
# Line 1  Line 1 
1  dnl Available from the GNU Autoconf Macro Archive at:  dnl Available from the GNU Autoconf Macro Archive at:
2  dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_jar.html  dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_jar.html
3  dnl  dnl
4  dnl Changes for gjdoc: check for "fastjar, jar", not only "jar";  dnl Changes for gjdoc:
5  dnl output warning if detected jar is kaffe jar.  dnl - check for "fastjar, jar", not only "jar";
6    dnl - output warning if detected jar is kaffe jar.
7  dnl  dnl
8  AC_DEFUN([AC_PROG_JAR],[  AC_DEFUN([AC_PROG_JAR],[
9  AC_REQUIRE([AC_EXEEXT])dnl  AC_REQUIRE([AC_EXEEXT])dnl
# Line 11  if test "x$JAVAPREFIX" = x; then Line 12  if test "x$JAVAPREFIX" = x; then
12  else  else
13          test "x$JAR" = x && AC_CHECK_PROGS(JAR, fastjar$EXEEXT jar$EXEEXT, $JAVAPREFIX)          test "x$JAR" = x && AC_CHECK_PROGS(JAR, fastjar$EXEEXT jar$EXEEXT, $JAVAPREFIX)
14  fi  fi
15  test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH])  
16  grep kaffe\.tools\.jar\.Jar $JAR >/dev/null || \  dnl Complain if not found
17    AC_MSG_WARN([The build seems to be using the Jar tool that comes with  test "x$JAR" = "x" && AC_MSG_ERROR([no acceptable jar program found in \$PATH])
18  Kaffe. Note that there are known issues in some versions of this tool.  
19    dnl Strip any parameters
20    sed_expr_param=['s/[ ][^"]*$//']
21    jarabs=`echo $JAR | sed -e "$sed_expr_param"`
22    
23    dnl Convert ~/ to $HOME/
24    sed_expr_home="s|^~/|$HOME/|"
25    jarabs=`echo $jarabs | sed -e "$sed_expr_home"`
26    
27    dnl If not already absolute filename, find on PATH
28    sed_expr_abspath=['s/^~?\/.*$//']
29    if (test `echo $jarabs | sed -e "$sed_expr_abspath"`); then
30      dnl Stolen from libtool.m4:
31      lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
32      for dir in $PATH; do
33        IFS="$lt_save_ifs"
34        if (test -f $dir/$jarabs || test -f $dir/$jarabs$ac_exeext); then
35          jarabs="$dir/$jarabs"
36          break
37        fi
38      done
39    fi
40    
41    dnl Warn if it's the kaffe jar
42    grep 'kaffe\.tools\.jar\.Jar' "$jarabs" >/dev/null
43    test "$?" != "0" || \
44      AC_MSG_WARN([
45    The build seems to be using the Jar tool that comes with Kaffe.  Note
46    that there are known issues in some versions of this tool.
47    Unfortunately it does not support any --version option, so I can't
48    detect whether your version works.
49    
50  If you see error messages from the Jar tool, or the build hangs,  If you see error messages from the Jar tool, or the build hangs,
51  please set environment variable JAR to a working Jar tool.])  please set environment variable JAR to a working Jar tool.
52    ])
53  AC_PROVIDE([$0])dnl  AC_PROVIDE([$0])dnl
54  ])  ])

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26