Re: preventing defines in config.h

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Andy Howell on 10/19/2006 2:22 AM:
> Hello,

Hi,

> 
>     I'm tying to understand how defines get added to config.h.

Definition templates are output into the config.h template by autoheader,
then configure decides which templates to enable vs. disable.

> In my
> configure.ac file I have:
> 
> if test "apple" = "orange"; then
>     AC_DEFINE_UNQUOTED(HAVE_SOMETHING,1,[Define if SOMETHING])
> fi
> 
> My test fails, so I don't expect to get
> 
> /* Define is SOMETHING */
> #define HAVE_SOMETHING 1
> 
> in config.h

That is a correct assumption - if the AC_DEFINE_UNQUOTED is never
executed, the config.h portion will remain undefined.

> 
> I did a sh -x on configure, but I never see it do HAVE_SOMETHING.

If the code is never executed, that is to be expected.  Or maybe I'm
misunderstanding the real question you are trying to ask.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@xxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFOB4x84KuGfSFAYARAl44AJ9uqYP2zO4xnIuV96Da0oP7ScagAACfTj4U
V+igwms/n77OvLBjH4Ra9fs=
=uab4
-----END PGP SIGNATURE-----


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux