summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-04-17 13:18:35 -0700
committerRoland McGrath <roland@redhat.com>2009-04-17 13:18:35 -0700
commitee9d60de465261fd1c1ee275c89b4f486854c9ec (patch)
treef7604346bd7c983253b2aa4ece9132f80c36c43c
parentc6f20e44e767f43219accd53f3211fd980dd2660 (diff)
downloadelfutils-ee9d60de465261fd1c1ee275c89b4f486854c9ec.tar.gz
_ELFUTILS_PREREQ magic update for 0.y.z numbers
-rw-r--r--ChangeLog5
-rw-r--r--config/ChangeLog5
-rw-r--r--config/version.h.in4
-rw-r--r--configure.ac39
4 files changed, 43 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index f6d54aaa..c0e71bd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-17 Roland McGrath <roland@redhat.com>
+
+ * configure.ac (eu_version): Compute number 1000 times larger,
+ let $PACKAGE_VERSION be x.y.z as well as x.y (implied x.y.0).
+
2009-01-23 Roland McGrath <roland@redhat.com>
* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
diff --git a/config/ChangeLog b/config/ChangeLog
index 1ac65534..327e5c1c 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-17 Roland McGrath <roland@redhat.com>
+
+ * version.h.in (_ELFUTILS_PREREQ): Multiple major by 1000000 and minor
+ by 1000; now _ELFUTILS_VERSION is 789000 for version 0.789.
+
2009-01-22 Ulrich Drepper <drepper@redhat.com>
* elfutils.spec.in: Distribute <elfutils/version.h> in
diff --git a/config/version.h.in b/config/version.h.in
index 82c846e9..3de32a34 100644
--- a/config/version.h.in
+++ b/config/version.h.in
@@ -1,5 +1,5 @@
/* Version information about elfutils development libraries.
- Copyright (C) 2008 Red Hat, Inc.
+ Copyright (C) 2008-2009 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -53,6 +53,6 @@
#define _ELFUTILS_VERSION @eu_version@
#define _ELFUTILS_PREREQ(major, minor) \
- (_ELFUTILS_VERSION >= ((major) * 1000 + (minor)))
+ (_ELFUTILS_VERSION >= ((major) * 1000000 + (minor) * 1000))
#endif /* elfutils/version.h */
diff --git a/configure.ac b/configure.ac
index 9013c9a5..c074e973 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,13 +16,13 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software Foundation,
dnl Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
dnl
-AC_INIT([Red Hat elfutils],[0.140],[http://bugzilla.redhat.com/bugzilla/],
+AC_INIT([Red Hat elfutils],[0.140.90],[http://bugzilla.redhat.com/bugzilla/],
[elfutils])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_FILES([config/Makefile])
-AC_COPYRIGHT([Copyright (C) 1996-2008, 2009 Red Hat, Inc.])
+AC_COPYRIGHT([Copyright (C) 1996-2009 Red Hat, Inc.])
AC_PREREQ(2.59) dnl Minimum Autoconf version required.
dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
@@ -259,12 +259,35 @@ AH_BOTTOM([#include <eu-config.h>])
dnl Version compatibility header.
AC_CONFIG_FILES([version.h:config/version.h.in])
AC_SUBST([eu_version])
-case $PACKAGE_VERSION in
-0.???) eu_version=${PACKAGE_VERSION#0.} ;;
-?.???) eu_version=${PACKAGE_VERSION/./} ;;
-?.??) eu_version=${PACKAGE_VERSION/./}0 ;;
-?.?) eu_version=${PACKAGE_VERSION/./}00 ;;
-*) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
+
+# 1.234<whatever> -> 1234<whatever>
+case "$PACKAGE_VERSION" in
+[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
+*) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
+esac
+case "$eu_version" in
+*.*)
+ # 1234.567 -> "1234", "567"
+ eu_extra_version="${eu_version#*.}"
+ eu_version="${eu_version%%.*}"
+ case "$eu_extra_version" in
+ [[0-9]][[0-9]][[0-9]]) ;;
+ [[0-9]][[0-9]]) eu_extra_version="${eu_extra_version}0" ;;
+ [[0-9]]) eu_extra_version="${eu_extra_version}00" ;;
+ *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
+ esac
+ ;;
+*)
+ eu_extra_version=000
+ ;;
+esac
+
+case "$eu_version" in
+ 0[[0-9]][[0-9]][[0-9]]) eu_version="${eu_version#0}$eu_extra_version" ;;
+[[0-9]][[0-9]][[0-9]][[0-9]]) eu_version="${eu_version}$eu_extra_version" ;;
+[[0-9]][[0-9]][[0-9]]) eu_version="${eu_version}0$eu_extra_version" ;;
+[[0-9]][[0-9]]) eu_version="${eu_version}00$eu_extra_version";;
+*) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
esac
AC_OUTPUT