From 3cfe718359cecfcfbd454e2ace608dba521f0779 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 5 Apr 2007 10:14:36 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/makefile.in | 21 ++++-- ase/configure | 171 +++++++++++++++++++++----------------------- ase/configure.ac | 136 ++++++++++++++++------------------- 3 files changed, 161 insertions(+), 167 deletions(-) diff --git a/ase/awk/makefile.in b/ase/awk/makefile.in index c3aa378b..c75b292a 100644 --- a/ase/awk/makefile.in +++ b/ase/awk/makefile.in @@ -1,20 +1,24 @@ # -# $Id: makefile.in,v 1.30 2007-04-04 14:45:52 bacon Exp $ +# $Id: makefile.in,v 1.31 2007-04-05 10:14:36 bacon Exp $ # NAME = aseawk CC = @CC@ AR = ar -MAKE = @MAKE@ RANLIB = @RANLIB@ CFLAGS = @CFLAGS@ -I@abs_top_builddir@/.. LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ MODE = @BUILDMODE@ +JAVAC = @JAVAC@ +CFLAGS_JNI = @CFLAGS_JNI@ +JNI = @JNI@ + OUT_DIR = ../$(MODE)/lib OUT_FILE = $(OUT_DIR)/lib$(NAME).a +OUT_FILE_JNI = $(OUT_DIR)/lib$(NAME)_jni.so TMP_DIR = $(MODE) @@ -33,11 +37,20 @@ OBJ_FILES = \ $(TMP_DIR)/extio.o \ $(TMP_DIR)/rex.o -lib: $(OUT_FILE) +OBJ_FILES_JNI = $(TMP_DIR)/jni.o + +lib: build$(JNI) + +build: $(OUT_FILE) + +buildjni: build $(OUT_FILE_JNI) $(OUT_FILE): $(OBJ_FILES) $(OUT_DIR) $(AR) cr $(OUT_FILE) $(OBJ_FILES) if [ "$(RANLIB)" = "ranlib" ]; then ranlib $(OUT_FILE); fi + +$(OUT_FILE_JNI): $(OBJ_FILES_JNI) $(OUT_FILE) + $(CC) -shared -o $(OUT_FILE_JNI) $(OBJ_FILES_JNI) -lm -L$(OUT_DIR) -l$(NAME) $(TMP_DIR)/awk.o: $(TMP_DIR) $(CC) $(CFLAGS) -o $@ -c awk.c @@ -79,7 +92,7 @@ $(TMP_DIR)/rex.o: $(TMP_DIR) $(CC) $(CFLAGS) -o $@ -c rex.c $(TMP_DIR)/jni.o: $(TMP_DIR) - $(CC) $(CFLAGS) -o $@ -c jni.c + $(CC) $(CFLAGS) $(CFLAGS_JNI) -o $@ -c jni.c $(OUT_DIR): mkdir -p $(OUT_DIR) diff --git a/ase/configure b/ase/configure index c111f84b..e5d9e1e3 100755 --- a/ase/configure +++ b/ase/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.80 . +# From configure.ac Revision: 1.81 . # 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 _ACJNI_JAVAC 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 JAVAC_PATH CFLAGS_JNI JAVAC JNI LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -9937,34 +9937,17 @@ 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 +# Java & JNI Configuration +# 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 +if test "${ac_cv_path_JAVAC_PATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $_ACJNI_JAVAC in + case $JAVAC_PATH in [\\/]* | ?:[\\/]*) - ac_cv_path__ACJNI_JAVAC="$_ACJNI_JAVAC" # Let the user override the test with a path. + ac_cv_path_JAVAC_PATH="$JAVAC_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9974,93 +9957,100 @@ do 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" + ac_cv_path_JAVAC_PATH="$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" + test -z "$ac_cv_path_JAVAC_PATH" && ac_cv_path_JAVAC_PATH=":" ;; esac fi -_ACJNI_JAVAC=$ac_cv_path__ACJNI_JAVAC +JAVAC_PATH=$ac_cv_path_JAVAC_PATH -if test -n "$_ACJNI_JAVAC"; then - echo "$as_me:$LINENO: result: $_ACJNI_JAVAC" >&5 -echo "${ECHO_T}$_ACJNI_JAVAC" >&6 +if test -n "$JAVAC_PATH"; then + echo "$as_me:$LINENO: result: $JAVAC_PATH" >&5 +echo "${ECHO_T}$JAVAC_PATH" >&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` +if test "$JAVAC_PATH" != ":" +then + CUR_JAVAC_PATH="$JAVAC_PATH" + while ls -ld "$CUR_JAVAC_PATH" 2>/dev/null | grep " -> " >/dev/null + do + echo "$as_me:$LINENO: checking symlink for $CUR_JAVAC_PATH" >&5 +echo $ECHO_N "checking symlink for $CUR_JAVAC_PATH... $ECHO_C" >&6 + REAL_JAVAC_PATH=`ls -ld "$CUR_JAVAC_PATH" | sed 's/.* -> //'` -# 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" + case "$REAL_JAVAC_PATH" in + /*) CUR_JAVAC_PATH="$REAL_JAVAC_PATH";; + *) CUR_JAVAC_PATH=`echo "X$CUR_JAVAC_PATH" | sed -e 's/^X//' -e 's:[^/]*$::'`"$REAL_JAVAC_PATH";; + esac -_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" + echo "$as_me:$LINENO: result: $CUR_JAVAC_PATH" >&5 +echo "${ECHO_T}$CUR_JAVAC_PATH" >&6 + done + + JAVA_DIR="$CUR_JAVAC_PATH" + + while true + do + JAVA_DIR=`echo "$JAVA_DIR" | sed -e 's://*:/:g' -e 's:/[^/]*$::'` + if test "$JAVA_DIR" = "" + then + break + fi + + echo "$as_me:$LINENO: checking $JAVA_DIR/include/jni.h" >&5 +echo $ECHO_N "checking $JAVA_DIR/include/jni.h... $ECHO_C" >&6 + if test -f "$JAVA_DIR/include/jni.h" + then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JAVA_DIR/include" + break; + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + done + + for i in $JNI_INCLUDE_DIRS + do + JNI_MD_H=`find "$i" -name jni_md.h -print` + if test "$JNI_MD_H" != "" + then + tmp=`echo "$JNI_MD_H" | sed -e 's://*:/:g' -e 's:/[^/]*$::'` + JNI_MD_INCLUDE_DIRS="$JNI_MD_INCLUDE_DIRS $tmp" + fi + done + + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JNI_MD_INCLUDE_DIRS" + + for i in $JNI_INCLUDE_DIRS + do + CFLAGS_JNI="$CFLAGS_JNI -I$i" + done + + JNI="jni" 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 + JAVAC_PATH="" + CFLAGS_JNI="" + JNI="" 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 +CFLAGS_JNI=$CFLAGS_JNI -# 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 +JAVAC=$JAVAC_PATH - -for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS -do - CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR" -done +JNI=$JNI ac_config_files="$ac_config_files makefile cmn/makefile awk/makefile lsp/makefile utl/makefile test/awk/makefile test/lsp/makefile" @@ -10693,7 +10683,10 @@ 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,@JAVAC_PATH@,$JAVAC_PATH,;t t +s,@CFLAGS_JNI@,$CFLAGS_JNI,;t t +s,@JAVAC@,$JAVAC,;t t +s,@JNI@,$JNI,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/ase/configure.ac b/ase/configure.ac index 407c643a..28766ec8 100644 --- a/ase/configure.ac +++ b/ase/configure.ac @@ -1,10 +1,10 @@ # -# $Id: configure.ac,v 1.81 2007-04-04 14:45:52 bacon Exp $ +# $Id: configure.ac,v 1.82 2007-04-05 10:14:36 bacon Exp $ # AC_PREREQ(2.53) AC_INIT([ase], [deb-0.1.0]) -AC_REVISION([$Revision: 1.81 $]) +AC_REVISION([$Revision: 1.82 $]) AC_CONFIG_HEADER([cmn/conf_unx.h]) # Checks for programs. @@ -106,86 +106,74 @@ then [CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"] fi -# -# JNI Configuration - http://autoconf-archive.cryp.to/ac_jni_include_dir.html -# +# Java & JNI Configuration +AC_PATH_PROG(JAVAC_PATH, javac, :) -AC_DEFUN([AC_JNI_INCLUDE_DIR],[ +if test "$JAVAC_PATH" != ":" +then + CUR_JAVAC_PATH="$JAVAC_PATH" -JNI_INCLUDE_DIRS="" + while ls -ld "$CUR_JAVAC_PATH" 2>/dev/null | grep " -> " >/dev/null + do + AC_MSG_CHECKING(symlink for $CUR_JAVAC_PATH) + REAL_JAVAC_PATH=`ls -ld "$CUR_JAVAC_PATH" | sed 's/.* -> //'` -#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]) + case "$REAL_JAVAC_PATH" in + /*) CUR_JAVAC_PATH="$REAL_JAVAC_PATH";; + *) CUR_JAVAC_PATH=`echo "X$CUR_JAVAC_PATH" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$REAL_JAVAC_PATH";; + esac -host_os=`uname -s | tr [A-Z] [a-z]` + AC_MSG_RESULT($CUR_JAVAC_PATH) + done -_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" + JAVA_DIR="$CUR_JAVAC_PATH" + + while true + do + JAVA_DIR=`echo "$JAVA_DIR" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'` + if test "$JAVA_DIR" = "" + then + break + fi + + AC_MSG_CHECKING($JAVA_DIR/include/jni.h) + if test -f "$JAVA_DIR/include/jni.h" + then + AC_MSG_RESULT(yes) + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JAVA_DIR/include" + break; + else + AC_MSG_RESULT(no) + fi + done + + for i in $JNI_INCLUDE_DIRS + do + JNI_MD_H=`find "$i" -name jni_md.h -print` + if test "$JNI_MD_H" != "" + then + tmp=`echo "$JNI_MD_H" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'` + JNI_MD_INCLUDE_DIRS="$JNI_MD_INCLUDE_DIRS $tmp" + fi + done + + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $JNI_MD_INCLUDE_DIRS" + + for i in $JNI_INCLUDE_DIRS + do + CFLAGS_JNI="$CFLAGS_JNI -I$i" + done + + JNI="jni" 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 + JAVAC_PATH="" + CFLAGS_JNI="" + JNI="" 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_SUBST(CFLAGS_JNI, $CFLAGS_JNI) +AC_SUBST(JAVAC, $JAVAC_PATH) +AC_SUBST(JNI, $JNI) AC_CONFIG_FILES([makefile cmn/makefile awk/makefile lsp/makefile utl/makefile test/awk/makefile test/lsp/makefile]) AC_OUTPUT