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: Mon, 7 Apr 2003 09:35:45 -0700 (PDT)

On Mon, 7 Apr 2003, Andreas Schwab wrote:

> Bill Moseley <address@hidden> writes:
> 
> |> Here's configure.in:
> |> 
> |> [...]
> |> 
> |> echo "was $libexecdir"
> |> 
> |> if test "$libexecdir" = '${exec_prefix}/libexec'; then
> |>   echo "Changing libexecdir"
> |>   libexecdir="$libexecdir"
> |> fi
> 
> This is a no-op.  I don't understand what you are trying to achieve.

Oh sorry, not a clear example.

The point was how @libexecdir@ is expanded.

I'd like to use @libexecdir@ in a perl script (somescript.pl.in) so that
configure can substitute in the path.  For example, if I install some
modules in $libexecdir/perl I could say in somescript.pl.in:

  use lib qw( @libexecdir@/perl );

That way somescript.pl will know where to find its supporting modules and 
work correctly after make install.

But that will only work if --libexecdir is specified to ./configure as you
can see:


AC_PREREQ(2.50)
AC_INIT(somescript)
AM_INIT_AUTOMAKE(foo,1.0)
AC_CONFIG_FILES(Makefile foo)
AC_OUTPUT

$ cat foo.in
libexecdir= @libexecdir@

$ ./bootstrap && ./configure && cat foo
libexecdir= ${exec_prefix}/libexec

Which works ok in a Makefile, but not substituted in a perl script (I want
the real path).

But:

$ ./bootstrap && ./configure --libexecdir=$HOME/other/path && cat foo
libexecdir= /home/moseley/other/path

Which is what I want.  But I also want it to expand that way when
--libexecdir is not passed to configure.





-- 
Bill Moseley address@hidden





reply via email to

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