*** empty log message ***
This commit is contained in:
parent
aec1df6a9d
commit
3cfe718359
@ -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
|
NAME = aseawk
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
AR = ar
|
AR = ar
|
||||||
MAKE = @MAKE@
|
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
CFLAGS = @CFLAGS@ -I@abs_top_builddir@/..
|
CFLAGS = @CFLAGS@ -I@abs_top_builddir@/..
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
MODE = @BUILDMODE@
|
MODE = @BUILDMODE@
|
||||||
|
|
||||||
|
JAVAC = @JAVAC@
|
||||||
|
CFLAGS_JNI = @CFLAGS_JNI@
|
||||||
|
JNI = @JNI@
|
||||||
|
|
||||||
OUT_DIR = ../$(MODE)/lib
|
OUT_DIR = ../$(MODE)/lib
|
||||||
OUT_FILE = $(OUT_DIR)/lib$(NAME).a
|
OUT_FILE = $(OUT_DIR)/lib$(NAME).a
|
||||||
|
OUT_FILE_JNI = $(OUT_DIR)/lib$(NAME)_jni.so
|
||||||
|
|
||||||
TMP_DIR = $(MODE)
|
TMP_DIR = $(MODE)
|
||||||
|
|
||||||
@ -33,11 +37,20 @@ OBJ_FILES = \
|
|||||||
$(TMP_DIR)/extio.o \
|
$(TMP_DIR)/extio.o \
|
||||||
$(TMP_DIR)/rex.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)
|
$(OUT_FILE): $(OBJ_FILES) $(OUT_DIR)
|
||||||
$(AR) cr $(OUT_FILE) $(OBJ_FILES)
|
$(AR) cr $(OUT_FILE) $(OBJ_FILES)
|
||||||
if [ "$(RANLIB)" = "ranlib" ]; then ranlib $(OUT_FILE); fi
|
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)
|
$(TMP_DIR)/awk.o: $(TMP_DIR)
|
||||||
$(CC) $(CFLAGS) -o $@ -c awk.c
|
$(CC) $(CFLAGS) -o $@ -c awk.c
|
||||||
@ -79,7 +92,7 @@ $(TMP_DIR)/rex.o: $(TMP_DIR)
|
|||||||
$(CC) $(CFLAGS) -o $@ -c rex.c
|
$(CC) $(CFLAGS) -o $@ -c rex.c
|
||||||
|
|
||||||
$(TMP_DIR)/jni.o: $(TMP_DIR)
|
$(TMP_DIR)/jni.o: $(TMP_DIR)
|
||||||
$(CC) $(CFLAGS) -o $@ -c jni.c
|
$(CC) $(CFLAGS) $(CFLAGS_JNI) -o $@ -c jni.c
|
||||||
|
|
||||||
$(OUT_DIR):
|
$(OUT_DIR):
|
||||||
mkdir -p $(OUT_DIR)
|
mkdir -p $(OUT_DIR)
|
||||||
|
171
ase/configure
vendored
171
ase/configure
vendored
@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.ac Revision: 1.80 .
|
# From configure.ac Revision: 1.81 .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.59 for ase deb-0.1.0.
|
# Generated by GNU Autoconf 2.59 for ase deb-0.1.0.
|
||||||
#
|
#
|
||||||
@ -309,7 +309,7 @@ ac_includes_default="\
|
|||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif"
|
#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=''
|
ac_subst_files=''
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
@ -9937,34 +9937,17 @@ then
|
|||||||
CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"
|
CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
# Java & JNI Configuration
|
||||||
# JNI Configuration - http://autoconf-archive.cryp.to/ac_jni_include_dir.html
|
# Extract the first word of "javac", so it can be a program name with args.
|
||||||
#
|
set dummy javac; ac_word=$2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# _ACJNI_FOLLOW_SYMLINKS <path>
|
|
||||||
# Follows symbolic links on <path>,
|
|
||||||
# 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 "$as_me:$LINENO: checking for $ac_word" >&5
|
||||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
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
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
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
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
@ -9974,93 +9957,100 @@ do
|
|||||||
test -z "$as_dir" && as_dir=.
|
test -z "$as_dir" && as_dir=.
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
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
|
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||||
break 2
|
break 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
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
|
esac
|
||||||
fi
|
fi
|
||||||
_ACJNI_JAVAC=$ac_cv_path__ACJNI_JAVAC
|
JAVAC_PATH=$ac_cv_path_JAVAC_PATH
|
||||||
|
|
||||||
if test -n "$_ACJNI_JAVAC"; then
|
if test -n "$JAVAC_PATH"; then
|
||||||
echo "$as_me:$LINENO: result: $_ACJNI_JAVAC" >&5
|
echo "$as_me:$LINENO: result: $JAVAC_PATH" >&5
|
||||||
echo "${ECHO_T}$_ACJNI_JAVAC" >&6
|
echo "${ECHO_T}$JAVAC_PATH" >&6
|
||||||
else
|
else
|
||||||
echo "$as_me:$LINENO: result: no" >&5
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
echo "${ECHO_T}no" >&6
|
echo "${ECHO_T}no" >&6
|
||||||
fi
|
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
|
case "$REAL_JAVAC_PATH" in
|
||||||
_cur=""$_ACJNI_JAVAC""
|
/*) CUR_JAVAC_PATH="$REAL_JAVAC_PATH";;
|
||||||
while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
|
*) CUR_JAVAC_PATH=`echo "X$CUR_JAVAC_PATH" | sed -e 's/^X//' -e 's:[^/]*$::'`"$REAL_JAVAC_PATH";;
|
||||||
echo "$as_me:$LINENO: checking symlink for $_cur" >&5
|
esac
|
||||||
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:/[^/]*$::'`
|
echo "$as_me:$LINENO: result: $CUR_JAVAC_PATH" >&5
|
||||||
case "$host_os" in
|
echo "${ECHO_T}$CUR_JAVAC_PATH" >&6
|
||||||
darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'`
|
done
|
||||||
_JINC="$_JTOPDIR/Headers";;
|
|
||||||
*) _JINC="$_JTOPDIR/include";;
|
JAVA_DIR="$CUR_JAVAC_PATH"
|
||||||
esac
|
|
||||||
if test -f "$_JINC/jni.h"; then
|
while true
|
||||||
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
|
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
|
else
|
||||||
_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'`
|
JAVAC_PATH=""
|
||||||
if test -f "$_JTOPDIR/include/jni.h"; then
|
CFLAGS_JNI=""
|
||||||
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"
|
JNI=""
|
||||||
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
|
fi
|
||||||
|
|
||||||
# get the likely subdirectories for system specific java includes
|
CFLAGS_JNI=$CFLAGS_JNI
|
||||||
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
|
JAVAC=$JAVAC_PATH
|
||||||
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
|
|
||||||
|
|
||||||
|
JNI=$JNI
|
||||||
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"
|
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,@CPP@,$CPP,;t t
|
||||||
s,@EGREP@,$EGREP,;t t
|
s,@EGREP@,$EGREP,;t t
|
||||||
s,@BUILDMODE@,$BUILDMODE,;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,@LIBOBJS@,$LIBOBJS,;t t
|
||||||
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
||||||
CEOF
|
CEOF
|
||||||
|
136
ase/configure.ac
136
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_PREREQ(2.53)
|
||||||
AC_INIT([ase], [deb-0.1.0])
|
AC_INIT([ase], [deb-0.1.0])
|
||||||
AC_REVISION([$Revision: 1.81 $])
|
AC_REVISION([$Revision: 1.82 $])
|
||||||
AC_CONFIG_HEADER([cmn/conf_unx.h])
|
AC_CONFIG_HEADER([cmn/conf_unx.h])
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
@ -106,86 +106,74 @@ then
|
|||||||
[CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"]
|
[CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
# Java & JNI Configuration
|
||||||
# JNI Configuration - http://autoconf-archive.cryp.to/ac_jni_include_dir.html
|
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])
|
case "$REAL_JAVAC_PATH" in
|
||||||
test "x$JAVAC" = x && JAVAC=javac
|
/*) CUR_JAVAC_PATH="$REAL_JAVAC_PATH";;
|
||||||
AC_PATH_PROG(_ACJNI_JAVAC, $JAVAC, no)
|
*) CUR_JAVAC_PATH=`echo "X$CUR_JAVAC_PATH" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$REAL_JAVAC_PATH";;
|
||||||
test "x$_ACJNI_JAVAC" = xno && AC_MSG_ERROR([$JAVAC could not be found in path])
|
esac
|
||||||
|
|
||||||
host_os=`uname -s | tr [A-Z] [a-z]`
|
AC_MSG_RESULT($CUR_JAVAC_PATH)
|
||||||
|
done
|
||||||
|
|
||||||
_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
|
JAVA_DIR="$CUR_JAVAC_PATH"
|
||||||
_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
|
|
||||||
case "$host_os" in
|
while true
|
||||||
darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
|
do
|
||||||
_JINC="$_JTOPDIR/Headers";;
|
JAVA_DIR=`echo "$JAVA_DIR" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
|
||||||
*) _JINC="$_JTOPDIR/include";;
|
if test "$JAVA_DIR" = ""
|
||||||
esac
|
then
|
||||||
if test -f "$_JINC/jni.h"; then
|
break
|
||||||
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
|
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
|
else
|
||||||
_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
|
JAVAC_PATH=""
|
||||||
if test -f "$_JTOPDIR/include/jni.h"; then
|
CFLAGS_JNI=""
|
||||||
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"
|
JNI=""
|
||||||
else
|
|
||||||
AC_MSG_ERROR([cannot find java include files])
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get the likely subdirectories for system specific java includes
|
AC_SUBST(CFLAGS_JNI, $CFLAGS_JNI)
|
||||||
case "$host_os" in
|
AC_SUBST(JAVAC, $JAVAC_PATH)
|
||||||
bsdi*) _JNI_INC_SUBDIRS="bsdos";;
|
AC_SUBST(JNI, $JNI)
|
||||||
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 <path>
|
|
||||||
# Follows symbolic links on <path>,
|
|
||||||
# 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_CONFIG_FILES([makefile cmn/makefile awk/makefile lsp/makefile utl/makefile test/awk/makefile test/lsp/makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
Loading…
Reference in New Issue
Block a user