Bug #2389 my_config.h defines PACKAGE and VERSION, troubling automaking client software
Submitted: 14 Jan 2004 7:41 Modified: 23 Jun 2005 7:34
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1 OS:Linux (Debian Linux)
Assigned to: Sergei Golubchik CPU Architecture:Any

[14 Jan 2004 7:41] Lenz Grimmer
Description:
Found in the Debian Bug Database:

[SNIP]
when building a client package using automake/autoconf, make runs into trouble
because /usr/include/mysql/my_config.h defines PACKAGE and VERSION, which 
should now be redefined for the my own client package by AM_INIT_AUTOMAKE.
There is a workaround by either disabling PACKAGE and VERSION in the client
automake or #undefining them while declaring new variables, but this cripples
some of automake's distribution support features.
[SNIP]

How to repeat:
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=157842 for the full report
[6 Feb 2004 15:18] Timothy Smith
This is a problem with our configure.in.  Perhaps adding a third argument to

AM_INIT_AUTOMAKE(mysql, 5.0.0-alpha)

would solve the problem.  It may cause other problems, if any other packages are depending on having VERSION and PACKAGE exported from mysql.h.  But I believe that the correct thing to do is to not export them, at least not in a public header like mysql.h.

See the AM_INIT_AUTOMAKE entry here for details:
http://sources.redhat.com/automake/automake.html#Macros
[30 Jul 2004 14:57] Sergei Golubchik
I don't see any reference to my_config.h in mysql.h
Thus PACKAGE/VERSION are not exported - one is not expected to include my_config.h
[13 Sep 2004 19:25] Sergei Golubchik
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
[22 Jun 2005 22:22] Christian Hammers
> [30 Jul 2004 16:57] Sergei Golubchik
> I don't see any reference to my_config.h in mysql.h
> Thus PACKAGE/VERSION are not exported - one is not expected to include
> my_config.h

ACK, I guess you can close this bug now, I guess.

bye,

-christian-