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])
41 *-*-mingw32* | *-*-cygwin*)
42 AC_DEFINE([HOST_W32], [1], [...])
44 if [ test x"$enable_shared" != "xno" ]; then
45 NO_UNDEFINED="-no-undefined"
49 EXTRA_LIBQUVI_LDFLAGS="$NO_UNDEFINED"
50 AC_SUBST(EXTRA_LIBQUVI_LDFLAGS)
52 # Checks for programs.
61 AC_PATH_PROG(GENGETOPT, gengetopt, no)
62 AM_CONDITIONAL([HAVE_GENGETOPT], [test x"$GENGETOPT" != "xno"])
65 AC_PATH_PROG(DOXYGEN, doxygen, no)
66 AM_CONDITIONAL([HAVE_DOXYGEN], [test x"$DOXYGEN" != "xno"])
69 AC_PATH_PROG(PROVE, prove, no)
70 AM_CONDITIONAL([HAVE_PROVE], [test x"$PROVE" != "xno"])
73 AC_PATH_PROG(VALGRIND, valgrind, no)
74 AM_CONDITIONAL([HAVE_VALGRIND], [test x"$VALGRIND" != "xno"])
77 AC_PATH_PROG(POD2MAN, pod2man, no)
78 AM_CONDITIONAL([HAVE_POD2MAN], [test x"$POD2MAN" != "xno"])
81 AC_PATH_PROG(POD2HTML, pod2html, no)
82 AM_CONDITIONAL([HAVE_POD2HTML], [test x"$POD2HTML" != "xno"])
85 AC_PATH_PROG(DATE, date, no)
86 if [ test x"$DATE" != "xno" ]; then
87 build_date=`"$DATE" +%Y-%m-%d 2>/dev/null`
88 if [ test x"$build_date" != "x" ]; then
89 AC_DEFINE_UNQUOTED([BUILD_DATE], "$build_date", [We have 'date'])
93 AC_PATH_PROG(GIT, git, no)
94 if [ test x"$GIT" != "xno" ]; then
95 QUVI_BRANCH=_QUVI_BRANCH
96 git_describe=`"$GIT" describe "$QUVI_BRANCH" 2>/dev/null`
97 if [ test x"$git_describe" != "x" ]; then
98 AC_DEFINE_UNQUOTED([GIT_DESCRIBE],
99 "$git_describe", [We have 'git describe'])
103 # Checks for libraries.
105 PKG_CHECK_MODULES(libcurl, libcurl >= 7.18.0)
106 PKG_CHECK_MODULES(liblua, lua >= 5.1, [], [
107 PKG_CHECK_MODULES(liblua, lua51 >= 5.1, [], [
108 PKG_CHECK_MODULES(liblua, lua5.1 >= 5.1, [], [
109 PKG_CHECK_MODULES(liblua, lua-5.1 >= 5.1)
113 AM_SILENT_RULES([yes])
115 # Checks for header files.
116 AC_HEADER_STDC # `stdlib.h', `stdarg.h', `string.h', ...
117 AC_CHECK_HEADERS([memory.h stdint.h stdlib.h limits.h stddef.h])
119 # Checks for typedefs, structures, and compiler characteristics.
124 AC_CHECK_TYPES([ptrdiff_t])
126 # Checks for library functions.
127 if [ test x"$host_w32" = "xno" ]; then
132 [memset strdup strstr strtol strerror strcspn getcwd strchr strrchr strspn])
136 AC_CHECK_FUNCS([vasprintf], [
137 AC_CHECK_FUNCS([asprintf], [have_asprintf=yes])
139 AM_CONDITIONAL([NO_ASPRINTF], [test x"$have_asprintf" != "xyes"])
142 AC_ARG_ENABLE([quvi],
143 [AS_HELP_STRING([--enable-quvi],
144 [build quvi command line tool@<:@default=yes@:>@])],
147 AM_CONDITIONAL([ENABLE_QUVI], [test x"$enable_quvi" != "xno"])
150 AC_ARG_ENABLE([examples],
151 [AS_HELP_STRING([--enable-examples],
152 [build examples @<:@default=no@:>@])],
154 [enable_examples=no])
155 AM_CONDITIONAL([ENABLE_EXAMPLES], [test x"$enable_examples" != "xno"])
158 AC_ARG_ENABLE([tests],
159 [AS_HELP_STRING([--enable-tests],
160 [enable tests @<:@default=no@:>@])],
163 AM_CONDITIONAL([ENABLE_TESTS], [test x"$enable_tests" != "xno"])
165 # --enable-verbose-tests
166 AC_ARG_ENABLE([verbose-tests],
167 [AS_HELP_STRING([--enable-verbose-tests],
168 [enable verbose tests @<:@default=no@:>@])],
170 [enable_verbose_tests=no])
171 AM_CONDITIONAL([ENABLE_VERBOSE_TESTS],
172 [test x"$enable_verbose_tests" != "xno"])
175 AC_ARG_ENABLE([nsfw],
176 [AS_HELP_STRING([--enable-nsfw],
177 [build with adult website support @<:@default=no@:>@])],
180 AM_CONDITIONAL([ENABLE_NSFW], [test x"$enable_nsfw" != "xno"])
182 if [ test x"$enable_nsfw" != "xno" ]; then
183 AC_DEFINE([ENABLE_NSFW], [1], [Define to enable nsfw])
187 AC_ARG_ENABLE([todo],
188 [AS_HELP_STRING([--enable-todo],
189 [with website scripts marked as "todo" @<:@default=no@:>@])],
192 AM_CONDITIONAL([ENABLE_TODO], [test x"$enable_todo" != "xno"])
194 if [ test x"$enable_todo" != "xno" ]; then
195 AC_DEFINE([ENABLE_TODO], [1], [Define to enable todo support])
199 AC_ARG_ENABLE([nlfy],
200 [AS_HELP_STRING([--enable-nlfy],
201 [test scripts marked as "nlfy" @<:@default=no@:>@])],
204 AM_CONDITIONAL([ENABLE_NLFY], [test x"$enable_nlfy" != "xno"])
208 [AS_HELP_STRING([--with-man],
209 [install manual pages @<:@default=yes@:>@])],
212 AM_CONDITIONAL([WITH_MAN], [test x"$with_man" != "xno"])
216 [AS_HELP_STRING([--with-doc],
217 [install documentation @<:@default=yes@:>@])],
220 AM_CONDITIONAL([WITH_DOC], [test x"$with_doc" != "xno"])
223 AM_CONDITIONAL([HAVE_GNU_LD], [test x"$with_gnu_ld" = "xyes"])
228 include/quvi/Makefile
247 quvi version: ${VERSION} g:${git_describe} b:${build_date}
254 build libquvi: shared=${enable_shared} static=${enable_static}
255 build examples: ${enable_examples}
256 build quvi: ${enable_quvi}
258 enable tests: ${enable_tests}
259 enable todo: ${enable_todo}
260 enable nsfw: ${enable_nsfw}
261 enable nlfy: ${enable_nlfy}
263 install manual: ${with_man}
264 install docs: ${with_doc}
268 # gengetopt: ${GENGETOPT}
269 # doxygen: ${DOXYGEN}
271 # pod2man: ${POD2MAN}
272 # pod2html: ${POD2HTML}