summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 80163e171b7bee127b2e8845847cd42af7db1c25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# vi:set et ai sw=2 sts=2 ts=2: */
# -
# Copyright (c) 2009-2011 Jannis Pohlmann <jannis@xfce.org>
# 
# This program is free software; you can redistribute it and/or 
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of 
# the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public 
# License along with this program; if not, write to the Free 
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.

dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([tumbler_verinfo], [0:0:0])
m4_define([tumbler_version_api_major], [1])
m4_define([tumbler_version_major], [0])
m4_define([tumbler_version_minor], [1])
m4_define([tumbler_version_micro], [26])
m4_define([tumbler_version], [tumbler_version_major().tumbler_version_minor().tumbler_version_micro()])

dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2009-2011 Jannis Pohlmann <jannis@xfce.org>])
AC_INIT([tumbler], [tumbler_version], [http://bugzilla.xfce.org/])
AC_PREREQ([2.50])
AC_CANONICAL_TARGET()

dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([ACLOCAL_AMFLAGS], ["$ACLOCAL_FLAGS -I m4"])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

dnl **************************
dnl *** Libtool versioning ***
dnl **************************
TUMBLER_VERINFO=tumbler_verinfo()
AC_SUBST([TUMBLER_VERINFO])

dnl ****************************
dnl *** Subst tumbler version ***
dnl ****************************
TUMBLER_VERSION_MAJOR=tumbler_version_major()
TUMBLER_VERSION_MINOR=tumbler_version_minor()
TUMBLER_VERSION_MICRO=tumbler_version_micro()
TUMBLER_VERSION_API_MAJOR=tumbler_version_api_major()
TUMBLER_VERSION_API=$TUMBLER_VERSION_API_MAJOR
AC_SUBST([TUMBLER_VERSION_MAJOR])
AC_SUBST([TUMBLER_VERSION_MINOR])
AC_SUBST([TUMBLER_VERSION_MICRO])
AC_SUBST([TUMBLER_VERSION_API_MAJOR])
AC_SUBST([TUMBLER_VERSION_API])

dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_AIX()
AC_ISC_POSIX()
AC_MINIX()

dnl ********************************
dnl *** Check for Win32 variants ***
dnl ********************************
AC_MSG_CHECKING([if building for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
  ac_bm_platform_win32=yes
  ;;
*)
  ac_bm_platform_win32=no
  ;;
esac
AC_MSG_RESULT([$ac_bm_platform_win32])
AM_CONDITIONAL([PLATFORM_WIN32], [test x"$ac_bm_platform_win32" = x"yes"])

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AM_PROG_AS()
AC_PROG_CC()
AM_PROG_CC_C_O()
AC_PROG_INSTALL()
AC_PROG_INTLTOOL([0.31], [no-xml])

dnl ***********************
dnl *** Prepare libtool ***
dnl ***********************
LT_PREREQ([2.2.6])
LT_INIT([disable-static])

dnl ***************************************
dnl *** Check for standard header files ***
dnl ***************************************
AC_HEADER_STDC()
AC_CHECK_HEADERS([fcntl.h linux/sched.h memory.h sched.h setjmp.h stdio.h \
                  stdlib.h string.h syscall.h sys/mman.h sys/types.h \
                  sys/stat.h unistd.h sys/select.h])

dnl ************************************
dnl *** Check for standard functions ***
dnl ************************************
AC_FUNC_MMAP()
AC_CHECK_FUNCS([sched_getparam sched_setscheduler])

dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
linguas=`ls po/*.po | sed s/.po//g | sed sApo/AA | xargs`
XDT_I18N([$linguas])

dnl *************************
dnl *** Check for GTK-Doc ***
dnl *************************
GTK_DOC_CHECK(1.9)

dnl ***********************************
dnl *** Check for dbus-binding-tool ***
dnl ***********************************
AC_ARG_VAR([DBUS_BINDING_TOOL], [Tool to generate C bindings from XML D-Bus interface definitions])
AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
if test x"$DBUS_BINDING_TOOL" = x"no"; then
  AC_MSG_ERROR([could not find dbus-binding-tool in \$PATH. You can run
  ./configure DBUS_BINDING_TOOL=/path/to/dbus-binding-tool to define 
  a custom location for it.])
fi

dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16.0])
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.16.0])
PKG_CHECK_MODULES([GMODULE], [gmodule-2.0 >= 2.10.0])
PKG_CHECK_MODULES([GTHREAD], [gthread-2.0 >= 2.16.0])
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.0.0])
PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1 >= 0.72])

dnl *************************
dnl *** Check for plugins ***
dnl *************************
TUMBLER_COVER_THUMBNAILER()
TUMBLER_FONT_THUMBNAILER()
TUMBLER_JPEG_THUMBNAILER()
TUMBLER_PIXBUF_THUMBNAILER()
TUMBLER_FFMPEG_THUMBNAILER()
TUMBLER_GSTREAMER_THUMBNAILER()
TUMBLER_ODF_THUMBNAILER()
TUMBLER_POPPLER_THUMBNAILER()
TUMBLER_RAW_THUMBNAILER()
TUMBLER_XDG_CACHE()

dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG()

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()

dnl *************************************
dnl *** Compensate for broken gtk-doc ***
dnl *************************************
XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
AC_SUBST([GTK_DOC_EXTRA_CFLAGS])

AC_OUTPUT([
Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/tumbler/Makefile
docs/reference/tumbler/version.xml
plugins/Makefile
plugins/cover-thumbnailer/Makefile
plugins/font-thumbnailer/Makefile
plugins/gst-thumbnailer/Makefile
plugins/jpeg-thumbnailer/Makefile
plugins/pixbuf-thumbnailer/Makefile
plugins/ffmpeg-thumbnailer/Makefile
plugins/odf-thumbnailer/Makefile
plugins/poppler-thumbnailer/Makefile
plugins/raw-thumbnailer/Makefile
plugins/xdg-cache/Makefile
po/Makefile.in
tumbler/Makefile
tumbler/tumbler-1.pc
tumbler/tumbler-config.h
tumblerd/Makefile
])

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "  * Debug:                                            $enable_debug"
echo
echo "Plugins:"
echo
if test x"$ac_tumbler_pixbuf_thumbnailer" = x"yes"; then
echo "  * GdkPixbuf thumbnailer plugin:                     yes"
else
echo "  * GdkPixbuf thumbnailer plugin:                     no"
fi
if test x"$ac_tumbler_cover_thumbnailer" = x"yes"; then
echo "  * Cover thumbnailer plugin:                         yes"
else
echo "  * Cover thumbnailer plugin:                         no"
fi
if test x"$ac_tumbler_font_thumbnailer" = x"yes"; then
echo "  * FreeType font thumbnailer plugin:                 yes"
else
echo "  * FreeType font thumbnailer plugin:                 no"
fi
if test x"$ac_tumbler_jpeg_thumbnailer" = x"yes"; then
echo "  * JPEG thumbnailer plugin with EXIF support:        yes"
else
echo "  * JPEG thumbnailer plugin with EXIF support:        no"
fi
if test x"$ac_tumbler_ffmpeg_thumbnailer" = x"yes"; then
echo "  * Video thumbnailer plugin using ffmpegthumbnailer: yes"
else
echo "  * Video thumbnailer plugin using ffmpegthumbnailer: no"
fi
if test x"$ac_tumbler_gstreamer_thumbnailer" = x"yes"; then
echo "  * Video thumbnailer plugin using GStreamer:         yes"
else
echo "  * Video thumbnailer plugin using GStreamer:         no"
fi
if test x"$ac_tumbler_odf_thumbnailer" = x"yes"; then
echo "  * ODF thumbnailer plugin using libgsf:              yes"
else
echo "  * ODF thumbnailer plugin using libgsf:              no"
fi
if test x"$ac_tumbler_poppler_thumbnailer" = x"yes"; then
echo "  * PDF/PS thumbnailer plugin using poppler:          yes"
else
echo "  * PDF/PS thumbnailer plugin using poppler:          no"
fi
if test x"$ac_tumbler_raw_thumbnailer" = x"yes"; then
echo "  * RAW thumbnailer plugin using libopenraw:          yes"
else
echo "  * RAW thumbnailer plugin using libopenraw:          no"
fi
if test x"$ac_tumbler_xdg_cache" = x"yes"; then
echo "  * Freedesktop.org cache plugin:                     yes"
else
echo "  * Freedesktop.org cache plugin:                     no"
fi
echo