autoconf
[Top][All Lists]
Advanced

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

how to specify arbitrary macro variable for config.h


From: John Lumby
Subject: how to specify arbitrary macro variable for config.h
Date: Sat, 17 Jul 2010 14:09:32 -0400

This is a beginner question.    I am modifying a package and would like to 
introduce a new configure option to set a value which had been previously 
hardcoded.

So  -  for example  -     I want to provide an optional configure option

    --foo-barian-characteristic=VALUE

and place a default definition in config.h.in

#undef FOO_BARIAN_CHARACTERISTIC

and then write something in configure.ac which would respond to the user 
specifying the option by replacing #undef by

#define FOO_BARIAN_CHARACTERISTIC=VALUE

in config.h

How can I do this?     I can see how by using AC_ARG_ENABLE and 
AC_DEFINE_UNQUOTED, but that would require that my option appear to be an 
--enable-xxx kind -  the user would have to specify
   configure ... --enable-foo-barian-characteristic=VALUE
which is slightly misleading since this is a setting for a default feature.

John Lumby
                                          
_________________________________________________________________
MSN Dating: Find someone special. Start now.
http://go.microsoft.com/?linkid=9734384

reply via email to

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