summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--configure.ac3
-rw-r--r--src/Makefile.am2
-rw-r--r--src/plaincgi.cc5
3 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 5ae7b27..b3141f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,9 @@ AC_PROG_LIBTOOL
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/types.h sys/stat.h])
+AC_CHECK_DECLS([environ],,,[
+ #include <unistd.h>
+])
HAVE_FCGI=false
AC_LANG_PUSH(C++)
diff --git a/src/Makefile.am b/src/Makefile.am
index e5c6778..d516d37 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,7 @@ if HAVE_FCGI
lib_LTLIBRARIES += libkingate-fcgi.la
endif
-INCLUDES = -I${top_srcdir}/include
+INCLUDES = -I${top_srcdir}/include -I${top_srcdir}
AM_CXXFLAGS = ${KONFORKA_CFLAGS}
LDADD = ${KONFORKA_LIBS}
diff --git a/src/plaincgi.cc b/src/plaincgi.cc
index 6934748..1cb7dc6 100644
--- a/src/plaincgi.cc
+++ b/src/plaincgi.cc
@@ -3,6 +3,11 @@
#include <sys/stat.h>
#include "kingate/plaincgi.h"
#include "kingate/exception.h"
+#include "config.h"
+
+#if !HAVE_DECL_ENVIRON
+extern char **environ;
+#endif /* HAVE_DECL_ENVIRON */
namespace kingate {