2 # Process this file with autoconf to produce a configure script.
6 m4_include([m4/version.m4])
9 [quvi], [_QUVI_VERSION],
10 [http://sourceforge.net/apps/trac/quvi],
12 [http://quvi.sourceforge.net/])
15 QUVI_CURRENT=_QUVI_CURRENT
16 QUVI_REVISION=_QUVI_REVISION
18 AC_SUBST(QUVI_CURRENT)
19 AC_SUBST(QUVI_REVISION)
22 AC_CONFIG_SRCDIR([lib/quvi.c])
23 AC_CONFIG_HEADERS([config.h])
24 AC_CONFIG_AUX_DIR([config.aux])
25 AC_CONFIG_MACRO_DIR([m4])
30 AC_DEFINE_UNQUOTED([CANONICAL_TARGET], "$target", [...])
31 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [...])
33 AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2 dist-xz])
34 AM_SILENT_RULES([yes])
42 *-*-mingw32* | *-*-cygwin*)
43 AC_DEFINE([HOST_W32], [1], [...])
45 if [ test x"$enable_shared" != "xno" ]; then
46 NO_UNDEFINED="-no-undefined"
50 EXTRA_LIBQUVI_LDFLAGS="$NO_UNDEFINED"
51 AC_SUBST(EXTRA_LIBQUVI_LDFLAGS)
53 # Checks for programs.
62 AC_PATH_PROG(GENGETOPT, gengetopt, no)
63 AM_CONDITIONAL([HAVE_GENGETOPT], [test x"$GENGETOPT" != "xno"])
66 AC_PATH_PROG(DOXYGEN, doxygen, no)
67 AM_CONDITIONAL([HAVE_DOXYGEN], [test x"$DOXYGEN" != "xno"])
70 AC_PATH_PROG(PROVE, prove, no)
71 AM_CONDITIONAL([HAVE_PROVE], [test x"$PROVE" != "xno"])
74 AC_PATH_PROG(VALGRIND, valgrind, no)
75 AM_CONDITIONAL([HAVE_VALGRIND], [test x"$VALGRIND" != "xno"])
78 AC_PATH_PROG(POD2MAN, pod2man, no)
79 AM_CONDITIONAL([HAVE_POD2MAN], [test x"$POD2MAN" != "xno"])
82 AC_PATH_PROG(POD2HTML, pod2html, no)
83 AM_CONDITIONAL([HAVE_POD2HTML], [test x"$POD2HTML" != "xno"])
86 AC_PATH_PROG(DATE, date, no)
87 if [ test x"$DATE" != "xno" ]; then
88 build_date=`"$DATE" +%Y-%m-%d 2>/dev/null`
89 if [ test x"$build_date" != "x" ]; then
90 AC_DEFINE_UNQUOTED([BUILD_DATE], "$build_date", [We have 'date'])
94 AC_PATH_PROG(GIT, git, no)
95 if [ test x"$GIT" != "xno" ]; then
96 QUVI_BRANCH=_QUVI_BRANCH
97 git_describe=`"$GIT" describe "$QUVI_BRANCH" 2>/dev/null`
98 if [ test x"$git_describe" != "x" ]; then
99 AC_DEFINE_UNQUOTED([GIT_DESCRIBE],
100 "$git_describe", [We have 'git describe'])
104 # Checks for libraries.
106 PKG_CHECK_MODULES([libcurl], [libcurl >= 7.18.0])
107 PKG_CHECK_MODULES([liblua], [lua >= 5.1], [], [
108 PKG_CHECK_MODULES([liblua], [lua51 >= 5.1], [], [
109 PKG_CHECK_MODULES([liblua], [lua5.1 >= 5.1], [], [
110 PKG_CHECK_MODULES(liblua, [lua-5.1 >= 5.1])
115 AC_ARG_WITH([soup], AS_HELP_STRING([--with-soup], [Build with libsoup]))
117 AS_IF([test "x$with_soup" = "xyes"], [
118 # Either libsoup-gnome or libsoup.
119 PKG_CHECK_MODULES( [libsoup_gnome], [libsoup-gnome-2.4 >= 2.26], [
120 AC_DEFINE([HAVE_LIBSOUP_GNOME], [1], [Have libsoup-gnome])
121 libsoup_CFLAGS="$libsoup_gnome_CFLAGS"
122 libsoup_LIBS="$libsoup_gnome_LIBS"
123 ], [PKG_CHECK_MODULES([libsoup], [libsoup-2.4 >= 2.26])]
125 AC_SUBST(libsoup_CFLAGS)
126 AC_SUBST(libsoup_LIBS)
129 AM_CONDITIONAL([WITH_SOUP], [test x"$with_soup" = "xyes"])
131 # Checks for header files.
132 AC_HEADER_STDC # `stdlib.h', `stdarg.h', `string.h', ...
133 AC_CHECK_HEADERS([memory.h stdint.h stdlib.h limits.h stddef.h])
135 # Checks for typedefs, structures, and compiler characteristics.
140 AC_CHECK_TYPES([ptrdiff_t])
142 # Checks for library functions.
143 if [ test x"$host_w32" = "xno" ]; then
148 [memset strdup strstr strtol strerror strcspn getcwd strchr strrchr strspn])
152 AC_CHECK_FUNCS([vasprintf], [
153 AC_CHECK_FUNCS([asprintf], [have_asprintf=yes])
155 AM_CONDITIONAL([NO_ASPRINTF], [test x"$have_asprintf" != "xyes"])
158 AC_ARG_ENABLE([quvi],
159 [AS_HELP_STRING([--enable-quvi],
160 [build quvi command line tool@<:@default=yes@:>@])],
163 AM_CONDITIONAL([ENABLE_QUVI], [test x"$enable_quvi" != "xno"])
166 AC_ARG_ENABLE([examples],
167 [AS_HELP_STRING([--enable-examples],
168 [build examples @<:@default=no@:>@])],
170 [enable_examples=no])
171 AM_CONDITIONAL([ENABLE_EXAMPLES], [test x"$enable_examples" != "xno"])
174 AC_ARG_ENABLE([tests],
175 [AS_HELP_STRING([--enable-tests],
176 [enable tests @<:@default=no@:>@])],
179 AM_CONDITIONAL([ENABLE_TESTS], [test x"$enable_tests" != "xno"])
181 # --enable-verbose-tests
182 AC_ARG_ENABLE([verbose-tests],
183 [AS_HELP_STRING([--enable-verbose-tests],
184 [enable verbose tests @<:@default=no@:>@])],
186 [enable_verbose_tests=no])
187 AM_CONDITIONAL([ENABLE_VERBOSE_TESTS],
188 [test x"$enable_verbose_tests" != "xno"])
191 AC_ARG_ENABLE([nsfw],
192 [AS_HELP_STRING([--enable-nsfw],
193 [build with adult website support @<:@default=no@:>@])],
196 AM_CONDITIONAL([ENABLE_NSFW], [test x"$enable_nsfw" != "xno"])
198 if [ test x"$enable_nsfw" != "xno" ]; then
199 AC_DEFINE([ENABLE_NSFW], [1], [Define to enable nsfw])
203 AC_ARG_ENABLE([todo],
204 [AS_HELP_STRING([--enable-todo],
205 [with website scripts marked as "todo" @<:@default=no@:>@])],
208 AM_CONDITIONAL([ENABLE_TODO], [test x"$enable_todo" != "xno"])
210 if [ test x"$enable_todo" != "xno" ]; then
211 AC_DEFINE([ENABLE_TODO], [1], [Define to enable todo support])
215 AC_ARG_ENABLE([nlfy],
216 [AS_HELP_STRING([--enable-nlfy],
217 [test scripts marked as "nlfy" @<:@default=no@:>@])],
220 AM_CONDITIONAL([ENABLE_NLFY], [test x"$enable_nlfy" != "xno"])
224 [AS_HELP_STRING([--with-man],
225 [install manual pages @<:@default=yes@:>@])],
228 AM_CONDITIONAL([WITH_MAN], [test x"$with_man" != "xno"])
232 [AS_HELP_STRING([--with-doc],
233 [install documentation @<:@default=yes@:>@])],
236 AM_CONDITIONAL([WITH_DOC], [test x"$with_doc" != "xno"])
239 AM_CONDITIONAL([HAVE_GNU_LD], [test x"$with_gnu_ld" = "xyes"])
244 include/quvi/Makefile
263 quvi version: ${VERSION} g:${git_describe} b:${build_date}
270 build libquvi: shared=${enable_shared} static=${enable_static}
271 build examples: ${enable_examples}
272 build quvi: ${enable_quvi}
274 enable tests: ${enable_tests}
275 enable todo: ${enable_todo}
276 enable nsfw: ${enable_nsfw}
277 enable nlfy: ${enable_nlfy}
279 install manual: ${with_man}
280 install docs: ${with_doc}
284 # gengetopt: ${GENGETOPT}
285 # doxygen: ${DOXYGEN}
287 # pod2man: ${POD2MAN}
288 # pod2html: ${POD2HTML}