Add back extra packaging information if it's present.
authorGerald Combs <gerald@wireshark.org>
Mon, 24 Sep 2012 21:57:52 +0000 (21:57 -0000)
committerGerald Combs <gerald@wireshark.org>
Mon, 24 Sep 2012 21:57:52 +0000 (21:57 -0000)
svn path=/trunk/; revision=45112

configure.ac
make-version.pl

index 2c2ca82ba726a011ff0968e9f8ecb6c80cbc8fe2..24ff24c681c31e786763e327836dbacab293d313 100644 (file)
@@ -2,12 +2,13 @@
 #
 AC_PREREQ(2.60)
 
-m4_define(version_major, 1)
-m4_define(version_minor, 9)
-m4_define(version_micro, 0)
-# XXX version_extra ?
+m4_define([version_major], [1])
+m4_define([version_minor], [9])
+m4_define([version_micro], [0])
+m4_define([version_micro_extra], version_micro)
+m4_append([version_micro_extra], [])
 
-AC_INIT(wireshark, [version_major.version_minor.version_micro], http://bugs.wireshark.org/, , http://www.wireshark.org/)
+AC_INIT(wireshark, [version_major.version_minor.version_micro_extra], http://bugs.wireshark.org/, , http://www.wireshark.org/)
 
 dnl Check for CPU / vendor / OS
 dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
index d28866e90f41116b095e4989fbad87acf92901cf..5de69de5f4101751dc71cedca33e2856820c68be 100755 (executable)
@@ -311,12 +311,14 @@ sub update_configure_ac
 
        open(CFGIN, "< $filepath") || die "Can't read $filepath!";
        while ($line = <CFGIN>) {
-               if ($line =~ /^m4_define\(version_major *,.*([\r\n]+)$/) {
-                       $line = sprintf("m4_define(version_major, %d)$1", $version_pref{"version_major"});
-               } elsif ($line =~ /^m4_define\(version_minor *,.*([\r\n]+)$/) {
-                       $line = sprintf("m4_define(version_minor, %d)$1", $version_pref{"version_minor"});
-               } elsif ($line =~ /^m4_define\(version_micro *,.*([\r\n]+)$/) {
-                       $line = sprintf("m4_define(version_micro, %d)$1", $version_pref{"version_micro"});
+               if ($line =~ /^m4_define\( *\[?version_major\]? *,.*([\r\n]+)$/) {
+                       $line = sprintf("m4_define([version_major], [%d])$1", $version_pref{"version_major"});
+               } elsif ($line =~ /^m4_define\( *\[?version_minor\]? *,.*([\r\n]+)$/) {
+                       $line = sprintf("m4_define([version_minor], [%d])$1", $version_pref{"version_minor"});
+               } elsif ($line =~ /^m4_define\( *\[?version_micro\]? *,.*([\r\n]+)$/) {
+                       $line = sprintf("m4_define([version_micro], [%d])$1", $version_pref{"version_micro"});
+               } elsif ($line =~ /^m4_append\( *\[?version_micro_extra\]? *,.*([\r\n]+)$/) {
+                       $line = sprintf("m4_append([version_micro_extra], [%s])$1", $package_string);
                }
                $contents .= $line
        }