autoconf
[Top][All Lists]
Advanced

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

Re: Forcing complete expansion of a PATH variable


From: Guido Draheim
Subject: Re: Forcing complete expansion of a PATH variable
Date: Thu, 24 Apr 2003 08:33:22 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.1) Gecko/20020826



Raja R Harinath schrieb:
address@hidden (Joshua Kwan) writes:
[snip]

Now I have added AC_SUBST_DIR(musicpath) after these lines.

But something weird happens now:

./configure: line 3594: musicpath: command not found

This doesn't affect the success of configure, but I wonder why it is
there? I looked in configure itself and lo there it was:

       musicpath
       musicpath=`(
           test "x$prefix" = xNONE && prefix="$ac_default_prefix"
           test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
eval echo \""$musicpath"\" )`

But I've added nothing but that one AC_SUBST_DIR. I am using the m4 code
verbatim from the site ou have given me. Do you know what's up?


The code at http://ac-archive.sf.net/Miscellaneous/ac_subst_dir.html
says:

    AC_DEFUN([AC_SUBST_DIR], [
            ifelse($2, , $1, $1="[$]$2")
            $1=`(
                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
                eval echo \""[$]$1"\"
            )`
            AC_SUBST($1)
    ])

Try this instead:

    AC_DEFUN([AC_SUBST_DIR], [
            ifelse($2,,,$1="[$]$2")
            $1=`(
                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
                eval echo \""[$]$1"\"
            )`
            AC_SUBST($1)
    ])

- Hari

spot the difference :-)=) ... the whitespace in the ifelse, right?
I am modifying the macro in the ac-archive, plus sending a message
to the author given for that macro. I wonder why that was never a
problem before. Well, anyways, let's have that fixed. -- guido







reply via email to

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