]> www.ginac.de Git - cln.git/commitdiff
don't expose configure generated headers to users.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Wed, 27 Aug 2008 05:51:35 +0000 (09:51 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Wed, 27 Aug 2008 05:51:35 +0000 (09:51 +0400)
Those HAVE_FOO collide with #define's introduced by a package which uses
CLN. The result is very funny (debugging this is not, though).

configure.ac
include/cln/config.h.in [new file with mode: 0644]
include/cln/version.h.in
src/base/cl_maybe_inline.h
src/base/cl_sysdep.h
src/base/digitseq/cl_asm.h
src/base/digitseq/cl_asm_.cc
src/polynomial/elem/cl_asm_GF2.cc

index 21740d925049126f6027249ef26514555e92c67a..63891d00280a7862da90d4156fafb1467f267060 100644 (file)
@@ -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
diff --git a/include/cln/config.h.in b/include/cln/config.h.in
new file mode 100644 (file)
index 0000000..42cfbaf
--- /dev/null
@@ -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 */
+
index 62be9407f85e87856aa0551ed3328991b37e642b..aacd90917da568a61855f5e8834b1aacf80f4700 100644 (file)
@@ -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 {
 
index 77073a38409a10e74613eeab409b50e9c5eb1455..d615cb347db8f83c5cdba65e736abbbd07606c5e 100644 (file)
@@ -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.
index 081ef4c0bb7f41a40ea951d25292a930d5f94e1d..9e645757fa34a2ddd1178a97201b12c47a9cc65c 100644 (file)
@@ -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"
index ccd1d230f2e899d17b6cbbd53f3f44bd05a44307..01ab9c5e4f7539c79b12c7633e73a84bc08a3a09 100644 (file)
@@ -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
index 87df66618a9b4c9d2035c0b1d7e4731c7d504f70..0ca846fced853b88fff62223e7054112f8a16e9a 100644 (file)
@@ -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
index f8b3388d9f3956c4404e16fc83e6defc98f773e6..dbdfb681f33eddc2539cd6da35d905ae551eeae1 100644 (file)
@@ -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"