commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r161851 - jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in
Date Tue, 19 Apr 2005 07:31:57 GMT
Author: jfclere
Date: Tue Apr 19 00:31:55 2005
New Revision: 161851

URL: http://svn.apache.org/viewcvs?view=rev&rev=161851
Log:
Fix 31613:
- Find default JAVA_HOME
- Correctly set the CFLAGS for the includes.

Modified:
    jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in

Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in?view=diff&r1=161850&r2=161851
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/configure.in Tue Apr 19 00:31:55 2005
@@ -16,7 +16,7 @@
 
 dnl -------------------------------------------------------------------------
 dnl Author  Pier Fumagalli <mailto:pier.fumagalli@eng.sun.com>
-dnl Version $Id: configure.in,v 1.4 2005/01/03 11:05:20 jfclere Exp $
+dnl Version $Id$
 dnl -------------------------------------------------------------------------
 
 dnl -------------------------------------------------------------------------
@@ -47,30 +47,38 @@
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
 dnl -------------------------------------------------------------------------
-dnl Check JAVA environment
-dnl -------------------------------------------------------------------------
-AP_MSG_HEADER([Java compilation tools])
-AP_JAVA()
-AP_PROG_JAVAC()
-AP_PROG_JAR()
-
-dnl -------------------------------------------------------------------------
 dnl Check if this host is supported
 dnl -------------------------------------------------------------------------
 AP_MSG_HEADER([Host support])
 AP_SUPPORTED_HOST()
 if test "$supported_os" = "darwin"
 then
+  if test -z "$JAVA_HOME" -a -d /System/Library/Frameworks/JavaVM.framework/Home; then
+  	JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+  fi
+
   _prevdir=`/bin/pwd`
-  cd $JAVA_HOME
-  cd ..
-  cd Headers
+  if test -n "$JAVA_HOME" -a -d "$JAVA_HOME/include"; then
+    cd "$JAVA_HOME/include"
+  elif test -n "$JAVA_HOME" -a -d "$JAVA_HOME/../Headers"; then
+    cd "$JAVA_HOME/../Headers"
+  else
+    cd /System/Library/Frameworks/JavaVM.framework/Headers
+  fi
   CFLAGS="$CFLAGS -I`/bin/pwd -P`"
   cd $_prevdir
   unset _prevdir
 else
   CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os"
 fi
+
+dnl -------------------------------------------------------------------------
+dnl Check JAVA environment
+dnl -------------------------------------------------------------------------
+AP_MSG_HEADER([Java compilation tools])
+AP_JAVA()
+AP_PROG_JAVAC()
+AP_PROG_JAR()
 
 dnl -------------------------------------------------------------------------
 dnl Add gcc specific CFLAGS.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message