Changeset 1733 for trunk/configure.in


Ignore:
Timestamp:
May 24, 2010, 3:48:01 PM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r1728 r1733  
    452452AC_SUBST(RUBY_PLATFORM)
    453453
    454 # TODO: Check that these actually exist.
    455 JAVA=/apps/java/bin/java
    456 JAVAC=/apps/java/bin/javac
    457 JAVAH=/apps/java/bin/javah
    458 
    459 # TODO: Find the java install from path to java exectuable.
    460 JAVA_HOME=/apps/java/jdk1.6.0_01
    461 
    462 # TODO: find the location of jni.h and jni_md.h.
    463 # Obviously the linux subdir won't exist on all platforms.
    464 JAVA_INCLUDES="-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/linux"
     454rappture_with_java="yes"
     455JAVA=""
     456JAVAH=""
     457JAVAC=""
     458JAVA_DEV_PKG="no"
     459
     460AC_ARG_WITH(java,
     461  AS_HELP_STRING([--with-java=PATH], [absolute path to java executable]),
     462  [rappture_with_java=$with_val])
     463if test "${rappture_with_java}" != "no" ; then
     464  if test "${rappture_with_java}" = "yes" ; then
     465    AC_PATH_PROG(JAVA, java)
     466    AC_PATH_PROG(JAVAC, javac)
     467    AC_PATH_PROG(JAVAH, javah)
     468  else
     469    AC_PATH_PROG(JAVA, java, [],
     470      [${rappture_with_java}/bin/java:${rappture_with_java}])
     471    AC_PATH_PROG(JAVAC, javac, [],
     472      [${rappture_with_java}/bin/java:${rappture_with_java}])
     473    AC_PATH_PROG(JAVAH, javah, [],
     474      [${rappture_with_java}/bin/java:${rappture_with_java}])
     475  fi
     476fi
     477JDK=
     478JAVA_HOME=
     479JAVA_INC_DIR=
     480JAVA_INC_SPEC=
     481
     482# If java exists, let's look for the jni.h file.
     483if test "x${JAVA}" != "x" ; then
     484  for d in \
     485   /apps/java/jdk1.6.0_01 \
     486   /opt/icedtea6-* \
     487   /opt/sun-jdk-1.6* \
     488   /opt/sun-jdk-1.5*
     489  do
     490    if test -r "${d}/include/jni.h" ; then
     491      JDK=${d}
     492      break;
     493    fi
     494  done
     495  JAVA_HOME=$JDK
     496  JAVA_INC_DIR=${JDK}/include
     497  JAVA_INC_SPEC="-I${JDK}/include -I${JDK}/include/linux"
     498fi
    465499
    466500AC_SUBST(JAVA)
     
    468502AC_SUBST(JAVAH)
    469503AC_SUBST(JAVA_HOME)
    470 AC_SUBST(JAVA_INCLUDES)
     504AC_SUBST(JAVA_INC_DIR)
     505AC_SUBST(JAVA_INC_SPEC)
    471506
    472507RP_BASE=`pwd`
     
    560595    gui/scripts/Makefile
    561596    instant/Makefile
     597    instant/irappture
    562598    lang/Makefile
    563599    lang/java/Makefile
Note: See TracChangeset for help on using the changeset viewer.