autoconf
[Top][All Lists]
Advanced

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

Default program-prefix option


From: Linus Walleij
Subject: Default program-prefix option
Date: Mon, 23 May 2005 12:55:42 +0200 (CEST)

In february there was a mail to the list asking how to set a default program-prefix, with the same effect as giving it to the command line using ./configure --program-prefix=foo.

I had to achieve this and it turns out the following hack in a configure.ac/.in file will do:

# This can be overridden by the command line switch
if test "$program_prefix" = NONE; then
   program_prefix=foo
   program_transform_name="s,^,$program_prefix,;$program_transform_name"
fi

The manipulation of program_transform_name is necessary because program prefix is rewritten into a transformation regexp before any commands in the configure.ac/.in file are executed.

It would of course be preferable if there was an autoconf macro for this, something along the line AC_DEFAULT_PROGRAM_PREFIX(foo) so that one does not have to use such hacks.

Yours,
Linus Walleij




reply via email to

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