Hello.

I just grabbed classpath from the CVS but I had some problems
getting it to configure properly. The first problem was that
the --with-japhar flag did not accept a directory argument.
This is how other configure scripts work and people will expect
to be able to indicate where japhar is installed like so.

--with-japhar=/some/dir/japhar


The second problem I had was with the use of test -e in the
configure script. I am not sure what -e should but it does
not work at all on my machine. I think -f should be used
instead. There was also one more problem with the way
Makefiles were generated by configure. When using the
AC_OUTPUT macro care must be taken so that each Makefile
is processed before Makefiles in child directories are
processed. If this is not done then a configure in
another directory will fail. So to make a long story short,
I fixed all these problems and I have included a patch
which is just the output of cvs diff at the bottom of
this email.


I hope that helps
Mo DeJong
dejong at cs.umn.edu








Index: acinclude.m4
===================================================================
RCS file: /gd/gnu/anoncvsroot/classpath/acinclude.m4,v
retrieving revision 1.9
diff -u -r1.9 acinclude.m4
--- acinclude.m4        1998/12/31 16:59:05     1.9
+++ acinclude.m4        1999/02/22 04:07:41
@@ -21,7 +21,7 @@
 dnl CLASSPATH_INTERNAL_CHECK_JAPHAR
 AC_DEFUN(CLASSPATH_INTERNAL_CHECK_JAPHAR,
 [
-  AC_PATH_PROG(JAPHAR_CONFIG, japhar-config, "", 
$PATH:/usr/local/japhar/bin:/usr/japhar/bin)
+  AC_PATH_PROG(JAPHAR_CONFIG, japhar-config, "", 
+$with_japhar_bin:$PATH:/usr/local/japhar/bin:/usr/japhar/bin)
   if test "$JAPHAR_CONFIG" = ""; then
     echo "configure: cannot find japhar-config: is Japhar installed?" 1>&2
     exit 1
@@ -52,13 +52,13 @@
   AC_PATH_PROG(JAPHAR_JAVAC, javac, "", $bindir:$PATH)
   AC_PATH_PROG(JAPHAR_JAVAH, japharh, "", $bindir:$PATH)
   AC_MSG_CHECKING(for Japhar classes)
-  if test -e $datadir/classes.zip; then
+  if test -f $datadir/classes.zip; then
     JAPHAR_CLASSLIB=$datadir/classes.zip
-  elif test -e $datadir/classes.jar; then
+  elif test -f $datadir/classes.jar; then
     JAPHAR_CLASSLIB=$datadir/classes.jar
-  elif test -e $datadir/rt.jar; then
+  elif test -f $datadir/rt.jar; then
     JAPHAR_CLASSLIB=$datadir/rt.jar
-  elif test -e $datadir/rt.zip; then
+  elif test -f $datadir/rt.zip; then
     JAPHAR_CLASSLIB=$datadir/rt.zip
   else
     AC_MSG_ERROR(no)
@@ -83,11 +83,16 @@
 AC_DEFUN(CLASSPATH_CHECK_JAPHAR,
 [
   AC_ARG_WITH(japhar, 
-  [  --with-japhar               configure GNU Classpath for Japhar [default=yes]],
+  [  --with-japhar=DIR           configure GNU Classpath for Japhar [default=yes]],
   [
     if test ${withval} = "yes" || test ${withval} = ""; then
-      CLASSPATH_INTERNAL_CHECK_JAPHAR
+      with_japhar_bin=
+    elif test -d "${withval}" && test -d "${withval}/bin"; then
+      with_japhar_bin=${withval}/bin
+    else
+      AC_MSG_ERROR([--with-japhar=${withval} is not valid])
     fi
+    CLASSPATH_INTERNAL_CHECK_JAPHAR
   ],
   [ conditional_with_japhar=false] )
 ])
Index: aclocal.m4
===================================================================
RCS file: /gd/gnu/anoncvsroot/classpath/aclocal.m4,v
retrieving revision 1.6
diff -u -r1.6 aclocal.m4
--- aclocal.m4  1998/12/21 05:32:13     1.6
+++ aclocal.m4  1999/02/22 04:07:41
@@ -33,7 +33,7 @@
 dnl CLASSPATH_INTERNAL_CHECK_JAPHAR
 AC_DEFUN(CLASSPATH_INTERNAL_CHECK_JAPHAR,
 [
-  AC_PATH_PROG(JAPHAR_CONFIG, japhar-config, "", 
$PATH:/usr/local/japhar/bin:/usr/japhar/bin)
+  AC_PATH_PROG(JAPHAR_CONFIG, japhar-config, "", 
+$with_japhar_bin:$PATH:/usr/local/japhar/bin:/usr/japhar/bin)
   if test "$JAPHAR_CONFIG" = ""; then
     echo "configure: cannot find japhar-config: is Japhar installed?" 1>&2
     exit 1
@@ -55,13 +55,13 @@
   AC_PATH_PROG(JAPHAR_JAVAC, javac, "", $bindir:$PATH)
   AC_PATH_PROG(JAPHAR_JAVAH, japharh, "", $bindir:$PATH)
   AC_MSG_CHECKING(for Japhar classes)
-  if test -e $datadir/classes.zip; then
+  if test -f $datadir/classes.zip; then
     JAPHAR_CLASSLIB=$datadir/classes.zip
-  elif test -e $datadir/classes.jar; then
+  elif test -f $datadir/classes.jar; then
     JAPHAR_CLASSLIB=$datadir/classes.jar
-  elif test -e $datadir/rt.jar; then
+  elif test -f $datadir/rt.jar; then
     JAPHAR_CLASSLIB=$datadir/rt.jar
-  elif test -e $datadir/rt.zip; then
+  elif test -f $datadir/rt.zip; then
     JAPHAR_CLASSLIB=$datadir/rt.zip
   else
     AC_MSG_ERROR(no)
@@ -85,12 +85,18 @@
 AC_DEFUN(CLASSPATH_CHECK_JAPHAR,
 [
   AC_ARG_WITH(japhar, 
-  [  --with-japhar               configure GNU Classpath for Japhar [default=yes]],
+  [  --with-japhar=DIR           configure GNU Classpath for Japhar [default=yes]],
   [
     if test ${withval} = "yes" || test ${withval} = ""; then
-      CLASSPATH_INTERNAL_CHECK_JAPHAR
+      with_japhar_bin=
+    elif test -d "${withval}" && test -d "${withval}/bin"; then
+      with_japhar_bin=${withval}/bin
+    else
+      AC_MSG_ERROR([--with-japhar=${withval} is not valid])
     fi
-  ])
+    CLASSPATH_INTERNAL_CHECK_JAPHAR
+  ],
+  [ conditional_with_japhar=false] )
 ])
 
 dnl CLASSPATH_CHECK_KAFFE - checks for which java virtual machine to use
Index: configure.in
===================================================================
RCS file: /gd/gnu/anoncvsroot/classpath/configure.in,v
retrieving revision 1.38
diff -u -r1.38 configure.in
--- configure.in        1999/02/11 08:31:32     1.38
+++ configure.in        1999/02/22 04:07:41
@@ -202,37 +202,37 @@
 
 AC_OUTPUT(Makefile
 doc/Makefile
-gnu/java/io/decode/Makefile
+gnu/Makefile
+gnu/java/Makefile
 gnu/java/io/Makefile
+gnu/java/io/decode/Makefile
 gnu/java/io/encode/Makefile
-gnu/java/lang/reflect/Makefile
 gnu/java/lang/Makefile
-gnu/java/Makefile
+gnu/java/lang/reflect/Makefile
+gnu/java/beans/Makefile
 gnu/java/beans/editors/Makefile
 gnu/java/beans/info/Makefile
-gnu/java/beans/Makefile
 gnu/java/locale/Makefile
-gnu/java/net/content/text/Makefile
-gnu/java/net/content/Makefile
 gnu/java/net/Makefile
+gnu/java/net/content/Makefile
+gnu/java/net/content/text/Makefile
+gnu/java/net/protocol/Makefile
 gnu/java/net/protocol/file/Makefile
 gnu/java/net/protocol/http/Makefile
-gnu/java/net/protocol/Makefile
 gnu/java/security/Makefile
 gnu/java/security/provider/Makefile
-gnu/Makefile
-gnu/tools/serialver/Makefile
 gnu/tools/Makefile
+gnu/tools/serialver/Makefile
+java/Makefile
 java/beans/Makefile
 java/io/Makefile
-java/lang/reflect/Makefile
 java/lang/Makefile
-java/Makefile
+java/lang/reflect/Makefile
 java/math/Makefile
 java/net/Makefile
+java/security/Makefile
 java/security/acl/Makefile
 java/security/interfaces/Makefile
-java/security/Makefile
 java/text/Makefile
 java/util/Makefile
 native/Makefile
@@ -243,16 +243,17 @@
 native/java.util/Makefile
 native/lib/Makefile
 native/vmi/Makefile
-resource/java/util/Makefile
-resource/java/Makefile
 resource/Makefile
-vm/reference/gnu/vm/stack/Makefile
-vm/reference/gnu/vm/Makefile
-vm/reference/gnu/Makefile
-vm/reference/java/lang/reflect/Makefile
-vm/reference/java/lang/Makefile
-vm/reference/java/Makefile
+resource/java/Makefile
+resource/java/util/Makefile
+vm/Makefile
 vm/reference/Makefile
+vm/reference/java/Makefile
+vm/reference/java/lang/Makefile
+vm/reference/java/lang/reflect/Makefile
+vm/reference/gnu/Makefile
+vm/reference/gnu/vm/Makefile
+vm/reference/gnu/vm/stack/Makefile
 vm/Makefile
 lib/deps.sh
 lib/gen-classlist.sh


Reply via email to