Opened 14 years ago

Closed 14 years ago

#355 closed defect (fixed)

installation of config.h is flawed

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.5
Component: build Version: trunk
Keywords: Cc:


related to tickets: #347 and #336

config.h is located in topdir, which suggest that

#include "config.h"

would do it.

However, looking at my installation, I find config.h in /usr/local/include/yat/, which means I have to include it as

#include "yat/config.h"

if I want the include to work also after installation.

Of course, this is not a problem if I include into a source file; this is only an issue when including into a header file (that in turn will be included...)

Change History (3)

comment:1 Changed 14 years ago by Peter

Milestone: yat 0.x+yat 0.5

Although I've seen suggestions that config.h should not be installed at all, I suggest that we keep on installing it, and move it to @top_builddir@/yat/.

Then including config.h as

#include "yat/config.h"

we should assure that @top_builddir@ is in the include path. That is currently the case, but I suspect it could be because autotools add the directory of the config.h so we should be careful here. Especially since we already have @top_srcdir@ in our path. Easiest way to test that everything works is to build using a VPATH or simply try make distcheck`.

comment:2 Changed 14 years ago by Peter

Owner: changed from Jari Häkkinen to Peter
Status: newassigned

I start to believe it is a better idea not to install config.h. Because defines like

#define HAVE_STDINT_H 1

is pretty useless for someone using yat, in other words, if the user need that kind of information she should create her own config.h. The only exceptions are the the version information that could be useful, see e.g. APR Compile-time Checks.

Therefore, I think we should exclude config.h from installation and copy version info to version.h

comment:3 Changed 14 years ago by Peter

Resolution: fixed
Status: assignedclosed

(in [1319]) config.h is no longer installed. Therefore, do not include config.h into other header files. Instead there is a yat/yat-config.h which will be installed and can therefore be used in header files. The yat-config contains the same information as config.h but variables are prefix'd with a YAT_. I had to change style in version.m4 due to a variable clash between variables set in version.m4 and variables I wanted in config.h.

Note: See TracTickets for help on using tickets.