summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac1
-rw-r--r--test/OP.cc6
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e636253..606e644 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,31 +1,32 @@
AC_INIT([libopkele], [2.0.4], [libopkele-bugs@klever.net])
AC_CONFIG_SRCDIR([include/opkele/opkele-config.h])
AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h])
AC_CONFIG_MACRO_DIR([aclocal.d])
AC_CONFIG_AUX_DIR([aux.d])
AM_INIT_AUTOMAKE([dist-bzip2])
AC_PROG_INSTALL
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
AC_HEADER_STDC
AC_CHECK_FUNCS([timegm])
+AC_CHECK_HEADERS([ext/algorithm.h])
AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
AC_MSG_CHECKING([for source tree version])
if headrev=$(cd $srcdir && git rev-parse --verify HEAD 2>/dev/null) ; then
PACKAGE_SRC_VERSION="$(cd $srcdir && git describe --tags $headrev)"
test "$PACKAGE_SRC_VERSION" = "$PACKAGE_VERSION" \
-o "${PACKAGE_SRC_VERSION#${PACKAGE_VERSION}-}" != "$PACKAGE_SRC_VERSION" || PACKAGE_SRC_VERSION="${PACKAGE_VERSION}:${PACKAGE_SRC_VERSION}"
( cd $srcdir && git diff-index $headrev | read dirt ) && PACKAGE_SRC_VERSION="${PACKAGE_SRC_VERSION}-dirty"
else
PACKAGE_SRC_VERSION="$PACKAGE_VERSION"
fi
AC_MSG_RESULT([$PACKAGE_SRC_VERSION])
AC_SUBST([PACKAGE_SRC_VERSION])
AC_DEFINE_UNQUOTED([PACKAGE_SRC_VERSION],["$PACKAGE_SRC_VERSION"],[more or less precise source tree version])
diff --git a/test/OP.cc b/test/OP.cc
index 6012b2e..4e2a5ed 100644
--- a/test/OP.cc
+++ b/test/OP.cc
@@ -1,34 +1,38 @@
#include <uuid/uuid.h>
#include <iostream>
#include <cassert>
#include <string>
-#include <ext/algorithm>
using namespace std;
#include <kingate/exception.h>
#include <kingate/plaincgi.h>
#include <kingate/cgi_gateway.h>
#include <opkele/exception.h>
#include <opkele/util.h>
#include <opkele/uris.h>
#include <opkele/extension.h>
#include <opkele/association.h>
#include <opkele/debug.h>
#include <opkele/verify_op.h>
#include <opkele/sreg.h>
+#include "config.h"
+#ifdef HAVE_EXT_ALGORITHM_H
+# include <ext/algorithm>
+#endif
+
#include "sqlite.h"
#include "kingate_openid_message.h"
static const string get_self_url(const kingate::cgi_gateway& gw) {
bool s = gw.has_meta("SSL_PROTOCOL_VERSION");
string rv = s?"https://":"http://";
rv += gw.http_request_header("Host");
const string& port = gw.get_meta("SERVER_PORT");
if( port!=(s?"443":"80") ) {
rv += ':'; rv += port;
}
rv += gw.get_meta("REQUEST_URI");
string::size_type q = rv.find('?');
if(q!=string::npos)
rv.erase(q);
return rv;