~ubuntu-branches/ubuntu/lucid/autoconf-archive/lucid

« back to all changes in this revision

Viewing changes to html/ac_define_versionlevel.html

  • Committer: Bazaar Package Importer
  • Author(s): Deng Xiyue
  • Date: 2009-05-12 17:30:18 UTC
  • mfrom: (1.1.9 upstream) (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090512173018-s7y88nfoxpaauztk
Tags: 20090426-1
* New upstream release.
* Update Standard-Version to 3.8.1:
  + List original Debianizer.
  + Point to versioned license file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
 
"http://www.w3.org/TR/html4/strict.dtd">
3
 
<html lang="en">
4
 
 <head>
5
 
  <title>
6
 
   Autoconf Macro: ac_define_versionlevel
7
 
  </title>
8
 
  <link rel="stylesheet" type="text/css" href="autoconf-archive.css">
9
 
 </head>
10
 
 <body>
11
 
  <table summary="web navigation" style="width:100%;">
12
 
   <tbody>
13
 
    <tr>
14
 
     <td style="width:25%;" align="center" valign="top">
15
 
      <a href=
16
 
      "http://autoconf-archive.cryp.to/ac_define_versionlevel.m4">Download M4
17
 
      Source</a>
18
 
     </td>
19
 
     <td style="width:25%;" align="center" valign="top">
20
 
      <a href=
21
 
      "http://git.cryp.to/autoconf-archive?a=history;f=ac_define_versionlevel.m4">
22
 
      Macro History</a>
23
 
     </td>
24
 
     <td style="width:25%;" align="center" valign="top">
25
 
      <a href="macros-by-category.html">Category Index</a>
26
 
     </td>
27
 
     <td style="width:25%;" align="center" valign="top">
28
 
      <form method="get" action="http://www.google.com/search">
29
 
       <div>
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">
33
 
       </div>
34
 
      </form>
35
 
     </td>
36
 
    </tr>
37
 
   </tbody>
38
 
  </table>
39
 
  <hr>
40
 
  <h1>
41
 
   ac_define_versionlevel
42
 
  </h1>
43
 
  <h2>
44
 
   Obsolete Macro
45
 
  </h2>
46
 
  <p class="indent">
47
 
   Superseded by <a href="ac_set_versionlevel.html">AC_SET_VERSIONLEVEL</a>.
48
 
  </p>
49
 
  <h2>
50
 
   Synopsis
51
 
  </h2>
52
 
  <p class="indent" style="white-space:nowrap;">
53
 
   <code>AC_DEFINE_VERSIONLEVEL(VARNAME [,VERSION [, DESCRIPTION]])</code>
54
 
  </p>
55
 
  <h2>
56
 
   Description
57
 
  </h2>
58
 
  <div class="indent">
59
 
   <p>
60
 
    if the VERSION is ommitted, shellvar $VERSION is used as defined by
61
 
    AM_INIT_AUTOMAKE's second argument.
62
 
   </p>
63
 
   <p>
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.
67
 
   </p>
68
 
   <p>
69
 
    typical usage: AM_INIT_AUTOMAKE(mypkg,4.12.3)
70
 
    AC_DEFINE_VERSIONLEVEL(MYPKG_VERSION)
71
 
   </p>
72
 
   <p>
73
 
    the config.h created from autoheader's config.h.in will contain... /* mypkg
74
 
    versionlevel */ #define MYPKG_VERSION 4120003
75
 
   </p>
76
 
   <p>
77
 
    the MYKG_VERSION will be defined as both a shell-variable and AC_DEFINE
78
 
   </p>
79
 
   <p>
80
 
    examples:
81
 
   </p>
82
 
   <pre>
83
 
       3.0-beta1     3000001
84
 
       3.1           3010000
85
 
       3.11          3110000
86
 
       3.11-dirpatch 3111000
87
 
       3.11-patch6   3110006
88
 
       2.2.18        2020018
89
 
       2.0.112       2000112
90
 
       2.4.2         2040002
91
 
       2.4.2-pre     2040003
92
 
       2.4.2-pre5    2040003
93
 
       5.0-build125  5000125
94
 
       5.0           5000000
95
 
       0.30.17       30017
96
 
</pre>
97
 
  </div>
98
 
  <h2>
99
 
   Author
100
 
  </h2>
101
 
  <p class="indent">
102
 
   Guido U. Draheim &lt;guidod@gmx.de&gt;
103
 
  </p>
104
 
  <h2>
105
 
   Last Modified
106
 
  </h2>
107
 
  <p class="indent">
108
 
   2008-04-12
109
 
  </p>
110
 
  <h2>
111
 
   M4 Source Code
112
 
  </h2>
113
 
  <div class="indent">
114
 
   <pre class="m4source">
115
 
AC_DEFUN([AC_DEFINE_VERSIONLEVEL],
116
 
[
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
120
 
 *.*.*.|*.*.*.*) :
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 \
130
 
        + 1` ;;
131
 
 *.*.*) :
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`               ;;
141
 
 *.*.) :
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 \
149
 
        + 1000 \
150
 
        + $ac_versionlevel_patch`               ;;
151
 
 *.*) :
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`               ;;
160
 
 *.) :
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 \
167
 
        + 1000 \
168
 
        + $ac_versionlevel_patch`               ;;
169
 
 *) :
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`               ;;
177
 
esac
178
 
AC_MSG_RESULT($[$1])
179
 
AC_DEFINE_UNQUOTED( $1, $[$1], ifelse( $3, , $PACKAGE versionlevel, $3))
180
 
])
181
 
</pre>
182
 
  </div>
183
 
  <h2>
184
 
   License
185
 
  </h2>
186
 
  <div class="indent">
187
 
   <span style="white-space:nowrap;">Copyright &copy; 2008 Guido U. Draheim
188
 
   &lt;guidod@gmx.de&gt;</span>
189
 
   <p>
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)
193
 
    any later version.
194
 
   </p>
195
 
   <p>
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
199
 
    more details.
200
 
   </p>
201
 
   <p>
202
 
    You should have received a copy of the GNU General Public License along
203
 
    with this program. If not, see &lt;<a href=
204
 
    "http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.
205
 
   </p>
206
 
   <p>
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.
214
 
   </p>
215
 
   <p>
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.
220
 
   </p>
221
 
  </div>
222
 
 </body>
223
 
</html>