mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Check for optarg, optind, optreset.
This commit is contained in:
parent
87841b4f91
commit
93fd9cc29d
12
configure.ac
12
configure.ac
@ -1,4 +1,4 @@
|
|||||||
# $Id: configure.ac,v 1.9 2011-01-04 09:48:10 nicm Exp $
|
# $Id: configure.ac,v 1.10 2011-01-10 21:51:56 nicm Exp $
|
||||||
|
|
||||||
# Miscellaneous autofoo bullshit.
|
# Miscellaneous autofoo bullshit.
|
||||||
AC_INIT(tmux, 1.5)
|
AC_INIT(tmux, 1.5)
|
||||||
@ -215,6 +215,15 @@ AM_CONDITIONAL(NO_VIS, [test "x$found_strnvis" = xno])
|
|||||||
# Look for getopt. glibc's getopt does not enforce argument order and the ways
|
# Look for getopt. glibc's getopt does not enforce argument order and the ways
|
||||||
# of making it do so are stupid, so just use our own instead.
|
# of making it do so are stupid, so just use our own instead.
|
||||||
AC_CHECK_FUNC(getopt, found_getopt=yes, found_getopt=no)
|
AC_CHECK_FUNC(getopt, found_getopt=yes, found_getopt=no)
|
||||||
|
if test "x$found_getopt" != xno; then
|
||||||
|
AC_CHECK_DECLS(
|
||||||
|
[optarg, optind, optreset],
|
||||||
|
,
|
||||||
|
found_getopt=no,
|
||||||
|
[
|
||||||
|
#include <unistd.h>
|
||||||
|
]
|
||||||
|
)
|
||||||
if test "x$found_getopt" != xno; then
|
if test "x$found_getopt" != xno; then
|
||||||
AC_MSG_CHECKING(if system getopt should be avoided)
|
AC_MSG_CHECKING(if system getopt should be avoided)
|
||||||
if test "x$found_glibc" = xyes; then
|
if test "x$found_glibc" = xyes; then
|
||||||
@ -225,6 +234,7 @@ if test "x$found_getopt" != xno; then
|
|||||||
AC_DEFINE(HAVE_GETOPT)
|
AC_DEFINE(HAVE_GETOPT)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
AM_CONDITIONAL(NO_GETOPT, [test "x$found_getopt" = xno])
|
AM_CONDITIONAL(NO_GETOPT, [test "x$found_getopt" = xno])
|
||||||
|
|
||||||
# Check for some functions that are replaced or omitted.
|
# Check for some functions that are replaced or omitted.
|
||||||
|
Loading…
Reference in New Issue
Block a user