Looking at the current checks for botan versions it seems that if I happened
to have 1.8.12 we would let it in because we check for major ==1 and patch
between 8 and 17.
Would using the version macros that botan defines be a better way to check
things?
Here's what I'm talking about:
#
# old_revision [65c86292f2fe48513d3838b348c8b3b745c80d80]
#
# patch "m4/botan.m4"
# from [af36e8abd5d4a0159409387ab8cd56c55dcb00de]
# to [c3b115c9be716601db0f21612a5a6b1e4ac720ab]
#
============================================================
--- m4/botan.m4 af36e8abd5d4a0159409387ab8cd56c55dcb00de
+++ m4/botan.m4 c3b115c9be716601db0f21612a5a6b1e4ac720ab
@@ -22,27 +22,9 @@ AC_DEFUN([MTN_FIND_BOTAN],
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOTAN_CPPFLAGS"
AC_PREPROC_IFELSE([
-#include <botan/build.h>
+#include <botan/version.h>
-#ifndef BOTAN_VERSION_MAJOR
-#error "Botan did not define version macros"
-#endif
-
-#if BOTAN_VERSION_MAJOR != 1
-#error "Botan major version mismatch."
-#endif],
- [botan_version_match=yes],
- [botan_version_match=no])
- if test $botan_version_match = no; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Your botan library version not match
($BOTAN_VERSION).])
- fi
-
- # prevent from building against older, no longer supported versions
- AC_PREPROC_IFELSE([
-#include <botan/build.h>
-
-#if BOTAN_VERSION_PATCH < 8
+#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,7,8)
#error "Botan is too old"
#endif],
[botan_version_match=yes],
@@ -54,9 +36,9 @@ AC_DEFUN([MTN_FIND_BOTAN],
# check against unknown versions from the future and warn
AC_PREPROC_IFELSE([
-#include <botan/build.h>
+#include <botan/version.h>
-#if BOTAN_VERSION_PATCH > 17
+#if BOTAN_VERSION_CODE > BOTAN_VERSION_CODE_FOR(1,7,17)
#error "Botan from the future"
#endif],
[botan_version_match=yes],
Cheers,
Derek
_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel