autoconf
[Top][All Lists]
Advanced

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

Re: Default for libexecdir


From: Bill Moseley
Subject: Re: Default for libexecdir
Date: Sat, 5 Apr 2003 06:38:20 -0800 (PST)

On Sat, 5 Apr 2003, Andreas Buening wrote:

> [how to change the default for libexexdir]
> 
> What you could do:
> 
> configure sets the default of libexecdir to
> libexecdir='${exec_prefix}/libexec'
> 
> If you add something like
> 
> if test "$libexecdir" = '${exec_prefix}/libexec'; then
>   libexecdir='${exec_prefix}/lib'
> fi

That's basically what I'm doing now.  But it has a side effect that I do
not quite understand: it breaks @libexecdir@ expansion.

Here's configure.in:

[...]

echo "was $libexecdir"

if test "$libexecdir" = '${exec_prefix}/libexec'; then
  echo "Changing libexecdir"
  libexecdir="$libexecdir"
fi

echo "now $libexecdir"

AC_CONFIG_FILES(Makefile foo)
AC_OUTPUT

Now foo.in has:

  libexecdir= @libexecdir@

./configure --libexecdir=$HOME/bar && cat foo
...
was /home/moseley/bar
now /home/moseley/bar
...

  libexecdir= /home/moseley/bar

Ok, that looks good.

But without specifying --libexecdir:

./configure  && cat foo
...
was ${exec_prefix}/libexec
Changing libexecdir
now ${exec_prefix}/libexec
...

  libexecdir= ${exec_prefix}/libexec

That works ok in Makefiles because of the shell expansion.  But I was
hoping to use @libexecdir@ in a perl script (myscript.pl.in), and if I set
libexecdir (even to itself) in configure.in then expansion no longer
works.  Any idea what's happening there?

Thanks,

-- 
Bill Moseley address@hidden





reply via email to

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