1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
"http://www.w3.org/TR/html4/strict.dtd">
6
Autoconf Macro: ac_define_versionlevel
8
<link rel="stylesheet" type="text/css" href="autoconf-archive.css">
11
<table summary="web navigation" style="width:100%;">
14
<td style="width:25%;" align="center" valign="top">
16
"http://autoconf-archive.cryp.to/ac_define_versionlevel.m4">Download M4
19
<td style="width:25%;" align="center" valign="top">
21
"http://git.cryp.to/autoconf-archive?a=history;f=ac_define_versionlevel.m4">
24
<td style="width:25%;" align="center" valign="top">
25
<a href="macros-by-category.html">Category Index</a>
27
<td style="width:25%;" align="center" valign="top">
28
<form method="get" action="http://www.google.com/search">
30
<input name="sitesearch" value="autoconf-archive.cryp.to" type=
31
"hidden"><a href="http://www.google.com/">Search</a>: <input name="q"
32
size="10" maxlength="255" type="text">
41
ac_define_versionlevel
47
Superseded by <a href="ac_set_versionlevel.html">AC_SET_VERSIONLEVEL</a>.
52
<p class="indent" style="white-space:nowrap;">
53
<code>AC_DEFINE_VERSIONLEVEL(VARNAME [,VERSION [, DESCRIPTION]])</code>
60
if the VERSION is ommitted, shellvar $VERSION is used as defined by
61
AM_INIT_AUTOMAKE's second argument.
64
The versionlevel is the numeric representation of the given version string,
65
thereby assuming the inputversion is a string with (maximal) three decimal
66
numbers seperated by "."-dots. A "-patch" adds a percent.
69
typical usage: AM_INIT_AUTOMAKE(mypkg,4.12.3)
70
AC_DEFINE_VERSIONLEVEL(MYPKG_VERSION)
73
the config.h created from autoheader's config.h.in will contain... /* mypkg
74
versionlevel */ #define MYPKG_VERSION 4120003
77
the MYKG_VERSION will be defined as both a shell-variable and AC_DEFINE
102
Guido U. Draheim <guidod@gmx.de>
114
<pre class="m4source">
115
AC_DEFUN([AC_DEFINE_VERSIONLEVEL],
117
ac_versionlevel_strdf=`echo ifelse($2, , $VERSION, $2) | sed -e 's:[[A-Z-]]*:.:' -e 's:[[^0-9.]]::g' -e 's:^[[.]]*::'`
118
AC_MSG_CHECKING(versionlevel $ac_versionlevel_strdf)
119
case $ac_versionlevel_strdf in
121
ac_versionlevel_major=`echo $ac_versionlevel_strdf`
122
ac_versionlevel_minor=`echo $ac_versionlevel_major | sed -e 's/[[^.]]*[[.]]//'`
123
ac_versionlevel_patch=`echo $ac_versionlevel_minor | sed -e 's/[[^.]]*[[.]]//'`
124
ac_versionlevel_major=`echo $ac_versionlevel_major | sed -e 's/[[.]].*//'`
125
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
126
ac_versionlevel_patch=`echo $ac_versionlevel_patch | sed -e 's/[[.]].*//'`
127
$1=`expr $ac_versionlevel_major '*' 1000000 \
128
+ $ac_versionlevel_minor '*' 10000 \
129
+ $ac_versionlevel_patch \
132
ac_versionlevel_major=`echo $ac_versionlevel_strdf`
133
ac_versionlevel_minor=`echo $ac_versionlevel_major | sed -e 's/[[^.]]*[[.]]//'`
134
ac_versionlevel_patch=`echo $ac_versionlevel_minor | sed -e 's/[[^.]]*[[.]]//'`
135
ac_versionlevel_major=`echo $ac_versionlevel_major | sed -e 's/[[.]].*//'`
136
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
137
ac_versionlevel_patch=`echo $ac_versionlevel_patch | sed -e 's/[[.]].*//'`
138
$1=`expr $ac_versionlevel_major '*' 1000000 \
139
+ $ac_versionlevel_minor '*' 10000 \
140
+ $ac_versionlevel_patch` ;;
142
ac_versionlevel_major=`echo $ac_versionlevel_strdf`
143
ac_versionlevel_minor=`echo $ac_versionlevel_major | sed -e 's/[[^.]]*[[.]]//'`
144
ac_versionlevel_major=`echo $ac_versionlevel_major | sed -e 's/[[.]].*//'`
145
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
146
ac_versionlevel_patch=0
147
$1=`expr $ac_versionlevel_major '*' 1000000 \
148
+ $ac_versionlevel_minor '*' 10000 \
150
+ $ac_versionlevel_patch` ;;
152
ac_versionlevel_major=`echo $ac_versionlevel_strdf`
153
ac_versionlevel_minor=`echo $ac_versionlevel_major | sed -e 's/[[^.]]*[[.]]//'`
154
ac_versionlevel_major=`echo $ac_versionlevel_major | sed -e 's/[[.]].*//'`
155
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
156
ac_versionlevel_patch=0
157
$1=`expr $ac_versionlevel_major '*' 1000000 \
158
+ $ac_versionlevel_minor '*' 10000 \
159
+ $ac_versionlevel_patch` ;;
161
ac_versionlevel_major=0
162
ac_versionlevel_minor=`echo $ac_versionlevel_strdf`
163
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
164
ac_versionlevel_patch=0
165
$1=`expr $ac_versionlevel_major '*' 1000000 \
166
+ $ac_versionlevel_minor '*' 10000 \
168
+ $ac_versionlevel_patch` ;;
170
ac_versionlevel_major=0
171
ac_versionlevel_minor=`echo $ac_versionlevel_strdf`
172
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
173
ac_versionlevel_patch=0
174
$1=`expr $ac_versionlevel_major '*' 1000000 \
175
+ $ac_versionlevel_minor '*' 10000 \
176
+ $ac_versionlevel_patch` ;;
179
AC_DEFINE_UNQUOTED( $1, $[$1], ifelse( $3, , $PACKAGE versionlevel, $3))
187
<span style="white-space:nowrap;">Copyright © 2008 Guido U. Draheim
188
<guidod@gmx.de></span>
190
This program is free software; you can redistribute it and/or modify it
191
under the terms of the GNU General Public License as published by the Free
192
Software Foundation; either version 2 of the License, or (at your option)
196
This program is distributed in the hope that it will be useful, but WITHOUT
197
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
198
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
202
You should have received a copy of the GNU General Public License along
203
with this program. If not, see <<a href=
204
"http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.
207
As a special exception, the respective Autoconf Macro's copyright owner
208
gives unlimited permission to copy, distribute and modify the configure
209
scripts that are the output of Autoconf when processing the Macro. You need
210
not follow the terms of the GNU General Public License when using or
211
distributing such scripts, even though portions of the text of the Macro
212
appear in them. The GNU General Public License (GPL) does govern all other
213
use of the material that constitutes the Autoconf Macro.
216
This special exception to the GPL applies to versions of the Autoconf Macro
217
released by the Autoconf Macro Archive. When you make and distribute a
218
modified version of the Autoconf Macro, you may extend this special
219
exception to the GPL to apply to your modified version as well.