From: Bruno Haible Date: Tue, 18 Apr 2017 22:05:34 +0000 (+0200) Subject: getopt-gnu: Add comments. X-Git-Tag: v1.0~6276 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=37d5dc0daaa653a307f193d2f2851f38f88fbb7c;p=gnulib.git getopt-gnu: Add comments. * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Add comments. * modules/getopt-gnu (configure.ac): Likewise. --- diff --git a/ChangeLog b/ChangeLog index f57c3761ea..f056a84f83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-04-18 Bruno Haible + + getopt-gnu: Add comments. + * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Add comments. + * modules/getopt-gnu (configure.ac): Likewise. + 2017-04-16 Paul Eggert regex: port better to Solaris 10 diff --git a/m4/getopt.m4 b/m4/getopt.m4 index ac3b38e385..3ebc7b7edf 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -32,7 +32,16 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX], # getopt_long_only. AC_DEFUN([gl_FUNC_GETOPT_GNU], [ + dnl Set the variable gl_getopt_required, so that all invocations of + dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file + dnl will check for getopt with GNU extensions. + dnl This means that if one gnulib-tool invocation requests getopt-posix + dnl and another gnulib-tool invocation requests getopt-gnu, it is as if + dnl both had requested getopt-gnu. m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) + + dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically + dnl done through the module dependency getopt-gnu -> getopt-posix. ]) # Determine whether to replace the entire getopt facility. diff --git a/modules/getopt-gnu b/modules/getopt-gnu index 974ce1400f..a148693e1a 100644 --- a/modules/getopt-gnu +++ b/modules/getopt-gnu @@ -10,6 +10,9 @@ getopt-posix configure.ac: gl_FUNC_GETOPT_GNU +dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required +dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are +dnl done in the getopt-posix module. Makefile.am: