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 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,
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