aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-03-01 08:58:41 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-03-01 08:58:41 +0200
commit63df14c57dee7c461717784287056688482a7eb9 (patch)
treef6a0ba9c96acdd3ee503f611aa381f2fb02ce288
parentAdd a rough explanation of --extreme to output of --help. (diff)
downloadxz-63df14c57dee7c461717784287056688482a7eb9.tar.xz
Fix the Autoconf test for getopt_long replacement.
It was broken by e114502b2bc371e4a45449832cb69be036360722.
-rw-r--r--m4/getopt.m44
1 files changed, 4 insertions, 0 deletions
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index ffba95e2..cfbe40f2 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -30,6 +30,10 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
fi
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_FUNCS([getopt_long], [], [GETOPT_H=getopt.h])
+ fi
+
dnl BSD getopt_long uses a way to reset option processing, that is different
dnl from GNU and Solaris (which copied the GNU behavior). We support both
dnl GNU and BSD style resetting of getopt_long(), so there's no need to use