-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 51bacd5..5772ead 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -69,96 +69,109 @@ WANT_KONFORKA="yes" | |||
69 | AC_ARG_ENABLE([konforka], | 69 | AC_ARG_ENABLE([konforka], |
70 | AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), | 70 | AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), |
71 | [ | 71 | [ |
72 | test "${enableval}" = "no" && WANT_KONFORKA="no" | 72 | test "${enableval}" = "no" && WANT_KONFORKA="no" |
73 | ] | 73 | ] |
74 | ) | 74 | ) |
75 | if test "${WANT_KONFORKA}" = "yes" ; then | 75 | if test "${WANT_KONFORKA}" = "yes" ; then |
76 | PKG_CHECK_MODULES([KONFORKA],[konforka],[ | 76 | PKG_CHECK_MODULES([KONFORKA],[konforka],[ |
77 | AC_SUBST([KONFORKA_CFLAGS]) | 77 | AC_SUBST([KONFORKA_CFLAGS]) |
78 | AC_SUBST([KONFORKA_LIBS]) | 78 | AC_SUBST([KONFORKA_LIBS]) |
79 | AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) | 79 | AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) |
80 | AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) | 80 | AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) |
81 | AC_SUBST([KONFORKA_KONFORKA],[konforka]) | 81 | AC_SUBST([KONFORKA_KONFORKA],[konforka]) |
82 | ],[true]) | 82 | ],[true]) |
83 | fi | 83 | fi |
84 | 84 | ||
85 | WANT_DOXYGEN="yes" | 85 | WANT_DOXYGEN="yes" |
86 | AC_ARG_ENABLE([doxygen], | 86 | AC_ARG_ENABLE([doxygen], |
87 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), | 87 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), |
88 | [ | 88 | [ |
89 | test "${enableval}" = "no" && WANT_DOXYGEN="no" | 89 | test "${enableval}" = "no" && WANT_DOXYGEN="no" |
90 | ] | 90 | ] |
91 | ) | 91 | ) |
92 | if test "${WANT_DOXYGEN}" = "yes" ; then | 92 | if test "${WANT_DOXYGEN}" = "yes" ; then |
93 | AC_WITH_DOXYGEN | 93 | AC_WITH_DOXYGEN |
94 | AC_WITH_DOT | 94 | AC_WITH_DOT |
95 | else | 95 | else |
96 | AM_CONDITIONAL([HAVE_DOXYGEN],[false]) | 96 | AM_CONDITIONAL([HAVE_DOXYGEN],[false]) |
97 | AM_CONDITIONAL([HAVE_DOT],[false]) | 97 | AM_CONDITIONAL([HAVE_DOT],[false]) |
98 | fi | 98 | fi |
99 | 99 | ||
100 | LIBCURL_CHECK_CONFIG(,,,[ | 100 | LIBCURL_CHECK_CONFIG(,,,[ |
101 | AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) | 101 | AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) |
102 | ]) | 102 | ]) |
103 | 103 | ||
104 | AC_CHECK_HEADER([expat.h],[ | 104 | AC_CHECK_HEADER([expat.h],[ |
105 | AC_CHECK_LIB([expat],[XML_ParserCreate],[ | 105 | AC_CHECK_LIB([expat],[XML_ParserCreate],[ |
106 | EXPAT_LIBS=-lexpat | 106 | EXPAT_LIBS=-lexpat |
107 | EXPAT_CFLAGS= | 107 | EXPAT_CFLAGS= |
108 | AC_SUBST([EXPAT_LIBS]) | 108 | AC_SUBST([EXPAT_LIBS]) |
109 | AC_SUBST([EXPAT_CFLAGS]) | 109 | AC_SUBST([EXPAT_CFLAGS]) |
110 | ],[ | 110 | ],[ |
111 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) | 111 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) |
112 | ]) | 112 | ]) |
113 | ],[ | 113 | ],[ |
114 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) | 114 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) |
115 | ]) | 115 | ]) |
116 | 116 | ||
117 | AC_CHECK_HEADER([tidy.h],[ | ||
118 | AC_CHECK_LIB([tidy],[tidyParseBuffer],[ | ||
119 | TIDY_LIBS=-ltidy | ||
120 | TIDY_CFLAGS= | ||
121 | AC_SUBST([TIDY_LIBS]) | ||
122 | AC_SUBST([TIDY_CFLAGS]) | ||
123 | ],[ | ||
124 | AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.nt/]) | ||
125 | ]) | ||
126 | ],[ | ||
127 | AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.nt/]) | ||
128 | ]) | ||
129 | |||
117 | if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then | 130 | if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then |
118 | AC_SUBST([PCRE_CFLAGS]) | 131 | AC_SUBST([PCRE_CFLAGS]) |
119 | AC_SUBST([PCRE_LIBS]) | 132 | AC_SUBST([PCRE_LIBS]) |
120 | : | 133 | : |
121 | else | 134 | else |
122 | PKG_CHECK_MODULES([PCRE],[libpcre],,[ | 135 | PKG_CHECK_MODULES([PCRE],[libpcre],,[ |
123 | AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) | 136 | AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) |
124 | ]) | 137 | ]) |
125 | fi | 138 | fi |
126 | 139 | ||
127 | curl_ssl_verify_host="true" | 140 | curl_ssl_verify_host="true" |
128 | AC_ARG_ENABLE([ssl-verify-host], | 141 | AC_ARG_ENABLE([ssl-verify-host], |
129 | AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), | 142 | AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), |
130 | [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] | 143 | [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] |
131 | ) | 144 | ) |
132 | ${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) | 145 | ${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) |
133 | 146 | ||
134 | curl_ssl_verify_peer="true" | 147 | curl_ssl_verify_peer="true" |
135 | AC_ARG_ENABLE([ssl-verify-peer], | 148 | AC_ARG_ENABLE([ssl-verify-peer], |
136 | AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), | 149 | AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), |
137 | [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] | 150 | [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] |
138 | ) | 151 | ) |
139 | ${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) | 152 | ${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) |
140 | 153 | ||
141 | postels_law=true | 154 | postels_law=true |
142 | AC_ARG_ENABLE([postels-law], | 155 | AC_ARG_ENABLE([postels-law], |
143 | AC_HELP_STRING([--disable-postels-law],[Be strict, do not adhere to Postel's Law ("be conservative in what you do, be liberal in what you accept from others", RFC 793)]), | 156 | AC_HELP_STRING([--disable-postels-law],[Be strict, do not adhere to Postel's Law ("be conservative in what you do, be liberal in what you accept from others", RFC 793)]), |
144 | [ test "${enableval}" = "no" && postels_law=false ] | 157 | [ test "${enableval}" = "no" && postels_law=false ] |
145 | ) | 158 | ) |
146 | $postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law]) | 159 | $postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law]) |
147 | 160 | ||
148 | AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) | 161 | AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) |
149 | 162 | ||
150 | nitpick=false | 163 | nitpick=false |
151 | AC_ARG_ENABLE([nitpicking], | 164 | AC_ARG_ENABLE([nitpicking], |
152 | AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]), | 165 | AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]), |
153 | [ test "$enableval" = "no" || nitpick=true ] | 166 | [ test "$enableval" = "no" || nitpick=true ] |
154 | ) | 167 | ) |
155 | if $nitpick ; then | 168 | if $nitpick ; then |
156 | CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ | 169 | CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ |
157 | -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ | 170 | -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ |
158 | -Wredundant-decls -ansi" | 171 | -Wredundant-decls -ansi" |
159 | # -Wlogical-op -Wmissing-noreturn | 172 | # -Wlogical-op -Wmissing-noreturn |
160 | C_NITPICK="$CPP_NITPICK" | 173 | C_NITPICK="$CPP_NITPICK" |
161 | CXX_NITPICK="$C_NITPICK" | 174 | CXX_NITPICK="$C_NITPICK" |
162 | 175 | ||
163 | CPPFLAGS="$CPPFLAGS $CPP_NITPICK" | 176 | CPPFLAGS="$CPPFLAGS $CPP_NITPICK" |
164 | CFLAGS="$CFLAGS $C_NITPICK" | 177 | CFLAGS="$CFLAGS $C_NITPICK" |