commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject cvs commit: jakarta-commons/daemon/src/native/unix/support apjava.m4
Date Thu, 25 Sep 2003 11:13:02 GMT
jfclere     2003/09/25 04:13:02

  Modified:    daemon/src/native/unix/support apjava.m4
  Log:
  Arrange the handling of JAVA_HOME and javac/jar in the PATH.
  javac/jar of the PATH where used instead javac/jar of JAVA_HOME.
  
  Revision  Changes    Path
  1.2       +23 -3     jakarta-commons/daemon/src/native/unix/support/apjava.m4
  
  Index: apjava.m4
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/support/apjava.m4,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apjava.m4	4 Sep 2003 23:28:20 -0000	1.1
  +++ apjava.m4	25 Sep 2003 11:13:02 -0000	1.2
  @@ -76,8 +76,19 @@
     ])
   ])
   
  +dnl AC_PATH_PROG does not work (it checks first PATH then our parameter).
  +dnl so we do 2 checks.
   AC_DEFUN([AP_PROG_JAVAC],[
  -  AC_PATH_PROG(JAVAC,javac,AC_MSG_ERROR([javac not found]),$JAVA_HOME/bin:$PATH)
  +  AC_PATH_PROG(JAVAC,javac,NONE,$JAVA_HOME/bin)
  +  if test "$JAVAC" = "NONE"
  +  then
  +    AC_PATH_PROG(JAVAC_PATH,javac,NONE,$PATH)
  +    JAVAC=$JAVAC_PATH
  +  fi
  +  if test "$JAVAC" = "NONE"
  +  then
  +    AC_MSG_ERROR([javac not found])
  +  fi
     AP_PROG_JAVAC_WORKS()
     AC_PROVIDE([$0])
     AC_SUBST(JAVAC)
  @@ -85,7 +96,16 @@
   ])
   
   AC_DEFUN([AP_PROG_JAR],[
  -  AC_PATH_PROG(JAR,jar,AC_MSG_ERROR([jar not found]),$JAVA_HOME/bin:$PATH)
  +  AC_PATH_PROG(JAR,jar,NONE,$JAVA_HOME/bin)
  +  if test "$JAR" = "NONE"
  +  then
  +    AC_PATH_PROG(JAR_PATH,jar,NONE,$PATH)
  +    JAR=$JAR_PATH
  +  fi
  +  if test "$JAR" = "NONE"
  +  then
  +    AC_MSG_ERROR([jar not found])
  +  fi
     AC_PROVIDE([$0])
     AC_SUBST(JAR)
   ])
  
  
  

Mime
View raw message