]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
_ELFUTILS_PREREQ magic update for 0.y.z numbers
authorRoland McGrath <roland@redhat.com>
Fri, 17 Apr 2009 20:18:35 +0000 (13:18 -0700)
committerRoland McGrath <roland@redhat.com>
Fri, 17 Apr 2009 20:18:35 +0000 (13:18 -0700)
ChangeLog
config/ChangeLog
config/version.h.in
configure.ac

index f6d54aaa269ff2f4a4f30c003f32d21ae8d6c729..c0e71bd701af108d66a4c5727f815f8084eca9ea 100644 (file)
--- 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.
index 1ac65534e79fabf9b28532062e516819c4118e7d..327e5c1c9f52fd1e3d18558671ddd0e43c273ede 100644 (file)
@@ -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
index 82c846e9dd98fcf786eca336a7d9ee381156a7a1..3de32a34aa36adb43f5f02e533b380b0e090384a 100644 (file)
@@ -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 */
index 9013c9a52184b85e5e77739c7eee201d92e5309d..c074e9739b3ace44816405a7dd482accc283797f 100644 (file)
@@ -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