autoconf
[Top][All Lists]
Advanced

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

Re: changequote


From: Akim Demaille
Subject: Re: changequote
Date: 21 Dec 2000 12:54:19 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

> No, it means you cannot expect AC_MSG_CHECKING to keep on working
> after having changed the quotes.  Get rid of changequote.  If you need
> some help, post the snippet.

Since I totally fail to work around, I would really appreciate some help.

This is how the original (before I started to work around) block looks like:

      java_home_guess="`java -verbose 2>&1 | sed -e 
's:^\[[^]/]*\(/.*\)/[^/]*\.jar[] ].*$:\1:' -e t -e d | sed -e 
's:/[Cc]lasses$::' -e 's:/lib$::' -e 1q`"

The problem is with this line which has an unbalanced bracket.  All
you need is to balance it, i.e., I'd propose

AC_MSG_CHECKING(for JAVA_HOME)
AC_CACHE_VAL(pike_cv_java_java_home, [[
  if test "x$JAVA_HOME" = x; then
    pike_cv_java_java_home=no
    # We need balanced brackets: [
    java_home_guess=`java -verbose 2>&1 |
           sed -e 's:^\[[^]/]*\(/.*\)/[^/]*\.jar[] ].*$:\1:' -e t -e d |
           sed -e 's:/[Cc]lasses$::' -e 's:/lib$::' -e 1q`
    for tmp_java_home in /usr/java /usr/local/java /usr/local/jdk* 
/usr/java*/jre /usr/java/jdk*/jre /usr/local/java*/jre /usr/local/jdk*/jre 
/usr/local/jre* "$java_home_guess" "$pike_java_user_lib_directory"/..; do
      if test -d $tmp_java_home/.; then
        if ls 
"$tmp_java_home/lib/$pike_cv_java_arch/$pike_cv_java_threads_type"/libjvm* 
>/dev/null 2>&1 || \
          ls "$tmp_java_home/lib/$pike_cv_java_arch"/libjvm* >/dev/null 2>&1 || 
\
          ls "$tmp_java_home/lib/$pike_cv_java_arch"/classic/libjvm* >/dev/null 
2>&1 || \
          ls "$tmp_java_home/bin"/classic/libjvm* >/dev/null 2>&1 || \
          ls "$tmp_java_home/Libraries"/libjvm* >/dev/null 2>&1; then
            pike_cv_java_java_home="$tmp_java_home"
        else
          :
        fi
      else
        :
      fi
    done
  else
    if test -d "$JAVA_HOME"/jre/lib; then
      pike_cv_java_java_home="$JAVA_HOME"/jre
    else
      pike_cv_java_java_home="$JAVA_HOME"
    fi
  fi
]])
AC_MSG_RESULT($pike_cv_java_java_home)


(see the comment) which is 2.13 and 2.50, otherwise you can use @:>@
to represent `]' with 2.50.



reply via email to

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