Bug #1390 mysql_config returns incorrect paths
Submitted: 24 Sep 2003 11:31 Modified: 28 Sep 2003 12:26
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:4.0.13 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[24 Sep 2003 11:31] [ name withheld ]
Description:
The mysql_config script is broken. On my system under Cygwin it always returns the system defaults, not the correct (local) paths.

How to repeat:
Install MySql and Cygwin, with MySql not in the Cygwin directory structure. Run "mysql_config --cflags" and it reports that the include directory is the default '/usr/local/include/mysql/include' even though it should be something with a '/X/' (where X is the drive letter of the MySql install path).

Suggested fix:
1) Change the sed command in line 65 from 's;/./;/;' to 's;/\./;/;'. 

If one is using Cygwin, the sequence '/c/' or '/d/' is likely 
to occur. The existing RE will clip that instead of the literal '/./'. The addition of the backslash forces a match for a literal '.' instead of any character.

2) Change the sed command in line 72 from 's;/bin/mysql_config;;' to 
's;/scripts/mysql_config;;'.

This is because the mysql_config script is in the "scripts" directory, not the "bin" directory.
[28 Sep 2003 12:26] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Thank you for the bugreport and the fix.

I fixed /./ issue in 4.0.16
As for bin vs. scripts, I think bin/ is in fact correct, as mysql_config is installed in bin/, though in the source tree it's located in scripts/