summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac5
-rw-r--r--include/opkele/tidy.h11
-rw-r--r--lib/discovery.cc3
3 files changed, 14 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 0aa1272..a66e53d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,23 +146,24 @@ AC_CHECK_HEADER([expat.h],[
146 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) 146 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/])
147 ]) 147 ])
148],[ 148],[
149 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) 149 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/])
150]) 150])
151 151
152AC_CHECK_HEADER([tidy.h],[ 152AC_CHECK_HEADERS([tidy.h tidy/tidy.h],[
153 AC_CHECK_LIB([tidy],[tidyParseBuffer],[ 153 AC_CHECK_LIB([tidy],[tidyParseBuffer],[
154 TIDY_LIBS=-ltidy 154 TIDY_LIBS=-ltidy
155 TIDY_CFLAGS= 155 TIDY_CFLAGS=
156 AC_SUBST([TIDY_LIBS]) 156 AC_SUBST([TIDY_LIBS])
157 AC_SUBST([TIDY_CFLAGS]) 157 AC_SUBST([TIDY_CFLAGS])
158 ],[ 158 ],[
159 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) 159 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/])
160 ]) 160 ])
161],[ 161],[
162 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) 162 test "$ac_header" = "tidy/tidy.h" \
163 && AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/])
163]) 164])
164 165
165if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then 166if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then
166 AC_SUBST([PCRE_CFLAGS]) 167 AC_SUBST([PCRE_CFLAGS])
167 AC_SUBST([PCRE_LIBS]) 168 AC_SUBST([PCRE_LIBS])
168 : 169 :
diff --git a/include/opkele/tidy.h b/include/opkele/tidy.h
index 888e7d4..059656d 100644
--- a/include/opkele/tidy.h
+++ b/include/opkele/tidy.h
@@ -1,12 +1,19 @@
1#ifndef __OPKELE_TIDY_H 1#ifndef __OPKELE_TIDY_H
2#define __OPKELE_TIDY_H 2#define __OPKELE_TIDY_H
3 3
4#include <cassert> 4#include <cassert>
5#include <tidy.h> 5#ifdef HAVE_TIDY_H
6#include <buffio.h> 6# include <tidy.h>
7# include <buffio.h>
8#elif HAVE_TIDY_TIDY_H
9# include <tidy/tidy.h>
10# include <tidy/buffio.h>
11#else
12# error "Don't know where to look for htmltidy headers"
13#endif
7 14
8namespace opkele { 15namespace opkele {
9 namespace util { 16 namespace util {
10 17
11 class tidy_buf_t { 18 class tidy_buf_t {
12 public: 19 public:
diff --git a/lib/discovery.cc b/lib/discovery.cc
index 3b90977..d1989ec 100644
--- a/lib/discovery.cc
+++ b/lib/discovery.cc
@@ -2,18 +2,19 @@
2#include <opkele/curl.h> 2#include <opkele/curl.h>
3#include <opkele/expat.h> 3#include <opkele/expat.h>
4#include <opkele/uris.h> 4#include <opkele/uris.h>
5#include <opkele/discovery.h> 5#include <opkele/discovery.h>
6#include <opkele/exception.h> 6#include <opkele/exception.h>
7#include <opkele/util.h> 7#include <opkele/util.h>
8#include <opkele/tidy.h>
9#include <opkele/data.h> 8#include <opkele/data.h>
10#include <opkele/debug.h> 9#include <opkele/debug.h>
11 10
12#include "config.h" 11#include "config.h"
13 12
13#include <opkele/tidy.h>
14
14#define XRDS_HEADER "X-XRDS-Location" 15#define XRDS_HEADER "X-XRDS-Location"
15#define CT_HEADER "Content-Type" 16#define CT_HEADER "Content-Type"
16 17
17namespace opkele { 18namespace opkele {
18 using std::list; 19 using std::list;
19 using xrd::XRD_t; 20 using xrd::XRD_t;