diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-09-09 12:50:50 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-09-09 12:50:50 +0000 |
commit | 5e1dd23ad5ed2fe8b0a618a9f9e10eac1694fe2b (patch) | |
tree | fb59afccbff16075ac39b00fe5d81340a2612741 /dists/autogen/m4/ax_extract_version.m4 | |
parent | f3e8cb5a09ada2c74292047f2fad4fd47a01b99a (diff) | |
download | usdx-5e1dd23ad5ed2fe8b0a618a9f9e10eac1694fe2b.tar.gz usdx-5e1dd23ad5ed2fe8b0a618a9f9e10eac1694fe2b.tar.xz usdx-5e1dd23ad5ed2fe8b0a618a9f9e10eac1694fe2b.zip |
- better conformance of Makefiles to GNU coding standards
- bindir/prefix, etc. can be changed anytime make is performed and is not hardcoded on configure time anymore
- paths are written to the intermediate paths.inc file (instead of config-xyz.inc)
- binary is not stripped anymore
- fpc.m4 rewrite
- additional options like heaptrace, range-checks
- noexecstack workaround
- some more changes
- configure.ac helper functions moved to ax_ectract_version.m4 and pkg_config_utils.m4
- some icons moved from artwork to icons
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1351 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | dists/autogen/m4/ax_extract_version.m4 | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dists/autogen/m4/ax_extract_version.m4 b/dists/autogen/m4/ax_extract_version.m4 new file mode 100644 index 00000000..e9501f69 --- /dev/null +++ b/dists/autogen/m4/ax_extract_version.m4 @@ -0,0 +1,54 @@ +# This file is part of UltraStar Deluxe +# Created by the UltraStar Deluxe Team + +# SYNOPSIS +# +# AX_EXTRACT_VERSION(VARIABLE_PREFIX, VERSION) +# +# DESCRIPTION +# +# Splits a version number ("major.minor.release") into its components. +# The resulting components of the version are guaranteed to be +# numeric. All non-numeric chars are removed. +# +# Sets +# [$VARIABLE_PREFIX]_VERSION_MAJOR +# [$VARIABLE_PREFIX]_VERSION_MINOR +# [$VARIABLE_PREFIX]_VERSION_RELEASE +# +# This function calls +# AC_SUBST([$VARIABLE_PREFIX]_VERSION_type] for each type + +AC_DEFUN([AX_EXTRACT_VERSION], +[ + version=[$2] + + # strip leading non-numeric tokens + # (necessary for some ffmpeg-packages in ubuntu) + # example: 0d.51.1.0 -> 51.1.0 + version=`echo $version | sed 's/^[[^.]]*[[^0-9.]][[^.]]*\.//'` + + # replace "." and "-" with " " and ignore trailing tokens. + # 1.23.4-r2 will be splitted to [maj=1, min=23, rel=4]. + # In addition we delete everything after the first character + # which is not 0-9. + # 1.3a4-r32 will be [maj=1, min=3, rel=0]. + read major minor release ignore <<eof + `echo $version | tr '.-' ' ' | sed 's/[[^0-9\ ]].*//'` +eof + # Note: Do NOT indent the eof-delimiter + # We use a here-document (<<< here-strings not POSIX compatible) + + # strip preceding 0s and set unset version-parts to 0 + [$1][_VERSION_MAJOR]=$(($major)) + [$1][_VERSION_MINOR]=$(($minor)) + [$1][_VERSION_RELEASE]=$(($release)) + # integer representation: MMMmmmrrr (M:major,m:minor,r:release) + # can be used if pkg-config's comparison fails + [$1][_VERSION_INT]=$(($[$1][_VERSION_MAJOR]*1000000+$[$1][_VERSION_MINOR]*1000+$[$1][_VERSION_RELEASE])) + + AC_SUBST([$1][_VERSION_MAJOR]) + AC_SUBST([$1][_VERSION_MINOR]) + AC_SUBST([$1][_VERSION_RELEASE]) + AC_SUBST([$1][_VERSION_INT]) +]) |