Re: Writing New Macros

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

 



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

According to Eric Lemings on 4/9/2007 1:32 PM:
> 2. An Autoconf macro that checks whether a given type is a built-in
> type or not.  This macro is similar to AC_CHECK_TYPE except that it
> performs action-if-built-in only if the type is a built-in type and
> action-if-not-built-in if the type is not defined or not a built-in
> type.
> (Possibly the same as _AC_TYPE_CHECK_NEW without any includes at all.)

Don't use undocumented autoconf internals (unless you are writing a patch
for autoconf itself).  The _AC namespace is reserved, and should not
appear in your configure.ac.

But what's wrong with AC_CHECK_TYPE([int], [action-if-builtin],
[action-if-not], [])?  In other words, explicitly tell AC_CHECK_TYPE to
use no includes.

> 
> 3. An Autoconf macro that defines a preprocessor name with the
> fundamental type as an existing type definition.
> 
>     FOO_REDEFINE_TYPE(FOO_INT8_T, int8_t, AC_INCLUDES_DEFAULT)
> 
> and the type __sys_int8_t is defined in <sys/types.h> as
> 
> 	typedef char __sys_int8_t int8_t;

Typo, I hope.

Why are you doing this?  Avoiding header files seems like overkill; if
they are there and they work, use them.  Meanwhile, based on your mention
of int8_t, you may be interested in the gnulib stdint module, which
provides a good example of how to build a header that provides all of the
[u]int{8,16,32}_t types and friends using autoconf.
http://www.gnu.org/software/gnulib/MODULES.html#module=stdint

- --
Don't work too hard, make some time for fun as well!

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

iD8DBQFGG39w84KuGfSFAYARAvutAJ48RnbUVeLAONZ6NfdCZc+Fi4mxwQCfQWIZ
Mryv/zQgdZ1GYP5tmmKsh6o=
=nLH0
-----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