Browse Source

don't expose configure generated headers to users.

Those HAVE_FOO collide with #define's introduced by a package which uses
CLN. The result is very funny (debugging this is not, though).
master
Alexei Sheplyakov 17 years ago
parent
commit
ee196a3717
  1. 6
      configure.ac
  2. 14
      include/cln/config.h.in
  3. 16
      include/cln/version.h.in
  4. 2
      src/base/cl_maybe_inline.h
  5. 2
      src/base/cl_sysdep.h
  6. 2
      src/base/digitseq/cl_asm.h
  7. 2
      src/base/digitseq/cl_asm_.cc
  8. 2
      src/polynomial/elem/cl_asm_GF2.cc

6
configure.ac

@ -24,10 +24,14 @@ AC_INIT([cln], cln_version)
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR(src/integer/gcd/cl_I_gcd.cc)
AC_CONFIG_AUX_DIR([autoconf])
AC_CONFIG_HEADERS(include/cln/config.h include/cln/host_cpu.h include/cln/version.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/timing/cl_t_config.h)
AC_CONFIG_HEADERS(autoconf/cl_config.h include/cln/config.h include/cln/host_cpu.h include/cln/version.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/timing/cl_t_config.h)
AM_INIT_AUTOMAKE([foreign 1.8 dist-bzip2])
AH_TOP([#ifdef _CL_CONFIG_H])
AH_TOP([#include "cln/host_cpu.h"])
AH_TOP([/* prevents cln/config.h from being included, so no macro gets redefined */])
AH_TOP([#define _CL_CONFIG_PUBLIC_H])
AH_TOP([/* prevents cln/version.h from being included, so no macro gets redefined */])
AH_TOP([#define _CL_VERSION_H])
AH_BOTTOM([#endif /* _CL_CONFIG_H */])
dnl checks for programs

14
include/cln/config.h.in

@ -0,0 +1,14 @@
#ifdef _CL_CONFIG_PUBLIC_H
#include "cln/host_cpu.h"
#include "cln/version.h"
/*
* FIXME: this should not be exposed to user. Or at least it should be
* renamed to CL_HAVE_LONGLONG or something like that.
*/
/* compiler supports the `long long' type */
#undef HAVE_LONGLONG
#endif /* _CL_CONFIG_PUBLIC_H */

16
include/cln/version.h.in

@ -1,15 +1,19 @@
// Version information (cf. cln.m4)
/* CLN version information */
#ifndef _CL_VERSION_H
#define _CL_VERSION_H
/* These definitions are adjusted by `configure' automatically. */
/* CLN release number */
#undef CL_VERSION
/* Major version number of CLN */
#undef CL_VERSION_MAJOR
#define CL_VERSION_MAJOR 1
#define CL_VERSION_MINOR 1
#define CL_VERSION_PATCHLEVEL 0
#define CL_VERSION 1.1.0
/* Minor version number of CLN */
#undef CL_VERSION_MINOR
/* Patchlevel version number of CLN */
#undef CL_VERSION_PATCHLEVEL
namespace cln {

2
src/base/cl_maybe_inline.h

@ -3,7 +3,7 @@
#ifndef _CL_MAYBE_INLINE_H
#define _CL_MAYBE_INLINE_H
#include "cln/config.h"
#include "cl_config.h"
/*
* Selectively inline a function in *some* translation units.

2
src/base/cl_sysdep.h

@ -4,7 +4,7 @@
#define _CL_SYSDEP_H
// CPU and other
#include "cln/config.h"
#include "cl_config.h"
// char_bitsize, short_bitsize, long_bitsize, long_long_bitsize
#include "cln/intparam.h"

2
src/base/digitseq/cl_asm.h

@ -1,6 +1,6 @@
// Includes the CPU specific cl_asm_*.h file.
#include "cln/config.h"
#include "cl_config.h"
#include "base/digitseq/cl_DS_endian.h"
#ifndef NO_ASM

2
src/base/digitseq/cl_asm_.cc

@ -1,6 +1,6 @@
// Includes the CPU specific cl_asm_*.cc file.
#include "cln/config.h"
#include "cl_config.h"
#include "base/digitseq/cl_DS_endian.h"
#ifndef NO_ASM

2
src/polynomial/elem/cl_asm_GF2.cc

@ -1,6 +1,6 @@
// Includes the CPU specific cl_asm_*.cc file.
#include "cln/config.h"
#include "cl_config.h"
#if defined(__sparc__) || defined(__sparc64__)
#include "cl_asm_sparc_GF2.cc"

Loading…
Cancel
Save