Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5106

Modified Files:
        configure.ac 
Log Message:
Check for optarg, optind, optreset.

Index: configure.ac
===================================================================
RCS file: /cvsroot/tmux/tmux/configure.ac,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- configure.ac        4 Jan 2011 09:48:10 -0000       1.9
+++ configure.ac        10 Jan 2011 21:51:56 -0000      1.10
@@ -215,14 +215,24 @@
 # 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.
 AC_CHECK_FUNC(getopt, found_getopt=yes, found_getopt=no)
-if test "x$found_getopt" != xno; then
-       AC_MSG_CHECKING(if system getopt should be avoided)
-       if test "x$found_glibc" = xyes; then
-               found_getopt=no
-               AC_MSG_RESULT(yes)
-       else
-               AC_MSG_RESULT(no)
-               AC_DEFINE(HAVE_GETOPT)
+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   
+               AC_MSG_CHECKING(if system getopt should be avoided)
+               if test "x$found_glibc" = xyes; then
+                       found_getopt=no
+                       AC_MSG_RESULT(yes)
+               else
+                       AC_MSG_RESULT(no)
+                       AC_DEFINE(HAVE_GETOPT)
+               fi
        fi
 fi
 AM_CONDITIONAL(NO_GETOPT, [test "x$found_getopt" = xno])


------------------------------------------------------------------------------
Accelerate I/O Performance of HDD-Based Arrays
Configure SSDs as a secondary tier of high performance
cache to maximize transactional I/O performance while
minimizing investments in SSD technology.
http://p.sf.net/sfu/infohub-sdnews
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to