[gmx-developers] config.h name and location
Sander Pronk
pronk at cbr.su.se
Mon Jul 5 12:16:20 CEST 2010
In bug #439 (http://bugzilla.gromacs.org/show_bug.cgi?id=439), Christoph Junghans raises the point that config.h is necessary to be able to successfully compile 3d party tools using gmxlib (for the definition of what a 'real' is, for example).
There are several problems, however, with the current approach:
1) The location of config.h is currently in the source directory, not in the include directory.
2) config.h typically gets included with a conditional:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
so we need to have HAVE_CONFIG_H defined. This is appropriate for packages where the API doesn't depend on the presence of config.h, but not for gromacs.
3) This variable HAVE_CONFIG_H is sure to lead to name clashes with other packages.
4) The name 'config.h' can also lead to name clashes.
To solve this, I propose that we rename config.h to gmxconfig.h, move it to the include directory, and get rid of the HAVE_CONFIG_H test
.
Does anybody object?
Sander
More information about the gromacs.org_gmx-developers
mailing list