]> Savannah Git Hosting - gnulib.git/commitdiff
getopt-gnu: Add comments.
authorBruno Haible <bruno@clisp.org>
Tue, 18 Apr 2017 22:05:34 +0000 (00:05 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 18 Apr 2017 22:14:20 +0000 (00:14 +0200)
* m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Add comments.
* modules/getopt-gnu (configure.ac): Likewise.

ChangeLog
m4/getopt.m4
modules/getopt-gnu

index f57c3761ea4cc53feb4ded3d13d17ac1c312dc25..f056a84f831af2981cf7c6fc7579634b4b124cfd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-18  Bruno Haible  <bruno@clisp.org>
+
+       getopt-gnu: Add comments.
+       * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Add comments.
+       * modules/getopt-gnu (configure.ac): Likewise.
+
 2017-04-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        regex: port better to Solaris 10
index ac3b38e385e528dc8ff262cb855d89c72c0ab1c5..3ebc7b7edf515484f1275c0d524f1a64c6882b80 100644 (file)
@@ -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.
index 974ce1400f82f0c074a42e3f97a95def9771253c..a148693e1a9405cf09f2eb2a4418d25456a2749f 100644 (file)
@@ -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: