summaryrefslogtreecommitdiffstats
path: root/gl/m4/getopt.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/getopt.m4')
-rw-r--r--gl/m4/getopt.m421
1 files changed, 8 insertions, 13 deletions
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index 7981a095..cb344c15 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,8 +1,10 @@
1# getopt.m4 serial 48 1# getopt.m4
2dnl Copyright (C) 2002-2006, 2008-2023 Free Software Foundation, Inc. 2# serial 50
3dnl Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7dnl This file is offered as-is, without any warranty.
6 8
7# Request a POSIX compliant getopt function. 9# Request a POSIX compliant getopt function.
8AC_DEFUN([gl_FUNC_GETOPT_POSIX], 10AC_DEFUN([gl_FUNC_GETOPT_POSIX],
@@ -76,7 +78,7 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
76 fi 78 fi
77 79
78 dnl POSIX 2008 does not specify leading '+' behavior, but see 80 dnl POSIX 2008 does not specify leading '+' behavior, but see
79 dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on 81 dnl https://austingroupbugs.net/view.php?id=191 for a recommendation on
80 dnl the next version of POSIX. For now, we only guarantee leading '+' 82 dnl the next version of POSIX. For now, we only guarantee leading '+'
81 dnl behavior with getopt-gnu. 83 dnl behavior with getopt-gnu.
82 if test -z "$gl_replace_getopt"; then 84 if test -z "$gl_replace_getopt"; then
@@ -197,8 +199,8 @@ main ()
197 fi 199 fi
198 else 200 else
199 case "$host_os" in 201 case "$host_os" in
200 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; 202 darwin* | aix* | mingw* | windows*) gl_cv_func_getopt_posix="guessing no";;
201 *) gl_cv_func_getopt_posix="guessing yes";; 203 *) gl_cv_func_getopt_posix="guessing yes";;
202 esac 204 esac
203 fi 205 fi
204 ]) 206 ])
@@ -365,14 +367,7 @@ dnl is ambiguous with environment values that contain newlines.
365 367
366AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], 368AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
367[ 369[
368 AC_CHECK_HEADERS_ONCE([sys/cdefs.h]) 370 gl_CHECK_HEADER_SYS_CDEFS_H
369 if test $ac_cv_header_sys_cdefs_h = yes; then
370 HAVE_SYS_CDEFS_H=1
371 else
372 HAVE_SYS_CDEFS_H=0
373 fi
374 AC_SUBST([HAVE_SYS_CDEFS_H])
375
376 AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], 371 AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
377 [Define to rpl_ if the getopt replacement functions and variables 372 [Define to rpl_ if the getopt replacement functions and variables
378 should be used.]) 373 should be used.])