diff options
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/getopt.m4 | 9 | ||||
| -rw-r--r-- | m4/gnulib-comp.m4 | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/m4/getopt.m4 b/m4/getopt.m4 index ac3b38e385e..3ebc7b7edf5 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 | |||
| @@ -32,7 +32,16 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX], | |||
| 32 | # getopt_long_only. | 32 | # getopt_long_only. |
| 33 | AC_DEFUN([gl_FUNC_GETOPT_GNU], | 33 | AC_DEFUN([gl_FUNC_GETOPT_GNU], |
| 34 | [ | 34 | [ |
| 35 | dnl Set the variable gl_getopt_required, so that all invocations of | ||
| 36 | dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file | ||
| 37 | dnl will check for getopt with GNU extensions. | ||
| 38 | dnl This means that if one gnulib-tool invocation requests getopt-posix | ||
| 39 | dnl and another gnulib-tool invocation requests getopt-gnu, it is as if | ||
| 40 | dnl both had requested getopt-gnu. | ||
| 35 | m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) | 41 | m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) |
| 42 | |||
| 43 | dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically | ||
| 44 | dnl done through the module dependency getopt-gnu -> getopt-posix. | ||
| 36 | ]) | 45 | ]) |
| 37 | 46 | ||
| 38 | # Determine whether to replace the entire getopt facility. | 47 | # Determine whether to replace the entire getopt facility. |
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index bfac944ea05..030304d6777 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 | |||
| @@ -259,6 +259,9 @@ AC_DEFUN([gl_INIT], | |||
| 259 | fi | 259 | fi |
| 260 | gl_STDLIB_MODULE_INDICATOR([getloadavg]) | 260 | gl_STDLIB_MODULE_INDICATOR([getloadavg]) |
| 261 | gl_FUNC_GETOPT_GNU | 261 | gl_FUNC_GETOPT_GNU |
| 262 | dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required | ||
| 263 | dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are | ||
| 264 | dnl done in the getopt-posix module. | ||
| 262 | gl_FUNC_GETOPT_POSIX | 265 | gl_FUNC_GETOPT_POSIX |
| 263 | if test $REPLACE_GETOPT = 1; then | 266 | if test $REPLACE_GETOPT = 1; then |
| 264 | AC_LIBOBJ([getopt]) | 267 | AC_LIBOBJ([getopt]) |