autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic script problem


From: Raja R Harinath
Subject: Re: Basic script problem
Date: Sat, 10 May 2003 19:30:51 -0500
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Hi,

"Al" <address@hidden> writes:
[snip]
> === AC_JNI_INCLUDE_DIR by Don Anderson <address@hidden> ===
>
> dnl Available from the GNU Autoconf Macro Archive at:
> dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_jni_include_dirs.html
> dnl
> AC_DEFUN(AC_JNI_INCLUDE_DIR,[
>
> JNI_INCLUDE_DIRS=""
>
> test "x$JAVAC" = x && AC_MSG_ERROR(['$JAVAC' undefined])
> AC_PATH_PROG(_ACJNI_JAVAC, $JAVAC, no)
> test "x$_ACJNI_JAVAC" = xno && AC_MSG_ERROR([$JAVAC could not be found in
> path])
>
> _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"

Try

  JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS
$_JINC"

and

> else
>         _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
>         if test -f "$_JTOPDIR/include/jni.h"; then
>                 JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"

  JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS
$_JTOPDIR/include"

Don't try to AC_SUBST JNI_INCLUDE_DIRS, though.  It won't be pretty.
Then, try

  echo "$JNI_INCLUDE_DIRS" | while read JNI_INCLUDE_DIR; do
    JFLAGS="$JFLAGS -I\'$JNI_INCLUDE_DIR\'"
  done

I think this one level of quoting is safe enough, but don't quote me
on that.

- Hari
-- 
Raja R Harinath ------------------------------ address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]