summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2014-03-05 21:14:05 (UTC)
committer Michael Krelin <hacker@klever.net>2014-03-05 21:14:05 (UTC)
commit9651b551f1c5af7f688d62ceb309ba84f92a77d3 (patch) (side-by-side diff)
treef5a3f3f38613ed782fc4ea6b3bf0acfea17dcd0f
parent00cf4285fb0539873754f23a654b9cd13ae29af4 (diff)
downloadlibopkele-9651b551f1c5af7f688d62ceb309ba84f92a77d3.zip
libopkele-9651b551f1c5af7f688d62ceb309ba84f92a77d3.tar.gz
libopkele-9651b551f1c5af7f688d62ceb309ba84f92a77d3.tar.bz2
don't include ext/algorithm if there's no suchHEADmaster
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,39 +1,40 @@
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])
tr1_mem_std="false"
tr1_mem_boost="false"
AC_CHECK_SHAREDPTR(std::tr1,tr1/memory,[ tr1_mem_std=true ])
AC_CHECK_SHAREDPTR(boost,boost/shared_ptr.hpp,[ tr1_mem_boost=true ])
tr1_mem=""
AC_ARG_WITH([tr1-memory],
AC_HELP_STRING([--with-tr1-memory=<boost|std>],[select tr1/memory (shared_ptr<>) implementation to use]),
[ tr1_mem="$withval" ]
diff --git a/test/OP.cc b/test/OP.cc
index 6012b2e..4e2a5ed 100644
--- a/test/OP.cc
+++ b/test/OP.cc
@@ -1,42 +1,46 @@
#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;
}
class opdb_t : public sqlite3_t {
public:
opdb_t()
: sqlite3_t("/tmp/OP.db") {
assert(_D);
char **resp; int nr,nc; char *errm;