2 AC_INIT(logjam, 4.5.3.1, ketmar@ua.fm)
5 AC_CONFIG_SRCDIR(src/jam.c)
6 AM_CONFIG_HEADER(config.h)
8 dnl Checks for programs.
15 AC_CHECK_HEADERS([regex.h])
17 dnl Check for gettext.
18 GETTEXT_PACKAGE=logjam
19 AC_SUBST(GETTEXT_PACKAGE)
20 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],"$GETTEXT_PACKAGE",[gettext package])
21 ALL_LINGUAS="es en_GB en_US.UTF-8 de he ja ru_RU uk_UA"
24 dnl Even though the Unix versions don't use gthread, the soup
25 dnl library manages to tickle glib in a way that makes it unhappy
26 dnl unless we init threads. So just bring it in always.
27 MODULES="glib-2.0 gobject-2.0 libxml-2.0 gthread-2.0"
29 AC_MSG_CHECKING([for mingw])
32 CFLAGS="$CFLAGS -mms-bitfields"
33 with_dock="no (not supported on Windows)"
41 AC_MSG_RESULT([$mingw])
43 dnl OSX doesn't have a socklen_t?
48 AC_HELP_STRING([--enable-pch],
49 [compile with GCC 3.4 precompiled headers]),
51 AM_CONDITIONAL(ENABLE_PCH, test "$enable_pch" = "yes")
54 AC_HELP_STRING([--without-gtk],
55 [compile without GUI support]),
58 LJ_PKG_ARG_WITH(sqlite3, [SQLITE3],
59 AC_HELP_STRING([--with-sqlite3],
60 [use sqlite backend (default autodetect)]),
63 LJ_PKG_ARG_WITH(libsoup, [LIBSOUP],
64 AC_HELP_STRING([--with-libsoup],
65 [use libsoup network backend]),
68 AC_MSG_CHECKING(whether to use gtk)
69 if test "$with_gtk" = "yes" ; then
71 MODULES="gtk+-2.0 >= 2.4 $MODULES"
72 LJ_PKG_ARG_WITH(gtkspell, GTKSPELL,
73 AC_HELP_STRING([--with-gtkspell],
74 [compile with GtkSpell support (default autodetect)]),
77 LJ_PKG_ARG_WITH(gtkhtml330, GTKHTML330,
78 AC_HELP_STRING([--with-gtkhtml],
79 [compile with GtkHtml3.30 support (default autodetect)]),
81 if test "$with_gtkhtml330" = "yes"; then
86 if test "$with_gtkhtml" != "no"; then
87 AC_DEFINE(HAVE_GTKHTML,1,[do we have a gtkhtml?])
90 LJ_PKG_ARG_WITH(librsvg, LIBRSVG,
91 AC_HELP_STRING([--with-librsvg],
92 [compile with librsvg support (default autodetect)]),
95 AC_MSG_CHECKING(whether to use dock)
96 if test "$with_dock" = "yes" ; then
97 AC_DEFINE(USE_DOCK, 1, [should we use dock?])
103 PKG_CHECK_MODULES(LOGJAM, $MODULES)
104 AC_SUBST(LOGJAM_CFLAGS)
105 AC_SUBST(LOGJAM_LIBS)
106 AC_DEFINE(HAVE_GTK, 1, [do we have gtk?])
110 PKG_CHECK_MODULES(LOGJAM, $MODULES)
111 AC_SUBST(LOGJAM_CFLAGS)
112 AC_SUBST(LOGJAM_LIBS)
118 AM_CONDITIONAL(WITH_DOCK, test "$with_dock" = "yes")
119 AM_CONDITIONAL(WITH_GTK, test "$with_gtk" = "yes")
121 dnl We were gonna support dashboard, but it looked like development stalled.
122 dnl AC_ARG_WITH(dashboard,
123 dnl AC_HELP_STRING([--with-dashboard],
124 dnl [compile with dashboard (http://www.nat.org/dashboard) support]),
125 dnl , [with_dashboard=no])
127 dnl AC_MSG_CHECKING(whether to use dashboard)
128 dnl if test "$with_dashboard" = "yes" ; then
129 dnl AC_DEFINE(USE_DASHBOARD, 1, [should we use dashboard?])
130 dnl AC_MSG_RESULT(yes)
132 dnl AC_MSG_RESULT(no)
134 dnl AM_CONDITIONAL(USE_DASHBOARD, test "$with_dashboard" = "yes")
136 dnl Choose networking backend.
140 if test "$mingw" = "yes" ; then
141 network_backend=win32
143 NETWORK_LIBS=-lwininet
144 elif test "$with_libsoup" != "no" ; then
145 network_backend=libsoup
146 elif test "$with_curl" != "no" ; then
147 AC_PATH_PROG(CURL_CONFIG, curl-config, no)
148 if test "$CURL_CONFIG" = "no" ; then
149 dnl only bitch at them if they explicitly requested libcurl
150 if test "$with_curl" = "yes" ; then
151 AC_MSG_ERROR(The curl-config script installed by libcurl could not be found.)
155 NETWORK_CFLAGS="`curl-config --cflags` -I`curl-config --prefix`/include"
156 NETWORK_LIBS="`curl-config --libs` -L`curl-config --prefix`/lib -lcurl"
160 dnl if we didn't find one above, we use libxml's nanohttp.
161 if test -z "$network_backend" ; then
162 network_backend=libxml
165 AM_CONDITIONAL(WITH_LIBSOUP, test "$network_backend" = "libsoup")
166 AM_CONDITIONAL(WITH_CURL, test "$network_backend" = "curl")
167 AC_SUBST(NETWORK_CFLAGS)
168 AC_SUBST(NETWORK_LIBS)
174 AC_HELP_STRING([--with-xmms], [build xmms helper (default autodetect)]),
177 if test "$with_xmms" = "yes"; then
178 AC_CHECK_PROG(XMMS_CONFIG, xmms-config, xmms-config, no)
179 if test "$XMMS_CONFIG" = "no"; then
180 AC_MSG_WARN([cannot find xmms-config; XMMS support disabled.])
184 XMMS_LIBS=`$XMMS_CONFIG --libs`
185 XMMS_CFLAGS=`$XMMS_CONFIG --cflags`
190 AC_SUBST(XMMS_CFLAGS)
192 dnl liblivejournal dependencies.
193 MODULES="glib-2.0 gobject-2.0 libxml-2.0"
194 PKG_CHECK_MODULES(LIVEJOURNAL, $MODULES)
195 AC_SUBST(LIVEJOURNAL_CFLAGS)
196 AC_SUBST(LIVEJOURNAL_LIBS)
197 dnl end liblivejournal dependencies.
199 AM_CONDITIONAL(WITH_XMMS, test "$with_xmms" = "yes")
200 AM_CONDITIONAL(WITH_HTML, test "$with_gtkhtml" != "no")
201 AM_CONDITIONAL(WITH_RSVG, test "$with_librsvg" = "yes")
202 AM_CONDITIONAL(WITH_SQLITE3, test "$with_sqlite3" = "yes")
203 AM_CONDITIONAL(WIN32, test "$mingw" = "yes")
205 dnl pull in liblivejournal.
206 AC_CONFIG_SUBDIRS(protocol/liblivejournal)
208 AC_CONFIG_FILES([Makefile po/Makefile.in
209 doc/Makefile data/Makefile images/Makefile
210 util/Makefile util/xmmsclient/Makefile
214 dnl punted for this release:
215 dnl - protocol/blogger/Makefile
216 dnl - util/gxr/Makefile
219 echo " logjam ${VERSION} build configuration:"
221 echo " - GTK: ${with_gtk}"
222 echo " - GtkSpell: ${with_gtkspell}"
223 echo " - GtkHTML: ${with_gtkhtml}"
224 echo " - librsvg: ${with_librsvg}"
225 echo " - Docklet (\"tray icon\"): ${with_dock}"
226 dnl echo " - Use dashboard: ${with_dashboard}"
227 echo " - Networking: ${network_backend}"
228 if test "$network_backend" = "libxml"; then
229 echo " WARNING: libxml network backend does not support proxy auth."
230 echo " Additionally, it provides less feedback while processing,"
231 echo " and it fails less gracefully than Curl."
232 echo " If you need these features, you must build with Curl."
234 echo " - XMMS helper: ${with_xmms}"
235 echo " - SQLite3: ${with_sqlite3}"
238 dnl vim: set ts=2 sw=2 et :