From aec1df6a9d833174c3acc5be0a10d92065f4b1c3 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 4 Apr 2007 14:45:52 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/makefile.in | 5 +- ase/configure | 134 +++++++++++++++++++++++++++++++++++++++++++- ase/configure.ac | 85 +++++++++++++++++++++++++++- 3 files changed, 218 insertions(+), 6 deletions(-) diff --git a/ase/awk/makefile.in b/ase/awk/makefile.in index 7a2d647e..c3aa378b 100644 --- a/ase/awk/makefile.in +++ b/ase/awk/makefile.in @@ -1,5 +1,5 @@ # -# $Id: makefile.in,v 1.29 2007-03-25 15:02:54 bacon Exp $ +# $Id: makefile.in,v 1.30 2007-04-04 14:45:52 bacon Exp $ # NAME = aseawk @@ -78,6 +78,9 @@ $(TMP_DIR)/extio.o: $(TMP_DIR) $(TMP_DIR)/rex.o: $(TMP_DIR) $(CC) $(CFLAGS) -o $@ -c rex.c +$(TMP_DIR)/jni.o: $(TMP_DIR) + $(CC) $(CFLAGS) -o $@ -c jni.c + $(OUT_DIR): mkdir -p $(OUT_DIR) diff --git a/ase/configure b/ase/configure index 1233e620..c111f84b 100755 --- a/ase/configure +++ b/ase/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.78 . +# From configure.ac Revision: 1.80 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for ase deb-0.1.0. # @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB CPP EGREP BUILDMODE LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB CPP EGREP BUILDMODE _ACJNI_JAVAC LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1309,7 +1309,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Checks for programs. -#AC_PROG_CXX ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2321,6 +2320,8 @@ else fi +#AC_PROG_CXX + # Overrides the default CFLAGS setting if test "$ac_test_CFLAGS" = "set" then @@ -9936,6 +9937,132 @@ then CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE" fi +# +# JNI Configuration - http://autoconf-archive.cryp.to/ac_jni_include_dir.html +# + + + +# _ACJNI_FOLLOW_SYMLINKS +# Follows symbolic links on , +# finally setting variable _ACJNI_FOLLOWED +# -------------------- +# _ACJNI + + + +JNI_INCLUDE_DIRS="" + +#test "x$JAVAC" = x && AC_MSG_ERROR(['\$JAVAC' undefined]) +test "x$JAVAC" = x && JAVAC=javac +# Extract the first word of "$JAVAC", so it can be a program name with args. +set dummy $JAVAC; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path__ACJNI_JAVAC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $_ACJNI_JAVAC in + [\\/]* | ?:[\\/]*) + ac_cv_path__ACJNI_JAVAC="$_ACJNI_JAVAC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path__ACJNI_JAVAC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path__ACJNI_JAVAC" && ac_cv_path__ACJNI_JAVAC="no" + ;; +esac +fi +_ACJNI_JAVAC=$ac_cv_path__ACJNI_JAVAC + +if test -n "$_ACJNI_JAVAC"; then + echo "$as_me:$LINENO: result: $_ACJNI_JAVAC" >&5 +echo "${ECHO_T}$_ACJNI_JAVAC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +test "x$_ACJNI_JAVAC" = xno && { { echo "$as_me:$LINENO: error: $JAVAC could not be found in path" >&5 +echo "$as_me: error: $JAVAC could not be found in path" >&2;} + { (exit 1); exit 1; }; } + +host_os=`uname -s | tr A-Z a-z` + + +# find the include directory relative to the javac executable +_cur=""$_ACJNI_JAVAC"" +while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do + echo "$as_me:$LINENO: checking symlink for $_cur" >&5 +echo $ECHO_N "checking symlink for $_cur... $ECHO_C" >&6 + _slink=`ls -ld "$_cur" | sed 's/.* -> //'` + case "$_slink" in + /*) _cur="$_slink";; + # 'X' avoids triggering unwanted echo options. + *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[^/]*$::'`"$_slink";; + esac + echo "$as_me:$LINENO: result: $_cur" >&5 +echo "${ECHO_T}$_cur" >&6 +done +_ACJNI_FOLLOWED="$_cur" + +_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[^/]*$::'` +case "$host_os" in + darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'` + _JINC="$_JTOPDIR/Headers";; + *) _JINC="$_JTOPDIR/include";; +esac +if test -f "$_JINC/jni.h"; then + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC" +else + _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'` + if test -f "$_JTOPDIR/include/jni.h"; then + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include" + else + { { echo "$as_me:$LINENO: error: cannot find java include files" >&5 +echo "$as_me: error: cannot find java include files" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# get the likely subdirectories for system specific java includes +case "$host_os" in +bsdi*) _JNI_INC_SUBDIRS="bsdos";; +linux*) _JNI_INC_SUBDIRS="linux genunix";; +osf*) _JNI_INC_SUBDIRS="alpha";; +solaris*) _JNI_INC_SUBDIRS="solaris";; +mingw*) _JNI_INC_SUBDIRS="win32";; +cygwin*) _JNI_INC_SUBDIRS="win32";; +*) _JNI_INC_SUBDIRS="genunix";; +esac + +# add any subdirectories that are present +for JINCSUBDIR in $_JNI_INC_SUBDIRS +do + if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR" + fi +done + + +for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS +do + CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR" +done + + ac_config_files="$ac_config_files makefile cmn/makefile awk/makefile lsp/makefile utl/makefile test/awk/makefile test/lsp/makefile" cat >confcache <<\_ACEOF @@ -10566,6 +10693,7 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@BUILDMODE@,$BUILDMODE,;t t +s,@_ACJNI_JAVAC@,$_ACJNI_JAVAC,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/ase/configure.ac b/ase/configure.ac index 21e1ed70..407c643a 100644 --- a/ase/configure.ac +++ b/ase/configure.ac @@ -1,10 +1,10 @@ # -# $Id: configure.ac,v 1.80 2007-03-24 04:24:54 bacon Exp $ +# $Id: configure.ac,v 1.81 2007-04-04 14:45:52 bacon Exp $ # AC_PREREQ(2.53) AC_INIT([ase], [deb-0.1.0]) -AC_REVISION([$Revision: 1.80 $]) +AC_REVISION([$Revision: 1.81 $]) AC_CONFIG_HEADER([cmn/conf_unx.h]) # Checks for programs. @@ -106,5 +106,86 @@ then [CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"] fi +# +# JNI Configuration - http://autoconf-archive.cryp.to/ac_jni_include_dir.html +# + +AC_DEFUN([AC_JNI_INCLUDE_DIR],[ + +JNI_INCLUDE_DIRS="" + +#test "x$JAVAC" = x && AC_MSG_ERROR(['\$JAVAC' undefined]) +test "x$JAVAC" = x && JAVAC=javac +AC_PATH_PROG(_ACJNI_JAVAC, $JAVAC, no) +test "x$_ACJNI_JAVAC" = xno && AC_MSG_ERROR([$JAVAC could not be found in path]) + +host_os=`uname -s | tr [A-Z] [a-z]` + +_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC") +_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'` +case "$host_os" in + darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` + _JINC="$_JTOPDIR/Headers";; + *) _JINC="$_JTOPDIR/include";; +esac +if test -f "$_JINC/jni.h"; then + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC" +else + _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` + if test -f "$_JTOPDIR/include/jni.h"; then + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include" + else + AC_MSG_ERROR([cannot find java include files]) + fi +fi + +# get the likely subdirectories for system specific java includes +case "$host_os" in +bsdi*) _JNI_INC_SUBDIRS="bsdos";; +linux*) _JNI_INC_SUBDIRS="linux genunix";; +osf*) _JNI_INC_SUBDIRS="alpha";; +solaris*) _JNI_INC_SUBDIRS="solaris";; +mingw*) _JNI_INC_SUBDIRS="win32";; +cygwin*) _JNI_INC_SUBDIRS="win32";; +*) _JNI_INC_SUBDIRS="genunix";; +esac + +# add any subdirectories that are present +for JINCSUBDIR in $_JNI_INC_SUBDIRS +do + if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR" + fi +done +]) + +# _ACJNI_FOLLOW_SYMLINKS +# Follows symbolic links on , +# finally setting variable _ACJNI_FOLLOWED +# -------------------- +AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[ +# find the include directory relative to the javac executable +_cur="$1" +while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do + AC_MSG_CHECKING(symlink for $_cur) + _slink=`ls -ld "$_cur" | sed 's/.* -> //'` + case "$_slink" in + /*) _cur="$_slink";; + # 'X' avoids triggering unwanted echo options. + *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";; + esac + AC_MSG_RESULT($_cur) +done +_ACJNI_FOLLOWED="$_cur" +])# _ACJNI + +AC_JNI_INCLUDE_DIR + +for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS +do + CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR" +done + + AC_CONFIG_FILES([makefile cmn/makefile awk/makefile lsp/makefile utl/makefile test/awk/makefile test/lsp/makefile]) AC_OUTPUT