1
0
mirror of https://git.tukaani.org/xz.git synced 2025-02-22 08:28:25 +00:00

Build: Allow forcing the use of the replacement getopt_long

Now one can pass gl_replace_getopt=yes to configure to force the use
of GNU getopt_long from the lib directory. This only checks that the
value of gl_replace_getopt is non-empty, so one cannot force the
replacement to be disabled.

Closes: https://github.com/tukaani-project/xz/pull/166
This commit is contained in:
Lasse Collin 2025-02-17 18:11:58 +02:00
parent c23b837d15
commit 03c23a4952
No known key found for this signature in database
GPG Key ID: 38EE757D69184620

View File

@ -8,6 +8,9 @@ dnl with or without modifications, as long as this notice is preserved.
# This version has been modified to reduce complexity since we only need
# GNU getopt_long and do not care about replacing getopt.
#
# Pass gl_replace_getopt=yes (or any non-empty value instead of "yes") as
# an argument to configure to force the use of the getopt_long replacement.
# Check for a POSIX compliant getopt function with GNU extensions (such as
# options with optional arguments) and the functions getopt_long,
@ -23,8 +26,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU],
AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
[
gl_replace_getopt=
if test -z "$gl_replace_getopt"; then
AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes])
fi