+2010-07-30 Bruno Haible <bruno@clisp.org>
+
+ getopt: Update regarding AIX.
+ * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): When cross-compiling, guess
+ no on AIX.
+ * doc/posix-functions/getopt.texi: Mention that AIX has the optind bug.
+ Reported by Rainer Tammer.
+
2010-07-30 Bruno Haible <bruno@clisp.org>
ldexpl; Update regarding AIX.
-# getopt.m4 serial 28
+# getopt.m4 serial 29
dnl Copyright (C) 2002-2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_CACHE_CHECK([whether getopt is POSIX compatible],
[gl_cv_func_getopt_posix],
[
- dnl This test fails on mingw and succeeds on all other platforms.
+ dnl This test fails on mingw and succeeds on many other platforms.
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <unistd.h>
#include <stdlib.h>
if (!(optind == 1))
return 12;
}
- /* Detect MacOS 10.5 bug. */
+ /* Detect MacOS 10.5, AIX 7.1 bug. */
{
char *argv[3] = { "program", "-ab", NULL };
optind = OPTIND_MIN;
]])],
[gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no],
[case "$host_os" in
- mingw*) gl_cv_func_getopt_posix="guessing no";;
- darwin*) gl_cv_func_getopt_posix="guessing no";;
- *) gl_cv_func_getopt_posix="guessing yes";;
+ mingw*) gl_cv_func_getopt_posix="guessing no";;
+ darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
esac
])
])