autoconf
[Top][All Lists]
Advanced

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

AH_TEMPLATE feature


From: Keith Bostic
Subject: AH_TEMPLATE feature
Date: Mon, 13 Jan 2003 10:11:05 -0500 (EST)

Hi, my name is Keith Bostic and I'm with Sleepycat Software.
We use the GNU autoconf software to configure Berkeley DB.

Something we've occasionally needed is the ability to set
specific configuration defines.

For example, we use HAVE_O_DIRECT to configure open's O_DIRECT
flag.  Sometimes, users are building Berkeley DB for use on
file systems different from the ones on which they're running
the configure script, and they want to turn the option on even
though the test we've written for autoconf will fail.

Obviously, we could add a specific configuration option, but
we have around 100 or so HAVE_XXX defines, and that solution
would get out of hand quickly.

The way we tell users to do this is by editing their config.h
files in their configuration directory, which isn't easy to
do -- a lot of users get confused when you say "editor". :-)

It occurred to me it might be reasonable to connect the autoconf
argument macros to the AH_TEMPLATE macro, creating a standard
configuration argument for all HAVE_XXX declarations.  So, if
there's a:

        AH_TEMPLATE(DIAGNOSTIC,
        [Define to 1 if you want a version with run-time diagnostic checking.])

that would imply the existence of the:

        --override-diagnostic=XXX

argument, that would allow users to override the behavior of
the configuration script at a basic level.

I'm not sure how such a flag should behave: overriding the value
during the creation of the config.h file?  Or, supplying an
initial cached value for the AC_CACHE_CHECK([]) macro?

I don't think it would make sense to add this to the help
message, but it might make field support easier.  Telling users
to configure with

        --override-o_direct=1

is simpler than telling them to edit their config.h file.

It's more difficult to edit config.h files programmatically,
too, that is, users building packages for multiple systems
would be happier with a set of config arguments than editing
config.h files.

Anyway, I know very little about how autoconf is put together,
and this may be an awful idea.  If there's a better way to do
this, I would appreciate any feedback, since it's a problem I
have to solve on a regular basis.

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic                    address@hidden
Sleepycat Software Inc.         keithbosticim (ymsgid)
118 Tower Rd.                   +1-781-259-3139
Lincoln, MA 01773               http://www.sleepycat.com




reply via email to

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