add check for char_type in the context of C++'s streambuf and some misc changes to...
[catagits/fcgi2.git] / configure.in
index 18e2480..4da4659 100755 (executable)
@@ -1,4 +1,4 @@
-dnl     $Id: configure.in,v 1.24 2001/12/21 03:12:50 robs Exp $
+dnl     $Id: configure.in,v 1.25 2002/02/24 20:07:07 robs Exp $
 dnl
 dnl     This file is an input file used by the GNU "autoconf" program to
 dnl     generate the file "configure", which is run during the build
@@ -20,16 +20,25 @@ AC_LANG([C++])
 
 dnl autoconf defaults CXX to 'g++', so its unclear whether it exists/works
 AC_MSG_CHECKING([whether $CXX works])
-AC_TRY_COMPILE([#include <iostream.h>], [istream is(NULL);], 
-               [LIBFCGIXX=libfcgi++.la
+AC_TRY_COMPILE([#include <iostream>], 
+               [std::cout << "ok";], 
+               [AC_MSG_RESULT(yes)
+                LIBFCGIXX=libfcgi++.la
                 ECHO_CPP=echo-cpp${EXEEXT}
-                AC_MSG_RESULT(yes)
                 AC_MSG_CHECKING([whether cin has a streambuf assignment operator])
-                AC_TRY_COMPILE([#include <iostream.h>],  [cin = static_cast<streambuf *>(0);], 
-                               [AC_DEFINE([HAVE_IOSTREAM_WITHASSIGN_STREAMBUF],  [1], 
-                                          [Define if cin/cout/cerr has a streambuf assignment operator])
-                                AC_MSG_RESULT(yes)],
-                               [AC_MSG_RESULT(no)])], 
+                AC_TRY_COMPILE([#include <iostream>], 
+                               [cin = static_cast<streambuf *>(0);], 
+                               [AC_MSG_RESULT(yes)
+                                AC_DEFINE([HAVE_IOSTREAM_WITHASSIGN_STREAMBUF],  [1], 
+                                          [Define if cin/cout/cerr has a streambuf assignment operator])],
+                               [AC_MSG_RESULT(no)]) 
+                AC_MSG_CHECKING([whether char_type is defined in the context of streambuf])
+                AC_TRY_COMPILE([#include <iostream>],
+                               [class fcgi_streambuf : public std::streambuf { char_type ct; }],
+                               [AC_MSG_RESULT(yes)
+                                AC_DEFINE([HAVE_STREAMBUF_CHAR_TYPE], [1], 
+                                          [Define if char_type is defined in the context of streambuf])],
+                               [AC_MSG_RESULT(no)])],
                [AC_MSG_RESULT(no)])
 AC_SUBST(LIBFCGIXX)
 AC_SUBST(ECHO_CPP)
@@ -39,10 +48,6 @@ AC_LANG([C])
 AC_CHECK_LIB([nsl],       [gethostbyname])
 AC_CHECK_LIB([socket],    [socket]) 
 
-dnl AC_CHECK_LIB([resolv],    [main])
-dnl AC_CHECK_LIB([dnet_stub], [main])
-dnl AC_CHECK_LIB([ieee],      [main])
-
 ACX_PTHREAD([THREADED=threaded${EXEEXT}])
 AC_SUBST([THREADED])