summaryrefslogtreecommitdiff
path: root/config_ver.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-05-17 15:18:17 -0400
committerGitHub <noreply@github.com>2019-05-17 15:18:17 -0400
commitc51f0ecbfd21b1eb29cfd26ea870b175d92db6c6 (patch)
tree87f0f2dbe92e25d2816ab6077e93714b2e69d863 /config_ver.h
parentb25b6f0892ebab5cc8a5e8c494c0db69057e1ba8 (diff)
downloadcryptopp-git-c51f0ecbfd21b1eb29cfd26ea870b175d92db6c6.tar.gz
Make config.h more Autoconf friendly (GH #835, PR #836)
Diffstat (limited to 'config_ver.h')
-rw-r--r--config_ver.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/config_ver.h b/config_ver.h
new file mode 100644
index 00000000..7369f5ef
--- /dev/null
+++ b/config_ver.h
@@ -0,0 +1,46 @@
+// config_ver.h - written and placed in public domain by Jeffrey Walton
+// the bits that make up this source file are from the
+// library's monolithic config.h.
+
+/// \file config_ver.h
+/// \brief Library configuration file
+/// \details <tt>config.h</tt> was split into components in May 2019 to better
+/// integrate with Autoconf and its feature tests. The splitting occured so
+/// users could continue to include <tt>config.h</tt> while allowing Autoconf
+/// to write new <tt>config_asm.h</tt> and new <tt>config_cxx.h</tt> using
+/// its feature tests.
+/// \sa <A HREF="https://github.com/weidai11/cryptopp/issues/835">Issue 835</A>
+/// \since Crypto++ 8.3
+
+#ifndef CRYPTOPP_CONFIG_VERSION_H
+#define CRYPTOPP_CONFIG_VERSION_H
+
+// Library version macro. Since this macro is in a header, it reflects
+// the version of the library the headers came from. It is not
+// necessarily the version of the library built as a shared object if
+// versions are inadvertently mixed and matched.
+#define CRYPTOPP_MAJOR 8
+#define CRYPTOPP_MINOR 3
+#define CRYPTOPP_REVISION 0
+#define CRYPTOPP_VERSION 830
+
+#ifdef __GNUC__
+# define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#endif
+
+#if defined(__xlc__) || defined(__xlC__)
+# define CRYPTOPP_XLC_VERSION ((__xlC__ / 256) * 10000 + (__xlC__ % 256) * 100)
+#endif
+
+// Apple and LLVM's Clang. Apple Clang version 7.0 roughly equals LLVM Clang version 3.7
+#if defined(__clang__) && defined(__apple_build_version__)
+# define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
+#elif defined(__clang__)
+# define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
+#endif
+
+#ifdef _MSC_VER
+# define CRYPTOPP_MSC_VERSION (_MSC_VER)
+#endif
+
+#endif // CRYPTOPP_CONFIG_VERSION_H