-dnl $Id: configure.in,v 1.16 2001/11/20 02:30:23 robs Exp $
+dnl $Id: configure.in,v 1.17 2001/11/21 15:32:31 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
AC_PROG_CXX
+dnl autoconf defaults CXX to 'g++', so its unclear whether it exists/works
+AC_MSG_CHECKING([whether $CXX works])
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE([#include <iostream.h>], [istream is(NULL);],
+ [CXX_WORKS=1] [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+AC_LANG_C
+
+if test -n "$CXX_WORKS"; then
+ LIBFCGIXX='libfcgi++.la'
+ ECHO_CPP='echo-cpp$(EXEEXT)'
+fi
+AC_SUBST(LIBFCGIXX)
+AC_SUBST(ECHO_CPP)
+
AC_CHECK_LIB([nsl], [main]) ac_cv_lib_nsl=ac_cv_lib_nsl_main
AC_CHECK_LIB([resolv], [main]) ac_cv_lib_resolv=ac_cv_lib_resolv_main
AC_CHECK_LIB([socket], [main]) ac_cv_lib_socket=ac_cv_lib_socket_main
-# $Id: Makefile.am,v 1.4 2001/09/24 18:03:04 skimo Exp $
+# $Id: Makefile.am,v 1.5 2001/11/21 15:32:32 robs Exp $
noinst_PROGRAMS = authorizer \
echo \
echo-x \
log-dump \
- @threaded@
+ @threaded@ \
+ @ECHO_CPP@
-EXTRA_PROGRAMS = threaded
+EXTRA_PROGRAMS = threaded echo-cpp
INCLUDEDIR = $(srcdir)/../include
CPPFLAGS = @CPPFLAGS@ -I$(INCLUDEDIR)
threaded_SOURCES = $(INCLUDE_FILES) threaded.c
threaded_LDADD = $(LIBFCGI) -lpthread
+
+echo_cpp_SOURCES = $(INCLUDE_FILES) $(INCLUDEDIR)/fcgio.h echo-cpp.cpp
+echo_cpp_LDADD = $(LIBDIR)/libfcgi++.la
+
--- /dev/null
+/* include/fcgi_config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define if there's a fileno() prototype in stdio.h */
+#undef HAVE_FILENO_PROTO
+
+/* Define if the fpos_t typedef is in stdio.h */
+#undef HAVE_FPOS
+
+/* Define if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have the `dnet_stub' library (-ldnet_stub). */
+#undef HAVE_LIBDNET_STUB
+
+/* Define if you have the `ieee' library (-lieee). */
+#undef HAVE_LIBIEEE
+
+/* Define if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define if you have the pthread library */
+#undef HAVE_LIBPTHREAD
+
+/* Define if you have the `resolv' library (-lresolv). */
+#undef HAVE_LIBRESOLV
+
+/* Define if you have the `socket' library (-lsocket). */
+#undef HAVE_LIBSOCKET
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define if sockaddr_un in sys/un.h contains a sun_len component */
+#undef HAVE_SOCKADDR_UN_SUN_LEN
+
+/* Define if the socklen_t typedef is in sys/socket.h */
+#undef HAVE_SOCKLEN
+
+/* Define if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if va_arg(arg, long double) crashes the compiler */
+#undef HAVE_VA_ARG_LONG_DOUBLE_BUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if cross-process locking is required by accept() */
+#undef USE_LOCKING
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+ if it is not supported. */
+#undef inline
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef ssize_t
-# $Id: Makefile.am,v 1.5 2001/11/20 03:17:53 robs Exp $
+# $Id: Makefile.am,v 1.6 2001/11/21 15:32:34 robs Exp $
INCLUDEDIR = $(srcdir)/../include
CPPFLAGS = @CPPFLAGS@ -I$(INCLUDEDIR)
INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \
- $(INCLUDEDIR>/fcgio.h \
$(INCLUDEDIR)/fcgiapp.h \
$(INCLUDEDIR)/fcgimisc.h \
$(INCLUDEDIR)/fcgi_stdio.h \
$(INCLUDEDIR)/fcgios.h
-lib_LTLIBRARIES = libfcgi.la
+lib_LTLIBRARIES = libfcgi.la @LIBFCGIXX@
+EXTRA_LTLIBRARIES = libfcgi++.la
+
libfcgi_la_SOURCES = $(INCLUDE_FILES) \
fcgiapp.c \
fcgi_stdio.c \
os_@SYSTEM@.c
+
EXTRA_libfcgi_la_SOURCES = \
- fcgio.cpp \
- os_unix.c \
+ os_unix.c \
os_win32.c
-libfcgi_la_LIBADD = fcgio.lo
-
-# This is only needed if fcgio.cpp is compiled in (CXX is defined)
-libfcgi_la_LDFLAGS = -lstdc++
+libfcgi___la_SOURCES = $(INCLUDE_FILES) $(INCLUDEDIR)/fcgio.h fcgio.cpp
+libfcgi___la_LDFLAGS = -lfcgi