autoconf
[Top][All Lists]
Advanced

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

--with-foo= vs. FOO=${FOO:-foo_default}


From: mcmahill
Subject: --with-foo= vs. FOO=${FOO:-foo_default}
Date: Sun, 1 Sep 2002 08:57:10 -0400 (EDT)

I'm working on autobuilding a program which currently uses imake.  One
thing I'm working on changing now is that there is a big .h file that has
many defines for defaults like:

#define EMERGENCY_NAME          "/tmp/FOO.%i.save"      /* %i --> pid */
#define BACKUP_NAME             "/tmp/FOO.%i.backup"    /* %i --> pid */
#define DEFAULT_SIZE            "7000x5000"     /* default layout size */
#define DEFAULT_MEDIASIZE       "a4"            /* default output media */
#define DEFAULT_CELLSIZE        50              /* default cell size for 
symbols */


Then there is a shell script that uses awk/sed to pull out these #defines
and make the documentation reflect the compiled in defaults.  So my
question is when converting to autoconf should I do something like add

--with-emergency-name
--with-backup-name
--with-default-size
--with-default-mediasize
--with-default-cellsize

options?  The autoconf manual seems to say that --with and --without are
for specifying specific external programs not so much for internal
defaults.


I chould also have configure.ac have lines like:

EMERGENCY_NAME=${EMERGENCY_NAME:-"/tmp/FOO.%i.save"}

and override via setting the environment variable.  I don't much like
this, but this is how CFLAGS, etc get passed in.

So which is the recommended practices way to handle this with autoconf?

Thanks
-Dan







reply via email to

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