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(PERL, perl, no)
70 AM_CONDITIONAL([HAVE_PERL], [test x"$PERL" != "xno"])
74 AC_MSG_CHECKING([for Pod::Checker])
75 if [ $PERL -mPod::Checker >/dev/null 2>&1 ]; then
79 AM_CONDITIONAL([HAVE_PERL_POD_CHECKER], [test x"$have_pod_checker" = "xyes"])
81 AC_PATH_PROG(POD2MAN, pod2man, no)
82 AM_CONDITIONAL([HAVE_POD2MAN], [test x"$POD2MAN" != "xno"])
85 AC_PATH_PROG(POD2HTML, pod2html, no)
86 AM_CONDITIONAL([HAVE_POD2HTML], [test x"$POD2HTML" != "xno"])
89 AC_PATH_PROG(DATE, date, no)
90 if [ test x"$DATE" != "xno" ]; then
91 build_date=`"$DATE" +%Y-%m-%d 2>/dev/null`
92 if [ test x"$build_date" != "x" ]; then
93 AC_DEFINE_UNQUOTED([BUILD_DATE], "$build_date", [We have 'date'])
97 AC_PATH_PROG(GIT, git, no)
98 if [ test x"$GIT" != "xno" ]; then
99 QUVI_BRANCH=_QUVI_BRANCH
100 git_describe=`"$GIT" describe "$QUVI_BRANCH" 2>/dev/null`
101 if [ test x"$git_describe" != "x" ]; then
102 AC_DEFINE_UNQUOTED([GIT_DESCRIBE],
103 "$git_describe", [We have 'git describe'])
107 # Checks for libraries.
109 PKG_CHECK_MODULES(libcurl, libcurl >= 7.18.0)
110 PKG_CHECK_MODULES(liblua, lua >= 5.1, [], [
111 PKG_CHECK_MODULES(liblua, lua51 >= 5.1, [], [
112 PKG_CHECK_MODULES(liblua, lua5.1 >= 5.1, [], [
113 PKG_CHECK_MODULES(liblua, lua-5.1 >= 5.1)
117 AM_SILENT_RULES([yes])
119 # Checks for header files.
120 AC_HEADER_STDC # `stdlib.h', `stdarg.h', `string.h', ...
121 AC_CHECK_HEADERS([memory.h stdint.h stdlib.h limits.h stddef.h])
123 # Checks for typedefs, structures, and compiler characteristics.
128 AC_CHECK_TYPES([ptrdiff_t])
130 # Checks for library functions.
131 if [ test x"$host_w32" = "xno" ]; then
136 [memset strdup strstr strtol strerror strcspn getcwd strchr strrchr strspn])
140 AC_CHECK_FUNCS([vasprintf], [
141 AC_CHECK_FUNCS([asprintf], [have_asprintf=yes])
143 AM_CONDITIONAL([NO_ASPRINTF], [test x"$have_asprintf" != "xyes"])
146 AC_ARG_ENABLE([quvi],
147 [AS_HELP_STRING([--enable-quvi],
148 [build quvi command line tool@<:@default=yes@:>@])],
151 AM_CONDITIONAL([ENABLE_QUVI], [test x"$enable_quvi" != "xno"])
154 AC_ARG_ENABLE([examples],
155 [AS_HELP_STRING([--enable-examples],
156 [build examples @<:@default=no@:>@])],
158 [enable_examples=no])
159 AM_CONDITIONAL([ENABLE_EXAMPLES], [test x"$enable_examples" != "xno"])
162 AC_ARG_ENABLE([nsfw],
163 [AS_HELP_STRING([--enable-nsfw],
164 [build with adult website support @<:@default=no@:>@])],
167 AM_CONDITIONAL([ENABLE_NSFW], [test x"$enable_nsfw" != "xno"])
169 if [ test x"$enable_nsfw" != "xno" ]; then
170 AC_DEFINE([ENABLE_NSFW], [1], [Define to enable nsfw])
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"])
182 AC_ARG_ENABLE([broken],
183 [AS_HELP_STRING([--enable-broken],
184 [build with broken website support @<:@default=no@:>@])],
187 AM_CONDITIONAL([ENABLE_BROKEN], [test x"$enable_broken" != "xno"])
189 if [ test x"$enable_broken" != "xno" ]; then
190 AC_DEFINE([ENABLE_BROKEN], [1], [Define to enable broken support])
195 [AS_HELP_STRING([--with-man],
196 [install manual pages @<:@default=yes@:>@])],
199 AM_CONDITIONAL([WITH_MAN], [test x"$with_man" != "xno"])
203 [AS_HELP_STRING([--with-doc],
204 [install documentation @<:@default=yes@:>@])],
207 AM_CONDITIONAL([WITH_DOC], [test x"$with_doc" != "xno"])
210 AM_CONDITIONAL([HAVE_GNU_LD], [test x"$with_gnu_ld" = "xyes"])
215 include/quvi/Makefile
235 quvi version: ${VERSION} g:${git_describe} b:${build_date}
242 build libquvi: shared=${enable_shared} static=${enable_static}
243 build examples: ${enable_examples}
244 build quvi: ${enable_quvi}
246 enable broken: ${enable_broken}
247 enable tests: ${enable_tests}
248 enable nsfw: ${enable_nsfw}
250 install manual: ${with_man}
251 install docs: ${with_doc}
255 # gengetopt: ${GENGETOPT}
256 # doxygen: ${DOXYGEN}
258 # Pod::Checker: ${have_pod_checker}
259 # pod2man: ${POD2MAN}
260 # pod2html: ${POD2HTML}