This commit is contained in:
hyung-hwan 2007-12-14 08:15:05 +00:00
parent 3abc8271d6
commit d53810a1e2
3 changed files with 142 additions and 2 deletions

View File

@ -17,6 +17,9 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
MODE = @BUILDMODE@
CJ = @CJ@
CJFLAGS = @CJFLAGS@ --classpath=@abs_top_builddir@/..
JAVAC = @JAVAC@
JAR = @JAR@
CFLAGS_JNI = @CFLAGS_JNI@
@ -29,10 +32,12 @@ OUT_DIR = ../$(MODE)/lib
OUT_FILE_LIB = $(OUT_DIR)/lib$(NAME).a
OUT_FILE_JNI = $(OUT_DIR)/lib$(NAME)_jni.la
OUT_FILE_LIB_CXX = $(OUT_DIR)/lib$(NAME)++.a
OUT_FILE_LIB_CJ = $(OUT_DIR)/lib$(NAME)ja.a
OUT_FILE_JAR = $(OUT_DIR)/$(NAME).jar
TMP_DIR = $(MODE)
TMP_DIR_CXX = $(TMP_DIR)/cxx
TMP_DIR_CJ = $(TMP_DIR)/cj
OBJ_FILES_LIB = \
$(TMP_DIR)/awk.o \
@ -55,6 +60,10 @@ OBJ_FILES_LIB_CXX = \
$(TMP_DIR)/cxx/Awk.o \
$(TMP_DIR)/cxx/StdAwk.o
OBJ_FILES_LIB_CJ = \
$(TMP_DIR)/cj/Awk.o \
$(TMP_DIR)/cj/StdAwk.o
OBJ_FILES_SO = $(OBJ_FILES_LIB:.o=.lo) $(OBJ_FILES_JNI:.o=.lo)
OBJ_FILES_JAR = \
@ -66,7 +75,9 @@ OBJ_FILES_JAR = \
$(TMP_DIR)/ase/awk/Console.class \
$(TMP_DIR)/ase/awk/File.class \
$(TMP_DIR)/ase/awk/Pipe.class \
$(TMP_DIR)/ase/awk/Exception.class
$(TMP_DIR)/ase/awk/Exception.class \
$(TMP_DIR)/ase/awk/Return.class \
$(TMP_DIR)/ase/awk/Argument.class
lib: build$(JNI)
@ -86,6 +97,10 @@ $(OUT_FILE_LIB_CXX): $(TMP_DIR_CXX) $(OUT_DIR) $(OUT_FILE_LIB) $(OBJ_FILES_LIB_C
$(AR) cr $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB_CXX)
if [ "$(RANLIB)" = "ranlib" ]; then ranlib $(OUT_FILE_LIB_CXX); fi
$(OUT_FILE_LIB_CJ): $(TMP_DIR_CJ) $(OUT_DIR) $(OBJ_FILES_LIB_CJ)
$(AR) cr $(OUT_FILE_LIB_CJ) $(OBJ_FILES_LIB_CJ)
if [ "$(RANLIB)" = "ranlib" ]; then ranlib $(OUT_FILE_LIB_CJ); fi
$(TMP_DIR)/awk.o: awk.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c awk.c
@ -155,12 +170,24 @@ $(TMP_DIR)/ase/awk/Pipe.class: Pipe.java
$(TMP_DIR)/ase/awk/Exception.class: Exception.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Exception.java
$(TMP_DIR)/ase/awk/Return.class: Return.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Return.java
$(TMP_DIR)/ase/awk/Argument.class: Argument.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Argument.java
$(TMP_DIR)/cxx/Awk.o: Awk.cpp Awk.hpp
$(CXX) $(CXXFLAGS) -o $@ -c Awk.cpp
$(TMP_DIR)/cxx/StdAwk.o: StdAwk.cpp StdAwk.hpp Awk.hpp
$(CXX) $(CXXFLAGS) -o $@ -c StdAwk.cpp
$(TMP_DIR)/cj/Awk.o: Awk.java
$(CJ) $(CJFLAGS) -o $@ -c Awk.java
$(TMP_DIR)/cj/StdAwk.o: StdAwk.java
$(CJ) $(CJFLAGS) -o $@ -c StdAwk.java
$(OUT_DIR):
mkdir -p $(OUT_DIR)
@ -170,6 +197,9 @@ $(TMP_DIR):
$(TMP_DIR_CXX): $(TMP_DIR)
mkdir -p $(TMP_DIR_CXX)
$(TMP_DIR_CJ): $(TMP_DIR)
mkdir -p $(TMP_DIR_CJ)
clean:
rm -rf $(OUT_FILE_LIB) $(OUT_FILE_JNI) $(OUT_FILE_JAR) $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB) $(OBJ_FILES_JNI) $(OBJ_FILES_JAR) $(OBJ_FILES_LIB_CXX)

98
ase/configure vendored
View File

@ -463,7 +463,7 @@ ac_includes_default="\
# include <unistd.h>
#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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS BUILDMODE JAVAC_PATH JAR_PATH CFLAGS_JNI JAVAC JAR JNI 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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL CJ ac_ct_CJ LIBTOOL_DEPS BUILDMODE JAVAC_PATH JAR_PATH CFLAGS_JNI JAVAC JAR JNI CJFLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -18436,6 +18436,87 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# native java compiler
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcj; 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_prog_CJ+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CJ"; then
ac_cv_prog_CJ="$CJ" # Let the user override the test.
else
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_prog_CJ="${ac_tool_prefix}gcj"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CJ=$ac_cv_prog_CJ
if test -n "$CJ"; then
echo "$as_me:$LINENO: result: $CJ" >&5
echo "${ECHO_T}$CJ" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CJ"; then
ac_ct_CJ=$CJ
# Extract the first word of "gcj", so it can be a program name with args.
set dummy gcj; 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_prog_ac_ct_CJ+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CJ"; then
ac_cv_prog_ac_ct_CJ="$ac_ct_CJ" # Let the user override the test.
else
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_prog_ac_ct_CJ="gcj"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CJ=$ac_cv_prog_ac_ct_CJ
if test -n "$ac_ct_CJ"; then
echo "$as_me:$LINENO: result: $ac_ct_CJ" >&5
echo "${ECHO_T}$ac_ct_CJ" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
CJ=$ac_ct_CJ
else
CJ="$ac_cv_prog_CJ"
fi
@ -18464,6 +18545,13 @@ else
fi
fi
if test "$ac_test_CJFLAGS" = "set"
then
CJFLAGS=$ac_save_CJFLAGS
else
CJFLAGS=
fi
# Checks for header files.
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
@ -25723,11 +25811,13 @@ if test "$enable_debug_is" = "yes"
then
CFLAGS="$CFLAGS -g -D_DEBUG -UNDEBUG"
CXXFLAGS="$CXXFLAGS -g -D_DEBUG -UNDEBUG"
CJFLAGS="$CJFLAGS -g"
BUILDMODE="debug"
else
CFLAGS="$CFLAGS -DNDEBUG -U_DEBUG"
CXXFLAGS="$CXXFLAGS -DNDEBUG -U_DEBUG"
CJFLAGS="$CJFLAGS"
BUILDMODE="release"
fi
@ -25924,6 +26014,7 @@ else
JNI=""
fi
CFLAGS_JNI=$CFLAGS_JNI
JAVAC=$JAVAC_PATH
@ -25932,6 +26023,8 @@ JAR=$JAR_PATH
JNI=$JNI
CJFLAGS=$CJFLAGS
ac_config_files="$ac_config_files makefile cmn/makefile awk/makefile lsp/makefile utl/makefile test/awk/makefile test/lsp/makefile"
@ -26584,6 +26677,8 @@ s,@F77@,$F77,;t t
s,@FFLAGS@,$FFLAGS,;t t
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@CJ@,$CJ,;t t
s,@ac_ct_CJ@,$ac_ct_CJ,;t t
s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
s,@BUILDMODE@,$BUILDMODE,;t t
s,@JAVAC_PATH@,$JAVAC_PATH,;t t
@ -26592,6 +26687,7 @@ s,@CFLAGS_JNI@,$CFLAGS_JNI,;t t
s,@JAVAC@,$JAVAC,;t t
s,@JAR@,$JAR,;t t
s,@JNI@,$JNI,;t t
s,@CJFLAGS@,$CJFLAGS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF

View File

@ -13,6 +13,9 @@ AC_PROG_CC
#AC_PROG_RANLIB
AC_PROG_LIBTOOL
# native java compiler
AC_CHECK_TOOL(CJ, gcj)
AC_SUBST(LIBTOOL_DEPS)
# Overrides the default CFLAGS setting
@ -40,6 +43,13 @@ else
fi
fi
if test "$ac_test_CJFLAGS" = "set"
then
CJFLAGS=$ac_save_CJFLAGS
else
CJFLAGS=
fi
# Checks for header files.
AC_HEADER_STDC
@ -106,10 +116,12 @@ if test "$enable_debug_is" = "yes"
then
[CFLAGS="$CFLAGS -g -D_DEBUG -UNDEBUG"]
[CXXFLAGS="$CXXFLAGS -g -D_DEBUG -UNDEBUG"]
[CJFLAGS="$CJFLAGS -g"]
AC_SUBST(BUILDMODE, "debug")
else
[CFLAGS="$CFLAGS -DNDEBUG -U_DEBUG"]
[CXXFLAGS="$CXXFLAGS -DNDEBUG -U_DEBUG"]
[CJFLAGS="$CJFLAGS"]
AC_SUBST(BUILDMODE, "release")
fi
@ -215,10 +227,12 @@ else
JNI=""
fi
AC_SUBST(CFLAGS_JNI, $CFLAGS_JNI)
AC_SUBST(JAVAC, $JAVAC_PATH)
AC_SUBST(JAR, $JAR_PATH)
AC_SUBST(JNI, $JNI)
AC_SUBST(CJFLAGS, $CJFLAGS)
AC_CONFIG_FILES([makefile cmn/makefile awk/makefile lsp/makefile utl/makefile test/awk/makefile test/lsp/makefile])
AC_OUTPUT