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([src/libquvi/quvi_api.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(PROVE, prove, no)
63 AM_CONDITIONAL([HAVE_PROVE], [test x"$PROVE" != "xno"])
66 AC_PATH_PROG(VALGRIND, valgrind, no)
67 AM_CONDITIONAL([HAVE_VALGRIND], [test x"$VALGRIND" != "xno"])
70 AC_PATH_PROG(DATE, date, no)
71 if [ test x"$DATE" != "xno" ]; then
72 build_date=`"$DATE" +%Y-%m-%d 2>/dev/null`
73 if [ test x"$build_date" != "x" ]; then
74 AC_DEFINE_UNQUOTED([BUILD_DATE], "$build_date", [We have 'date'])
78 AC_PATH_PROG(GIT, git, no)
79 if [ test x"$GIT" != "xno" ]; then
80 QUVI_BRANCH=_QUVI_BRANCH
81 git_describe=`"$GIT" describe "$QUVI_BRANCH" 2>/dev/null`
82 if [ test x"$git_describe" != "x" ]; then
83 AC_DEFINE_UNQUOTED([GIT_DESCRIBE],
84 "$git_describe", [We have 'git describe'])
88 AC_PATH_PROGS(ND, [naturaldocs NaturalDocs], no)
89 AM_CONDITIONAL([HAVE_ND], [test "x$ND" != "xno"])
91 # Checks for libraries.
93 PKG_CHECK_MODULES([libcurl], [libcurl >= 7.18.2])
94 PKG_CHECK_MODULES([liblua], [lua >= 5.1], [], [
95 PKG_CHECK_MODULES([liblua], [lua51 >= 5.1], [], [
96 PKG_CHECK_MODULES([liblua], [lua5.1 >= 5.1], [], [
97 PKG_CHECK_MODULES(liblua, [lua-5.1 >= 5.1])
102 AC_ARG_WITH([soup], AS_HELP_STRING([--with-soup], [Build with libsoup]))
104 AS_IF([test "x$with_soup" = "xyes"], [
105 # Either libsoup-gnome or libsoup.
106 PKG_CHECK_MODULES( [libsoup_gnome], [libsoup-gnome-2.4 >= 2.26], [
107 AC_DEFINE([HAVE_LIBSOUP_GNOME], [1], [Have libsoup-gnome])
108 libsoup_CFLAGS="$libsoup_gnome_CFLAGS"
109 libsoup_LIBS="$libsoup_gnome_LIBS"
110 ], [PKG_CHECK_MODULES([libsoup], [libsoup-2.4 >= 2.26])]
112 AC_SUBST(libsoup_CFLAGS)
113 AC_SUBST(libsoup_LIBS)
116 AM_CONDITIONAL([WITH_SOUP], [test x"$with_soup" = "xyes"])
119 AC_ARG_WITH([nd-output],
120 [AS_HELP_STRING([--with-nd-output=FORMAT],
121 [NaturalDocs output format (HTML or FramedHTML)])],
123 if [ test x"$ND" = "xno" ]; then
124 AC_MSG_ERROR([NaturalDocs not found. No point in setting output format])
131 AC_MSG_ERROR([NaturalDocs does not support $withval output format])
137 # Checks for header files.
138 AC_HEADER_STDC # `stdlib.h', `stdarg.h', `string.h', ...
139 AC_CHECK_HEADERS([memory.h stdint.h stdlib.h limits.h stddef.h])
141 # Checks for typedefs, structures, and compiler characteristics.
146 AC_CHECK_TYPES([ptrdiff_t])
148 # Checks for library functions.
149 if [ test x"$host_w32" = "xno" ]; then
154 [memset strdup strstr strtol strerror strcspn getcwd strchr strrchr strspn])
158 AC_CHECK_FUNCS([vasprintf], [
159 AC_CHECK_FUNCS([asprintf], [have_asprintf=yes])
161 AM_CONDITIONAL([NO_ASPRINTF], [test x"$have_asprintf" != "xyes"])
164 AC_ARG_ENABLE([quvi],
165 [AS_HELP_STRING([--enable-quvi],
166 [build quvi command line tool@<:@default=yes@:>@])],
169 AM_CONDITIONAL([ENABLE_QUVI], [test x"$enable_quvi" != "xno"])
172 AC_ARG_ENABLE([examples],
173 [AS_HELP_STRING([--enable-examples],
174 [build examples @<:@default=no@:>@])],
176 [enable_examples=no])
177 AM_CONDITIONAL([ENABLE_EXAMPLES], [test x"$enable_examples" != "xno"])
180 AC_ARG_ENABLE([tests],
181 [AS_HELP_STRING([--enable-tests],
182 [enable tests @<:@default=no@:>@])],
185 AM_CONDITIONAL([ENABLE_TESTS], [test x"$enable_tests" != "xno"])
188 AC_ARG_ENABLE([nsfw],
189 [AS_HELP_STRING([--enable-nsfw],
190 [build with adult website support @<:@default=no@:>@])],
193 AM_CONDITIONAL([ENABLE_NSFW], [test x"$enable_nsfw" != "xno"])
195 if [ test x"$enable_nsfw" != "xno" ]; then
196 AC_DEFINE([ENABLE_NSFW], [1], [Define to enable nsfw])
200 AC_ARG_ENABLE([todo],
201 [AS_HELP_STRING([--enable-todo],
202 [with website scripts marked as "todo" @<:@default=no@:>@])],
205 AM_CONDITIONAL([ENABLE_TODO], [test x"$enable_todo" != "xno"])
207 if [ test x"$enable_todo" != "xno" ]; then
208 AC_DEFINE([ENABLE_TODO], [1], [Define to enable todo support])
212 AC_ARG_ENABLE([nlfy],
213 [AS_HELP_STRING([--enable-nlfy],
214 [test scripts marked as "nlfy" @<:@default=no@:>@])],
217 AM_CONDITIONAL([ENABLE_NLFY], [test x"$enable_nlfy" != "xno"])
220 AC_ARG_WITH([manual],
221 [AS_HELP_STRING([--with-manual],
222 [install manual pages @<:@default=yes@:>@])],
225 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
231 src/libquvi/quvi/Makefile
246 quvi version: ${VERSION} g:${git_describe} b:${build_date}
253 build examples: ${enable_examples}
254 build libquvi: shared=${enable_shared} static=${enable_static}
255 build quvi: ${enable_quvi}
257 enable tests: ${enable_tests}
258 enable todo: ${enable_todo}
259 enable nsfw: ${enable_nsfw}
260 enable nlfy: ${enable_nlfy}
262 install manual: ${with_manual}