From ba52b916a1a80101790b82927c062a0619fc2b4d Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 30 Sep 2013 13:28:57 +0200 Subject: [PATCH] Fix: Package version (in configure.ac) is wrong. Fixes #4778 --- configure.ac | 5 +- icinga2.spec => icinga2.spec.in | 4 +- m4/ax_set_version_info.m4 | 178 ---------------------- m4/ax_spec_file.m4 | 133 ---------------- m4/ax_spec_package_version.m4 | 260 -------------------------------- 5 files changed, 4 insertions(+), 576 deletions(-) rename icinga2.spec => icinga2.spec.in (98%) delete mode 100644 m4/ax_set_version_info.m4 delete mode 100644 m4/ax_spec_file.m4 delete mode 100644 m4/ax_spec_package_version.m4 diff --git a/configure.ac b/configure.ac index 4b9dded9c..e0ad29dc8 100644 --- a/configure.ac +++ b/configure.ac @@ -17,9 +17,7 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ -AC_INIT([icinga2], [2.0]) -AX_SPEC_DEFAULTS([icinga2.spec]) -AX_SET_VERSION_INFO +AC_INIT([icinga2], [0.0.3]) AC_CONFIG_AUX_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([subdir-objects]) @@ -161,6 +159,7 @@ AS_AC_EXPAND([ICINGA_PKGDATADIR], $datadir/$PACKAGE) AC_DEFINE_UNQUOTED([ICINGA_PKGDATADIR], "$ICINGA_PKGDATADIR", [The package data dir.]) AC_CONFIG_FILES([ +icinga2.spec Makefile components/Makefile components/checker/Makefile diff --git a/icinga2.spec b/icinga2.spec.in similarity index 98% rename from icinga2.spec rename to icinga2.spec.in index 5b9a04695..d08edced8 100644 --- a/icinga2.spec +++ b/icinga2.spec.in @@ -1,6 +1,6 @@ Summary: network monitoring application -Name: icinga2 -Version: 0.0.2 +Name: @PACKAGE@ +Version: @VERSION@ Release: 1%{?dist} License: GPL Group: Applications/System diff --git a/m4/ax_set_version_info.m4 b/m4/ax_set_version_info.m4 deleted file mode 100644 index b2cb6e249..000000000 --- a/m4/ax_set_version_info.m4 +++ /dev/null @@ -1,178 +0,0 @@ -dnl @synopsis AX_SET_VERSION_INFO [(VERSION [,PREFIX])] -dnl @synopsis default $1 = $PACKAGE_VERSION -dnl @synopsis default $2 = -dnl -dnl This macro is the successor of AC_SET_RELEASEINFO_VERSIONINFO but -dnl it can be used in parallel because it uses all different variables. -dnl -dnl check the $VERSION number and cut the two last digit-sequences off -dnl which will form a -version-info in a @VERSION_INFO@ ac_subst while -dnl the rest is going to the -release name in a @RELEASE_INFO@ -dnl ac_subst. -dnl -dnl you should keep these two seperate - the release-name may contain -dnl alpha-characters and can be modified later with extra release-hints -dnl e.g. RELEASE_INFO="$RELEASE_INFO-debug" for a debug version of your -dnl lib. The $VERSION_INFO however should not be touched. -dnl -dnl example: a VERSION="2.4.18" will be transformed into -dnl -dnl RELEASE_INFO = -release 2 -dnl VERSION_INFO = -versioninfo 4:18 -dnl -dnl then use these two variables and push them to your libtool linker -dnl -dnl libtest_la_LIBADD = @RELEASE_INFO@ @VERSION_INFO@ -dnl -dnl and for a linux-target this will tell libtool to install the lib as -dnl -dnl libmy.so libmy.la libmy.a libmy-2.so.4 libmy-2.so.4.0.18 -dnl -dnl and executables will get link-resolve-infos for libmy-2.so.4 - -dnl therefore the patch-level is ignored during ldso linking, and ldso -dnl will use the one with the highest patchlevel. Using just "-release -dnl $(VERSION)" during libtool-linking would not do that - omitting the -dnl -version-info will libtool install libmy.so libmy.la libmy.a -dnl libmy-2.4.18.so and executables would get hardlinked with the -dnl 2.4.18 version of your lib. -dnl -dnl This background does also explain the default dll name for a win32 -dnl target : libtool will choose to make up libmy-2-4.dll for this -dnl version spec. -dnl -dnl this macro does also set the usual three parts of a version spec -dnl $MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION but does not ac_subst -dnl for the plain AX_SET_VERSION_INFO macro. Use instead one of the -dnl numbered macros AX_SET_VERSION_INFO1 (use first number for release -dnl part) or that AX_SET_VERSION_INFO2 (use the first two numbers for -dnl release part). -dnl -dnl You may add sublevel parts like "1.4.2-ac5" where the sublevel is -dnl just killed from these version/release substvars. That allows to -dnl grab the version off a .spec file like with AX_SPEC_PACKAGE_VERSION -dnl where the $VERSION is used to name a tarball or distpack like -dnl mylib-2.2.9pre4 -dnl -dnl Unlike earlier macros, you can use this one to break up different -dnl VERSIONs and put them into different variables, just hint with -dnl PREFIX-setting - i.e. _VERSION(2.4.5,TEST) will set variables named -dnl TEST_MAJOR_VERSION=2... and of course $TEST_RELEASE_INFO etc. (for -dnl the moment, it needs to be a literal prefix *sigh*) -dnl -dnl @category Misc -dnl @author Guido U. Draheim -dnl @version 2006-10-13 -dnl @license GPLWithACException - -AC_DEFUN([AX_SET_VERSION_INFO1],[dnl -AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl -AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl -AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl -AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl -AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl -AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl -test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION" -AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl -ifelse($1,,$PACKAGE_VERSION,$1) ) - MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )` - MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'` - MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'` - MICRO="$MINOR" - MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'` - MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'` - PATCH="$MICRO" - MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'` - PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'` - if test "_$MICRO" = "_" ; then MICRO="0" ; fi - if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi - MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'` - LTREL="-release $MAJOR" - LTVER="-version-info $MINOR:$MICRO" -AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)]) -AC_SUBST(MAJOR) -AC_SUBST(MINOR) -AC_SUBST(MICRO) -AC_SUBST(PATCH) -AC_SUBST(LTREL) -AC_SUBST(LTVER) -AS_VAR_POPDEF([LTVER])dnl -AS_VAR_POPDEF([LTREL])dnl -AS_VAR_POPDEF([PATCH])dnl -AS_VAR_POPDEF([MICRO])dnl -AS_VAR_POPDEF([MINOR])dnl -AS_VAR_POPDEF([MAJOR])dnl -]) - -AC_DEFUN([AX_SET_VERSION_INFO2],[dnl -AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl -AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl -AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl -AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl -AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl -AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl -test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION" -AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl -ifelse($1,,$PACKAGE_VERSION,$1) ) - MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )` - MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'` - MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'` - MICRO="$MINOR" - MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'` - MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'` - PATCH="$MICRO" - MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'` - PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'` - test "_$MICRO" != "_" || MICRO="0" - if test "_$MINOR" != "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi - MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'` - LTREL="-release $MAJOR.$MINOR" - LTVER="-version-info 0:$MICRO" -AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)]) -AC_SUBST(MAJOR) -AC_SUBST(MINOR) -AC_SUBST(MICRO) -AC_SUBST(PATCH) -AC_SUBST(LTREL) -AC_SUBST(LTVER) -AS_VAR_POPDEF([LTVER])dnl -AS_VAR_POPDEF([LTREL])dnl -AS_VAR_POPDEF([PATCH])dnl -AS_VAR_POPDEF([MICRO])dnl -AS_VAR_POPDEF([MINOR])dnl -AS_VAR_POPDEF([MAJOR])dnl -]) - -AC_DEFUN([AX_SET_VERSION_INFO],[dnl -AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl -AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl -AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl -AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl -AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl -AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl -test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION" -AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl -ifelse($1,,$PACKAGE_VERSION,$1) ) - MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )` - MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'` - MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'` - MICRO="$MINOR" - MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'` - MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'` - PATCH="$MICRO" - MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'` - PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'` - if test "_$MICRO" = "_" ; then MICRO="0" ; fi - if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi - MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'` - LTREL="-release $MAJOR" - LTVER="-version-info $MINOR:$MICRO" -AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)]) -AC_SUBST(LTREL) -AC_SUBST(LTVER) -AS_VAR_POPDEF([LTVER])dnl -AS_VAR_POPDEF([LTREL])dnl -AS_VAR_POPDEF([PATCH])dnl -AS_VAR_POPDEF([MICRO])dnl -AS_VAR_POPDEF([MINOR])dnl -AS_VAR_POPDEF([MAJOR])dnl -]) diff --git a/m4/ax_spec_file.m4 b/m4/ax_spec_file.m4 deleted file mode 100644 index 271c5c080..000000000 --- a/m4/ax_spec_file.m4 +++ /dev/null @@ -1,133 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_spec_file.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_SPEC_FILE [(rpmspecfile [,subdirpath])] -# -# DESCRIPTION -# -# set the specfile - if no argument has been given then check whether the -# ac_unique_file looks like a .spec file and use it. This macro is -# ac_REQUIRED by many AX_SPEC_ routines. -# -# the AX_SPEC_EXTRACT macro is a helper used by many AX_SPEC_ routines and -# therefore placed here to be automatically included in the macro set of -# (older) aclocal/acinclude. -# -# AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]]) -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 9 - -AC_DEFUN([AX_SPEC_FILE], -[ AC_MSG_CHECKING([rpm spec file]) - if test ".$1" != "." ; then - ax_spec_file_="$1" - ax_spec_file=`basename $1` - else - case ".$ac_unique_file" in - *.spec) ax_spec_file="$ac_unique_file" - ax_spec_file_="$ac_unique_file" ;; - *) ax_spec_file="TODO" - if test ".$PACKAGE" != "." - then ax_spec_file_="$PACKAGE.spec" - else ax_spec_file_="README" - fi - cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) < -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 7 - -AC_DEFUN([AX_SPEC_PACKAGE_LICENSE],[AC_REQUIRE([AX_SPEC_FILE])dnl - AS_VAR_PUSHDEF([VAR],[PACKAGE_LICENSE])dnl - AC_MSG_CHECKING([for spec license type]) - if test ".$VAR" = "." ; then if test ! -f $ax_spec_file - then k="(w/o spec)" - else k="" - AX_SPEC_EXTRACT(VAR,[license],m4_ifval($1,$1)) - VAR=`echo $VAR | sed -e 's/ *License//g'` - fi fi - test ".$VAR" = "." && k="(fallback)" - ifelse($2,,[dnl here the defaults for LICENSE / COPYRIGHT - if test ".$VAR" = "." ; then - for ac_file in "$srcdir/COPYING" "$srcdir/COPYING" "$srcdir/LICENSE" ; do - test -f "$ac_file" || continue -dnl http://www.ibiblio.org/osrt/omf/omf_elements "16. Rights" - if grep "GNU LESSER GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null - then VAR="GNU LGPL" ; break - elif grep "GNU GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null - then VAR="GNU GPL" ; break - elif grep "MOZILLA PUBLIC LICENSE" "$ac_file" >/dev/null - then VAR="MPL" ; break - elif grep "Mozilla Public License" "$ac_file" >/dev/null - then VAR="MPL" ; break - elif grep -i "artistic license" "$ac_file" >/dev/null - then VAR="Artistic" ; break - elif grep -i "artistic control" "$ac_file" >/dev/null - then VAR="Artistic" ; break - elif grep -i "semblance of artistic" "$ac_file" >/dev/null - then VAR="Artistic" ; break - elif grep -i "above copyright notice" "$ac_file" >/dev/null - then VAR="BSD" ; break - fi - done - if test ".$VAR" = "." ; then - if test "$srcdir/COPYING.LIB" ; then VAR="GNU LGPL" - elif test ".$ltmain" != "." ; then VAR="GNU LGPL" - else VAR="GNU GPL" - fi - fi - fi - ],[test ".$VAR" = "." && VAR="$2"]) - test "$VAR" = "GPL" && VAR="GNU GPL" - test "$VAR" = "LGPL" && VAR="GNU LGPL" - AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) - AS_VAR_POPDEF([VAR])dnl -]) - -AC_DEFUN([AX_SPEC_PACKAGE_SUMMARY],[AC_REQUIRE([AX_SPEC_FILE])dnl - AS_VAR_PUSHDEF([VAR],[PACKAGE_SUMMARY])dnl - AC_MSG_CHECKING([for spec summary]) - if test ".$VAR" = "." ; then if test ! -f $ax_spec_file - then k="(w/o spec)" - else k="" - AX_SPEC_EXTRACT(VAR,[summary],m4_ifval($1,$1)) - fi fi - test ".$VAR" = "." && k="(fallback)" - ifelse($2,,[dnl here the defaults for SUMMARY - if test ".$VAR" = "." ; then VAR="$PACKAGE" - test ".$VAR" = "." && VAR="foo" - test ".$ltmain" != "." && VAR="$VAR library" - fi - ],[test ".$VAR" = "." && VAR="$2"]) - AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) - AS_VAR_POPDEF([VAR])dnl -]) - -AC_DEFUN([AX_SPEC_PACKAGE_ICON],[AC_REQUIRE([AX_SPEC_FILE])dnl - AS_VAR_PUSHDEF([VAR],[PACKAGE_ICON])dnl - AC_MSG_CHECKING([for spec icon]) - if test ".$VAR" = "." ; then if test ! -f $ax_spec_file - then k="(w/o spec)" - else k="" - AX_SPEC_EXTRACT(VAR,[icon],m4_ifval($1,$1)) - fi fi - test ".$VAR" = "." && k="(fallback)" - ifelse($2,,[dnl here the defaults for ICON - if test ".$VAR" = "." ; then VAR="$PACKAGE-icon.png" ; fi - ],[test ".$VAR" = "." && VAR="$2"]) - AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) - AS_VAR_POPDEF([VAR])dnl -]) - -AC_DEFUN([AX_SPEC_PACKAGE_CATEGORY],[AC_REQUIRE([AX_SPEC_FILE])dnl - AS_VAR_PUSHDEF([VAR],[PACKAGE_CATEGORY])dnl - AC_MSG_CHECKING([for spec category]) - if test ".$VAR" = "." ; then if test ! -f $ax_spec_file - then k="(w/o spec)" - else k="" - AX_SPEC_EXTRACT(VAR,[group],m4_ifval($1,$1)) - VAR=`echo $VAR | sed -e 's/ /-/g'` - fi fi - test ".$VAR" = "." && k="(fallback)" - ifelse($2,,[dnl here the defaults for CATEGORY - if test ".$VAR" = "." ; then if test ".$ltmain" != "." - then VAR="Development/Library" - else VAR="Development/Other" - fi fi - ],[test ".$VAR" = "." && VAR="$2"]) - AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) - AS_VAR_POPDEF([VAR])dnl -]) - -AC_DEFUN([AX_SPEC_PACKAGE_NAME],[AC_REQUIRE([AX_SPEC_FILE])dnl - AS_VAR_PUSHDEF([VAR],[PACKAGE_NAME])dnl - AC_MSG_CHECKING([for spec package]) - if test ".$VAR" = "." ; then if test ! -f $ax_spec_file - then k="(w/o spec)" - else k="" - AX_SPEC_EXTRACT(VAR,[name],m4_ifval($1,$1)) - VAR=`echo $VAR | sed -e 's/ /-/g'` - fi fi - test ".$VAR" = "." && k="(fallback)" - ifelse($2,,[dnl here the defaults for PACKAGE - test ".$VAR" = "." && VAR=`basename $ax_spec_file .spec` - test ".$VAR" = ".README" && VAR="TODO" - test ".$VAR" = ".TODO" && VAR="foo" - ],[test ".$VAR" = "." && VAR="$2"]) - test "VAR" = "PACKAGE_NAME" && test ".$PACKAGE" = "." && PACKAGE="$VAR" - AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) - AS_VAR_POPDEF([VAR])dnl -]) - -AC_DEFUN([AX_SPEC_PACKAGE_VERSION_],[AC_REQUIRE([AX_SPEC_FILE])dnl - AS_VAR_PUSHDEF([VAR],[PACKAGE_VERSION])dnl - AC_MSG_CHECKING([for spec version]) - if test ".$VAR" = "." ; then if test ! -f $ax_spec_file - then k="(w/o spec)" - else k="" - AX_SPEC_EXTRACT(VAR,[version],m4_ifval($1,$1)) - VAR=`echo $VAR | sed -e 's/ /-/g'` - fi fi - test ".$VAR" = "." && k="(fallback)" - ifelse($2,,[dnl here the defaults for VERSION - test ".$VAR" = "." && VAR=`date +0.%y.%W%w` - ],[test ".$VAR" = "." && VAR="$2"]) - test "VAR" = "PACKAGE_VERSION" && test ".$VERSION" = "." && VERSION="$VAR" - case "$VAR" in # note we set traditional VERSION before cleaning things up - *.*.) VAR="$VAR"`date +%W%w` ;; - *.*.*) ;; - *.) VAR="$VAR"`date +%y.%W%w` ;; - *.*) VAR="$VAR.0" ;; - *) VAR=AS_TR_SH([$VAR]) ; VAR="$VAR.`date +%y.%W%w`" ;; - esac - VAR=`echo $VAR | sed -e "s/[[.]][0]\\([0-9]\\)/.\\1/g"` - AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) - AS_VAR_POPDEF([VAR])dnl -]) - -dnl for compatibility, we define ax_spec_package_version -dnl to do all of ax_spec_package_name as well. -AC_DEFUN([AX_SPEC_PACKAGE_VERSION],[AC_REQUIRE([AX_SPEC_FILE])dnl - ifelse($1,, - AC_MSG_WARN([please use ax_spec_package_AND_version now!]), - AC_MSG_ERROR([please use ax_spec_package_AND_version now!])) - AX_SPEC_PACKAGE_NAME - AX_SPEC_PACKAGE_VERSION_ - -]) - -AC_DEFUN([AX_SPEC_PACKAGE_AND_VERSION],[ - m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)]) - AX_SPEC_PACKAGE_NAME - AX_SPEC_PACKAGE_VERSION_ -]) - -AC_DEFUN([AX_SPEC_DEFAULTS],[ - m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)]) - AX_SPEC_PACKAGE_NAME - AX_SPEC_PACKAGE_VERSION_ - AX_SPEC_PACKAGE_LICENSE - AX_SPEC_PACKAGE_SUMMARY - AX_SPEC_PACKAGE_CATEGORY - AX_SPEC_PACKAGE_ICON -])