OSDN Git Service

* Makefile.am: Added rules for libgcjx library.
[pf3gnuchains/gcc-fork.git] / libjava / configure.in
index 0cbdcb2..81f0d09 100644 (file)
@@ -590,8 +590,8 @@ changequote(<<,>>)
       builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
 changequote([,])
    fi
-   dir="`cd ${builddotdot}/../../gcc && pwd`"
-   if test -x "${dir}/gcj"; then
+   if test -x "${builddotdot}/../../gcc/gcj"; then
+      dir="`cd ${builddotdot}/../../gcc && pwd`"
       GCJ="$dir/gcj -B`pwd`/ -B$dir/"
    else
       CANADIAN=yes
@@ -705,7 +705,8 @@ AC_TRY_COMPILE([#include <netinet/in.h>], [struct sockaddr_in6 addr6;],
   [AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING([for socklen_t in sys/socket.h])
-AC_TRY_COMPILE([#include <sys/socket.h>], [socklen_t x = 5;],
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>], [socklen_t x = 5;],
   [AC_DEFINE(HAVE_SOCKLEN_T)
    AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)])
@@ -761,13 +762,38 @@ else
   multilib_arg=
 fi
 
+AC_PATH_XTRA
+
+AM_CONDITIONAL(NO_X, test "$no_x" = yes)
+
 here=`pwd`
 AC_SUBST(here)
 
+
 AC_OUTPUT(Makefile libgcj.spec libgcj-test.spec gcj/Makefile include/Makefile testsuite/Makefile,
 [if test -n "$CONFIG_FILES"; then
   ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
-fi],
+fi
+
+# Make subdirectories and `.d' files.  Look in both srcdir and
+# builddir for the .java files.
+h=`pwd`
+: > deps.mk
+( (cd $srcdir && find . -name '*.java' -print) ;
+  find . -name '*.java' -print) | \
+   fgrep -v testsuite | \
+   sed -e 's/\.java/.d/' | \
+   while read f; do
+      echo "include $f" >> deps.mk
+      test -f $f || {
+changequote(<<,>>)
+        d=`echo $f | sed -e 's,/[^/]*$,,'`
+changequote([,])
+        $srcdir/../mkinstalldirs $d
+        : > $f
+      }
+   done
+],
 srcdir=${srcdir}
 host=${host}
 target=${target}