2 m4_define([package_major_version], [0])
3 m4_define([package_minor_version], [19])
4 m4_define([package_micro_version], [95])
5 m4_define([package_version], [package_major_version.package_minor_version.package_micro_version])
7 AC_INIT([gmpc], [0.19.95], [qball@sarine.nl])
10 m4_define([package_tagline], "♯♪ + ♭♪ = ☺")
11 m4_define([package_website], "http://gmpc.wikia.com")
12 m4_define([package_copyright], "Copyright 2003-2009 Qball Cow")
13 m4_define([package_bugtracker], "http://gmpc.wikia.com/wiki/GMPC_HELP")
17 AM_CONFIG_HEADER([config.h])
18 AC_CONFIG_MACRO_DIR([m4])
24 #Make version and variables available in config.h
25 #AC_DEFINE(GMPC_MAJOR_VERSION, package_major_version, ["Major version of gmpc"])
26 #AC_DEFINE(GMPC_MINOR_VERSION, package_minor_version, ["Minor version of gmpc"])
27 #AC_DEFINE(GMPC_MICRO_VERSION, package_micro_version, ["Micro version of gmpc"])
28 # This makes sure the right substitution is done
29 [GMPC_MAJOR_VERSION]=package_major_version
30 [GMPC_MINOR_VERSION]=package_minor_version
31 [GMPC_MICRO_VERSION]=package_micro_version
32 AC_SUBST([GMPC_MAJOR_VERSION])
33 AC_SUBST([GMPC_MINOR_VERSION])
34 AC_SUBST([GMPC_MICRO_VERSION])
35 AC_DEFINE(GMPC_TAGLINE, package_tagline, ["Gmpc's tagline"])
36 AC_DEFINE(GMPC_WEBSITE, package_website, ["Gmpc's website"])
37 AC_DEFINE(GMPC_BUGTRACKER, package_bugtracker, ["Gmpc's bugtracker"])
38 AC_DEFINE(GMPC_COPYRIGHT, package_copyright, ["Gmpc's Copyright"])
43 # Remove the check for c++ and fortran compiler
44 m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
45 m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
48 #intltool, libtool. Check for CC compiler
49 AC_PROG_INTLTOOL([0.21])
51 # Check for intltool version, needed for make dist.
52 AM_CONDITIONAL([INTLTOOL_HIGHER_04000], [test ${INTLTOOL_APPLIED_VERSION_AS_INT} -ge 4000])
63 AC_CHECK_LIB(z, inflate,zlib=1,zlib=0)
64 AM_CONDITIONAL(HAVE_ZLIB, test x$zlib = x1)
65 if test "x$zlib" != "x1"
67 AC_MSG_ERROR([GMPC plugin requires zlib])
77 AC_ARG_ENABLE([libxspf],
78 [--enable-libxspf Use libxspf.],
79 [case "${enableval}" in
80 yes) enable_libxspf=true;;
81 no) enable_libxspf=false;;
82 *) AC_MSG_ERROR([bad value ${enableval} for --enable-libxspf]);;
84 [enable_libxspf=detect])
85 if test "x$enable_libxspf" = "xdetect"; then
86 PKG_CHECK_MODULES([libxspf], xspf, enable_libxspf=true, enable_libxspf=false)
88 if test "x$enable_libxspf" = "xtrue"; then
89 PKG_CHECK_MODULES([libxspf], xspf)
90 AC_SUBST(libxspf_LIBS)
91 AC_SUBST(libxspf_CFLAGS)
93 AC_DEFINE([XSPF], 1, [Use xspf])
96 AC_ARG_ENABLE(libspiff,
97 [ --enable-libspiff Use libspiff to parse spiff playlists.],
98 [ case "${enableval}" in
99 yes) enable_libspiff=yes;;
100 no) enable_libspiff=no;;
101 *) AC_MSG_ERROR([bad value ${enableval} for --enable-libspiff]);;
103 [enable_libspiff=auto])
105 if test "x${enable_libspiff}" != xno; then
106 AC_CHECK_HEADER(spiff/spiff_c.h, AC_CHECK_LIB(spiff, spiff_parse,libspiff=1,libspiff=0),libspiff=0)
107 if test "x${libspiff}" = "x1";
109 AC_DEFINE(SPIFF,1,["Use or don't use libspiff"])
113 if test "x${enable_libspiff}" = "xyes"; then
114 AC_MSG_ERROR([libspiff not found])
120 # Checks for header files.
122 AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
124 # Checks for typedefs, structures, and compiler characteristics.
127 # Checks for libraries.
128 AC_SUBST(GLIB_REQUIRED)
129 AC_SUBST(GTK_REQUIRED)
136 AC_ARG_ENABLE(configdir,
137 [ --enable-configdir Use .config instead of .gmpc or .covers.],
138 [ case "${enableval}" in
139 yes) enable_configdir=yes;;
140 no) enable_configdir=no;;
141 *) AC_MSG_ERROR([bad value ${enableval} for --enable-configdir]);;
143 [enable_configdir=no])
145 if test x${enable_configdir} = xyes; then
146 AC_DEFINE(USE_CONFIG_DIR,1, [Use Config Dir])
152 AC_ARG_ENABLE([timing],
153 [--enable-timing Print timing debug output.],
154 [case "${enableval}" in
155 yes) enable_timing=true;;
156 no) enable_timing=false;;
157 *) AC_MSG_ERROR([bad value ${enableval} for --enable-timing]);;
159 [enable_timing=false])
161 if test x${enable_timing} = xtrue; then
162 # Add DEBUG_ENABLE define to config.h
163 AC_DEFINE(DEBUG_TIMING, 1, [Enable timing output])
167 AC_ARG_ENABLE([test],
168 [--enable-test Enable tests],
169 [case "${enableval}" in
170 yes) test_mode=true;;
171 no) test_mode=false;;
172 *) AC_MSG_ERROR([bad value ${enableval} for --enable-test]);;
176 AM_CONDITIONAL([ENABLE_TEST], [test x$test_mode = xtrue])
179 AC_ARG_WITH([extra-version],
180 [--with-extra-version=revision Specify extra version.],
181 with_extra_version=${withval})
182 if test x"${with_extra_version}" != x; then
183 AM_CONDITIONAL([EXTRA_VERSION], [true])
184 EXTRA_VERSION="${with_extra_version}";
185 AC_SUBST(EXTRA_VERSION)
187 AM_CONDITIONAL([EXTRA_VERSION], [false])
192 # Split this out, because pkgconfig macro doesn't return nicely what is missing
195 PKG_CHECK_MODULES([glib], glib-2.0 >= 2.16)
197 AC_SUBST(glib_CFLAGS)
200 PKG_CHECK_MODULES([gobject], gobject-2.0 >= 2.4)
201 AC_SUBST(gobject_LIBS)
202 AC_SUBST(gobject_CFLAGS)
205 PKG_CHECK_MODULES([gtk], gtk+-2.0 >= 2.12)
210 PKG_CHECK_MODULES([gmodule], gmodule-2.0 >= 2.4)
211 AC_SUBST(gmodule_LIBS)
212 AC_SUBST(gmodule_CFLAGS)
215 PKG_CHECK_MODULES([libmpd], libmpd >= 0.18.1)
216 AC_SUBST(libmpd_LIBS)
217 AC_SUBST(libmpd_CFLAGS)
220 PKG_CHECK_MODULES([libglade], libglade-2.0)
221 AC_SUBST(libglade_LIBS)
222 AC_SUBST(libglade_CFLAGS)
225 PKG_CHECK_MODULES([gthread], gthread-2.0)
226 AC_SUBST(gthread_LIBS)
227 AC_SUBST(gthread_CFLAGS)
230 PKG_CHECK_MODULES([libsoup], libsoup-2.4)
231 AC_SUBST(libsoup_LIBS)
232 AC_SUBST(libsoup_CFLAGS)
236 PKG_CHECK_MODULES([sqlite3], sqlite3)
237 AC_SUBST(sqlite3_LIBS)
238 AC_SUBST(sqlite3_CFLAGS)
241 AC_ARG_ENABLE([system-libsexy],
242 [--enable-system-libsexy Use system libsexy instead of bundles.],
243 [case "${enableval}" in
244 yes) system_libsexy=true;;
245 no) system_libsexy=false;;
246 *) AC_MSG_ERROR([bad value ${enableval} for --enable-system-libsexy]);;
248 [system_libsexy=detect])
249 if test "x$system_libsexy" = "xdetect"; then
250 PKG_CHECK_MODULES([libsexy], libsexy, system_libsexy=true, system_libsexy=false)
252 if test "x$system_libsexy" = "xtrue"; then
253 PKG_CHECK_MODULES([libsexy], libsexy)
254 AC_SUBST(libsexy_LIBS)
255 AC_SUBST(libsexy_CFLAGS)
256 AC_DEFINE([USE_SYSTEM_LIBSEXY], 1, [Use system libsexy instead of bundled])
259 AM_CONDITIONAL(USE_SYSTEM_LIBSEXY, [test x$system_libsexy = xtrue])
262 AC_MSG_CHECKING(prefix)
264 if test "x${prefix}" = "xNONE"; then
265 PACKAGE_PREFIX="${ac_default_prefix}"
267 PACKAGE_PREFIX="${prefix}"
269 AC_MSG_RESULT($PACKAGE_PREFIX)
272 dnl please keep them in alphabetical order
273 ALL_LINGUAS="ar bg bn bs cs da de es fi fr gl he hi hu hy id it jv lv ml ms nb ne nl pl pt pt_BR ro ru sq sv th tr zh_CN zh_TW"
278 AC_SUBST(GETTEXT_PACKAGE)
279 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[GMPC gettext package])
281 if test x$gt_cv_have_gettext != "xyes"; then
283 echo "Translations support is required."
287 #AM_GNU_GETTEXT([external])
288 # setting correct paths
289 PACKAGE_LOCALE_DIR="${PACKAGE_PREFIX}/${DATADIRNAME}/locale"
290 AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR,"$PACKAGE_LOCALE_DIR",[The package's locale path for gettext])
293 AC_SUBST(PACKAGE_LOCALE_DIR)
294 AC_SUBST(PACKAGE_LIBS)
296 #Win32 compile support
302 EXTRA_CFLAGS="-Wmissing-prototypes -Wmissing-declarations"
310 *-*-mingw32* | *-*-windows)
312 EXTRA_CFLAGS="$EXTRA_CFLAGS -mno-cygwin -mwindows -mms-bitfields"
313 EXTRA_LDFLAGS="-export-all-symbols -mwindows -mms-bitfields" ;;
316 EXTRA_LDFLAGS="-export-all-symbols -mms-bitfields" ;;
318 EXTRA_LDFLAGS="-framework Carbon"
321 AM_CONDITIONAL(WIN32, test x$win32 = xyes)
322 AM_CONDITIONAL(OSX, test x$macosx = xyes)
324 AM_CONDITIONAL(PLATFORM_WIN32, test x$win32 = xyes)
325 AM_CONDITIONAL(PLATFORM_OSX, test x$macosx = xyes)
328 AC_ARG_ENABLE(macige,
329 [ --enable-macige Enable Mac integration on mac.],
330 [ case "${enableval}" in
333 *) AC_MSG_ERROR([bad value ${enableval} for --enable-macige]);;
337 if test x$macosx = xyes && test x$macige = xyes; then
339 PKG_CHECK_MODULES([macint],ige-mac-integration)
340 AC_SUBST(macint_CFLAGS)
341 AC_SUBST(macint_LIBS)
342 AC_DEFINE(ENABLE_IGE, 1, [Enable Mac integration Support])
346 # These depend on if we are or are not on windows or osX
350 if test x$macosx = xno && test x$win32 = xno ; then
352 AC_ARG_ENABLE([mmkeys],
353 [ --disable-mmkeys Disable multimedia keys support.],
354 [ case "${enableval}" in
355 yes) enable_mmkeys=yes;;
356 no) enable_mmkeys=no;;
357 *) AC_MSG_ERROR([bad value ${enableval} for --disable--mmkeys]);;
360 if test x${enable_mmkeys} = xyes; then
361 AC_DEFINE(ENABLE_MMKEYS, 1, [Enable multimedia support])
367 AC_SUBST(EXTRA_CFLAGS)
368 AC_SUBST(EXTRA_LDFLAGS)
372 # Make the gob2 check fatal
373 if test x${GOB2} = x""; then
378 AC_ARG_ENABLE([shave],
379 [ --disable-shave Use shave output cleaner when building.],
380 [ case "${enableval}" in
381 yes) enable_shave=yes;;
382 no) enable_shave=no;;
383 *) AC_MSG_ERROR([bad value ${enableval} for --disable-shave]);;
386 if test x$enable_shave = xyes; then
404 pixmaps/icons/Makefile
405 pixmaps/icons/16x16/Makefile
406 pixmaps/icons/16x16/actions/Makefile
407 pixmaps/icons/16x16/status/Makefile
408 pixmaps/icons/16x16/apps/Makefile
409 pixmaps/icons/22x22/Makefile
410 pixmaps/icons/22x22/actions/Makefile
411 pixmaps/icons/22x22/status/Makefile
412 pixmaps/icons/22x22/apps/Makefile
413 pixmaps/icons/32x32/Makefile
414 pixmaps/icons/32x32/actions/Makefile
415 pixmaps/icons/32x32/status/Makefile
416 pixmaps/icons/32x32/apps/Makefile
417 pixmaps/icons/48x48/Makefile
418 pixmaps/icons/48x48/actions/Makefile
419 pixmaps/icons/48x48/apps/Makefile
420 pixmaps/icons/48x48/status/Makefile
421 pixmaps/icons/64x64/Makefile
422 pixmaps/icons/64x64/apps/Makefile
423 pixmaps/icons/64x64/status/Makefile
424 pixmaps/icons/72x72/Makefile
425 pixmaps/icons/72x72/apps/Makefile
426 pixmaps/icons/72x72/status/Makefile
427 pixmaps/icons/96x96/Makefile
428 pixmaps/icons/96x96/apps/Makefile
429 pixmaps/icons/96x96/status/Makefile
430 pixmaps/icons/128x128/Makefile
431 pixmaps/icons/128x128/apps/Makefile
432 pixmaps/icons/128x128/status/Makefile
433 pixmaps/icons/128x128/categories/Makefile
434 pixmaps/icons/scalable/Makefile
435 pixmaps/icons/scalable/actions/Makefile
436 pixmaps/icons/scalable/status/Makefile
437 pixmaps/icons/scalable/apps/Makefile
438 pixmaps/icons/scalable/categories/Makefile
441 test/MpdDataModel/Makefile
442 test/GmpcEasyDownload/Makefile
443 test/MetaDataCache/Makefile
447 echo "------------------ Status ------------------"
448 if test x$enable_timing = xtrue; then
449 echo "Debug timing output is: enabled"
451 echo "Debug timing output is: disabled"
453 if test x${enable_mmkeys} = xyes; then
454 echo "Multimedia keys support is: enabled"
456 echo "Multimedia keys support is: disabled"
458 if test x${enable_configdir} = xyes; then
459 echo "Use ~/.config/ for config files: enabled"
461 echo "Use ~/.config/ for config files: disabled"
463 if test "x$system_libsexy" = "xtrue"; then
464 echo "Use system libsexy: enabled"
466 echo "Use system libsexy: disabled"
468 if test "x$macige" = "xyes"; then
469 echo "Use mac integration library: enabled"
471 echo "Use mac integration library: disabled"
473 if test "x$libspiff" = "x1"; then
474 echo "Use libspiff library: enabled"
476 echo "Use libspiff library: disabled"
478 if test "x$libxspf" = "x1"; then
479 echo "Use libxspf library: enabled"
481 echo "Use libxspf library: disabled"
484 echo "Now type make to build"
485 if test x$enable_shave = xyes; then
486 echo "Building is done with reduced output. (shave";
487 echo "use --disable-shave to get all (old) output back";