[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to avoid warning: "PACKAGE_NAME" redefined
From: |
Ralf Wildenhues |
Subject: |
Re: How to avoid warning: "PACKAGE_NAME" redefined |
Date: |
Fri, 9 Mar 2007 10:51:18 +0100 |
User-agent: |
Mutt/1.5.14 (2007-03-03) |
Hello Haibin,
* haibin zhang wrote on Fri, Mar 09, 2007 at 10:23:40AM CET:
> Hi all:
> When I build my project , when I include <config.h> in my source file, it
> will warn me :
> In file included from /opt/ace/include/ace/config-macros.h:24,
> from /opt/ace/include/ace/config-lite.h:24,
> from /opt/ace/include/ace/Basic_Types.h:46,
> from /opt/ace/include/ace/SStringfwd.h:22,
> from /opt/ace/include/ace/Configuration.h:34,
> from /opt/ace/include/ace/Configuration_Import_Export.h:28,
> from ../../../CallCompletion/Codes/libnet/Properties.cpp:8:
> /opt/ace/include/ace/config.h:2050:1: warning: "PACKAGE_NAME" redefined
> In file included
>
> I found that I use ACE project , ACE has include config.h that
> generated by autoconf. and it has defined PACKAGE_NAME.
>
> How can I avoid warning: "PACKAGE_NAME" redefined?
By telling the ACE people that the config.h file is not intended to be
installed.
If they need an installable file that contains information generated by
configure, they could use a second config header with a manually written
template that contains only the minimal set of macros to be defined (and
those should all be package-specific, e.g., have a prefix like ACE_ or
so).
Example:
AC_CONFIG_HEADERS(config.h ace_config.h)
put this in ace_config.h.in:
/* clients of the ACE library need to know whether this library was
compiled with features FOO and BAR */
#undef ACE_FEATURE_FOO
#undef ACE_FEATURE_BAR
Hope that helps.
Cheers,
Ralf