aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-08-05 14:20:55 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2016-08-05 14:20:55 +0300
commit102d1b9c1a94548dfa0c498845c77933db6a7738 (patch)
tree3b2a14da2614b9f016eb555d2b3378f01e4d3c01
parentedd1a92f6743a5f5c31fa1468fdb511c097e75ad (diff)
downloadgrecs-102d1b9c1a94548dfa0c498845c77933db6a7738.tar.gz
grecs-102d1b9c1a94548dfa0c498845c77933db6a7738.tar.bz2
Minor fix
* build-aux/getopt.m4: Only define lastoptlab if necessary
-rw-r--r--build-aux/getopt.m47
1 files changed, 5 insertions, 2 deletions
diff --git a/build-aux/getopt.m4 b/build-aux/getopt.m4
index d424088..86bac99 100644
--- a/build-aux/getopt.m4
+++ b/build-aux/getopt.m4
@@ -264,7 +264,9 @@ define([<OPTNODE>],[<do {
dnl LASTOPT()
dnl Stop option processing (as if "--" has been encountered
-define([<LASTOPT>],[<goto lastoptlab>])
+define([<LASTOPT>],[<dnl
+define([<__GETOPT_LASTOPT>],[<lastoptlab:>])dnl
+goto lastoptlab>])
dnl GETOPT(argc, argv, [long_index], [onerr])
dnl Emit option parsing code. Arguments:
@@ -295,7 +297,7 @@ define([<GETOPT>],[<
undivert(4)
}
}
-lastoptlab:
+__GETOPT_LASTOPT
ifelse([<$3>],,[<
if (optind < argc) {
fprintf(stderr, "%s: unexpected arguments\n", $2[0]);
@@ -352,6 +354,7 @@ divert(-1)
define([<OPTIONS_BEGIN>],
[<divert(-1)
+ define([<__GETOPT_LASTOPT>])
_getopt_set_options(shift(shift(shift($@))))
_getopt_if_option_set([<gnu>],
[<STDFUNC([<$1 " (" PACKAGE_NAME ") " PACKAGE_VERSION>],

Return to:

Send suggestions and report system problems to the System administrator.