-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | include/opkele/tidy.h | 11 | ||||
-rw-r--r-- | lib/discovery.cc | 3 |
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 | |||
@@ -150,5 +150,5 @@ AC_CHECK_HEADER([expat.h],[ | |||
150 | ]) | 150 | ]) |
151 | 151 | ||
152 | AC_CHECK_HEADER([tidy.h],[ | 152 | AC_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 |
@@ -160,5 +160,6 @@ AC_CHECK_HEADER([tidy.h],[ | |||
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 | ||
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 | |||
@@ -3,6 +3,13 @@ | |||
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 | ||
8 | namespace opkele { | 15 | namespace opkele { |
diff --git a/lib/discovery.cc b/lib/discovery.cc index 3b90977..d1989ec 100644 --- a/lib/discovery.cc +++ b/lib/discovery.cc | |||
@@ -6,5 +6,4 @@ | |||
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> |
@@ -12,4 +11,6 @@ | |||
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" |