|
4 | 4 | # Get the hash of the last commit, to be used if it is not an
|
5 | 5 | # official release.
|
6 | 6 | AC_DEFUN([MSC_GIT_HASH], m4_esyscmd_s(git log -1 --format="%h" --abbrev-commit))
|
| 7 | +AC_DEFUN([MSC_MAJOR], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MAJOR " | awk {'print $3'} | sed 's/\"//g')) |
| 8 | +AC_DEFUN([MSC_MINOR], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MINOR " | awk {'print $3'} | sed 's/\"//g')) |
| 9 | +AC_DEFUN([MSC_PATCHLEVEL], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_PATCHLEVEL " | awk {'print $3'} | sed 's/\"//g')) |
| 10 | +AC_DEFUN([MSC_TAG], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_TAG " | awk {'print $3'} | sed 's/\"//g')) |
7 | 11 |
|
8 | 12 |
|
9 | 13 | # Version definition to be further used by AC_INIT and
|
10 | 14 | # .so file naming.
|
11 |
| -m4_define([msc_version_major], [3]) |
12 |
| -m4_define([msc_version_minor], [0]) |
13 |
| -m4_define([msc_version_patchlevel], [0]) |
| 15 | +m4_define([msc_version_major], [MSC_MAJOR]) |
| 16 | +m4_define([msc_version_minor], [MSC_MINOR]) |
| 17 | +m4_define([msc_version_patchlevel], [MSC_PATCHLEVEL]) |
14 | 18 |
|
15 | 19 | m4_define([msc_version],
|
16 | 20 | [msc_version_major.msc_version_minor])
|
17 | 21 |
|
18 | 22 | m4_define([msc_version_git],
|
19 |
| - [msc_version_major.msc_version_minor.msc_version_patchlevel+MSC_GIT_HASH]) |
| 23 | + [m4_esyscmd_s(git describe)]) |
20 | 24 |
|
21 | 25 | m4_define([msc_version_info],
|
22 | 26 | [msc_version_major:msc_version_minor:msc_version_patchlevel])
|
23 | 27 |
|
24 | 28 |
|
25 | 29 | # Project Information
|
26 |
| -AC_INIT([modsecurity], [msc_version], [security@modsecurity.org]) |
| 30 | +AC_INIT([modsecurity], [3.0], [security@modsecurity.org]) |
27 | 31 |
|
28 | 32 |
|
29 | 33 | # General definitions
|
@@ -360,7 +364,7 @@ AC_OUTPUT
|
360 | 364 | # Print a fancy summary
|
361 | 365 | echo " "
|
362 | 366 | echo " "
|
363 |
| -echo "ModSecurity - v${MSC_GIT_VERSION} for $PLATFORM" |
| 367 | +echo "ModSecurity - ${MSC_GIT_VERSION} for $PLATFORM" |
364 | 368 | echo " "
|
365 | 369 | echo " Mandatory dependencies"
|
366 | 370 | echo -n " + libInjection ...."
|
|
0 commit comments