AC_C_CONST with C++

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

 



Hi

I'm using this macro AC_C_CONST in a configure script of a program that uses both C and C++. Now, this macro, in case const is not handled by C, produces in config.h

/* Define to empty if `const' does not conform to ANSI C. */
#undef const

which gives problem when config.h is included in C++ programs since const is a C++ keyword. Couldn't this be handled like AC_C_INLINE which produces in config.h

/* Define to `__inline__' or `__inline' if that's what the C compiler
   calls it, or to nothing if 'inline' is not supported under any name.  */
#ifndef __cplusplus
#undef inline
#endif

i.e.

#ifndef __cplusplus
#undef const
#endif

thanks in advance
	Lorenzo

--
+-----------------------------------------------------+
| Lorenzo Bettini          ICQ# lbetto, 16080134      |
| PhD in Computer Science, DSI, Univ. di Firenze      |
| Florence - Italy        (GNU/Linux User # 158233)   |
| http://www.lorenzobettini.it                        |
| http://tronprog.blogspot.com  BLOG                  |
| http://www.purplesucker.com Deep Purple Cover Band  |
| http://www.gnu.org/software/src-highlite            |
| http://www.gnu.org/software/gengetopt               |
| http://www.gnu.org/software/gengen                  |
| http://doublecpp.sourceforge.net                    |
+-----------------------------------------------------+



_______________________________________________
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