2 m4_define([package_major_version], [0])
3 m4_define([package_minor_version], [20])
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.20.95], [qball@gmpclient.org])
10 m4_define([package_tagline], "All hail the Greg")
11 m4_define([package_website], "http://gmpclient.org")
12 m4_define([package_copyright], "Copyright 2003-2011 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
45 m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
46 m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
47 AC_REPLACE_FUNCS(strndup)
50 #intltool, libtool. Check for CC compiler
51 AC_PROG_INTLTOOL([0.21])
53 # Check for intltool version, needed for make dist.
54 AM_CONDITIONAL([INTLTOOL_HIGHER_04000], [test ${INTLTOOL_APPLIED_VERSION_AS_INT} -ge 4000])
65 AC_CHECK_LIB(z, inflate,zlib=1,zlib=0)
66 AM_CONDITIONAL(HAVE_ZLIB, test x$zlib = x1)
67 if test "x$zlib" != "x1"
69 AC_MSG_ERROR([GMPC plugin requires zlib])
76 AC_ARG_ENABLE([unique],
77 [--enable-unique Use unique.],
78 [case "${enableval}" in
79 yes) enable_unique=true;;
80 no) enable_unique=false;;
81 *) AC_MSG_ERROR([bad value ${enableval} for --enable-unique]);;
89 AC_ARG_ENABLE([libxspf],
90 [--enable-libxspf Use libxspf.],
91 [case "${enableval}" in
92 yes) enable_libxspf=true;;
93 no) enable_libxspf=false;;
94 *) AC_MSG_ERROR([bad value ${enableval} for --enable-libxspf]);;
96 [enable_libxspf=detect])
97 if test "x$enable_libxspf" = "xdetect"; then
98 PKG_CHECK_MODULES([libxspf], xspf, enable_libxspf=true, enable_libxspf=false)
100 if test "x$enable_libxspf" = "xtrue"; then
101 PKG_CHECK_MODULES([libxspf], xspf)
102 AC_SUBST(libxspf_LIBS)
103 AC_SUBST(libxspf_CFLAGS)
105 AC_DEFINE([XSPF], 1, [Use xspf])
108 AC_ARG_ENABLE(libspiff,
109 [ --enable-libspiff Use libspiff to parse spiff playlists.],
110 [ case "${enableval}" in
111 yes) enable_libspiff=yes;;
112 no) enable_libspiff=no;;
113 *) AC_MSG_ERROR([bad value ${enableval} for --enable-libspiff]);;
115 [enable_libspiff=auto])
117 if test "x${enable_libspiff}" != xno; then
118 AC_CHECK_HEADER(spiff/spiff_c.h, AC_CHECK_LIB(spiff, spiff_parse,libspiff=1,libspiff=0),libspiff=0)
119 if test "x${libspiff}" = "x1";
121 AC_DEFINE(SPIFF,1,["Use or don't use libspiff"])
125 if test "x${enable_libspiff}" = "xyes"; then
126 AC_MSG_ERROR([libspiff not found])
132 # Checking for libunique.
133 if test "x$enable_unique" = "xtrue"; then
134 PKG_CHECK_MODULES([unique], unique-1.0)
135 AC_SUBST(unique_LIBS)
136 AC_SUBST(unique_CFLAGS)
138 AC_DEFINE([HAVE_UNIQUE], 1, [Use libunique])
140 AM_CONDITIONAL(HAVE_UNIQUE, test "x$unique" = "xtrue")
141 # Checks for header files.
143 AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
145 # Checks for typedefs, structures, and compiler characteristics.
148 # Checks for libraries.
149 AC_SUBST(GLIB_REQUIRED)
150 AC_SUBST(GTK_REQUIRED)
157 AC_ARG_ENABLE([timing],
158 [--enable-timing Print timing debug output.],
159 [case "${enableval}" in
160 yes) enable_timing=true;;
161 no) enable_timing=false;;
162 *) AC_MSG_ERROR([bad value ${enableval} for --enable-timing]);;
164 [enable_timing=false])
166 if test x${enable_timing} = xtrue; then
167 # Add DEBUG_ENABLE define to config.h
168 AC_DEFINE(DEBUG_TIMING, 1, [Enable timing output])
172 AC_ARG_ENABLE([test],
173 [--enable-test Enable tests],
174 [case "${enableval}" in
175 yes) test_mode=true;;
176 no) test_mode=false;;
177 *) AC_MSG_ERROR([bad value ${enableval} for --enable-test]);;
181 AM_CONDITIONAL([ENABLE_TEST], [test x$test_mode = xtrue])
184 AC_ARG_WITH([extra-version],
185 [--with-extra-version=revision Specify extra version.],
186 with_extra_version=${withval})
187 if test x"${with_extra_version}" != x; then
188 AM_CONDITIONAL([EXTRA_VERSION], [true])
189 EXTRA_VERSION="${with_extra_version}";
190 AC_SUBST(EXTRA_VERSION)
192 AM_CONDITIONAL([EXTRA_VERSION], [false])
197 # Split this out, because pkgconfig macro doesn't return nicely what is missing
200 PKG_CHECK_MODULES([glib], glib-2.0 >= 2.16)
202 AC_SUBST(glib_CFLAGS)
205 PKG_CHECK_MODULES([gobject], gobject-2.0 >= 2.4)
206 AC_SUBST(gobject_LIBS)
207 AC_SUBST(gobject_CFLAGS)
210 PKG_CHECK_MODULES([gtk], gtk+-2.0 >= 2.18)
215 PKG_CHECK_MODULES([gmodule], gmodule-2.0 >= 2.4)
216 AC_SUBST(gmodule_LIBS)
217 AC_SUBST(gmodule_CFLAGS)
220 PKG_CHECK_MODULES([libmpd], libmpd >= 0.20.95)
221 AC_SUBST(libmpd_LIBS)
222 AC_SUBST(libmpd_CFLAGS)
226 PKG_CHECK_MODULES([gthread], gthread-2.0)
227 AC_SUBST(gthread_LIBS)
228 AC_SUBST(gthread_CFLAGS)
231 PKG_CHECK_MODULES([libsoup], libsoup-2.4)
232 AC_SUBST(libsoup_LIBS)
233 AC_SUBST(libsoup_CFLAGS)
236 PKG_CHECK_MODULES([libgio], gio-2.0)
237 AC_SUBST(libgio_LIBS)
238 AC_SUBST(libgio_CFLAGS)
242 PKG_CHECK_MODULES([sqlite3], sqlite3)
243 AC_SUBST(sqlite3_LIBS)
244 AC_SUBST(sqlite3_CFLAGS)
248 PKG_CHECK_MODULES([libxml2], libxml-2.0)
249 AC_SUBST(libxml2_LIBS)
250 AC_SUBST(libxml2_CFLAGS)
254 AC_MSG_CHECKING(prefix)
256 if test "x${prefix}" = "xNONE"; then
257 PACKAGE_PREFIX="${ac_default_prefix}"
259 PACKAGE_PREFIX="${prefix}"
261 AC_MSG_RESULT($PACKAGE_PREFIX)
264 dnl please keep them in alphabetical order
265 ALL_LINGUAS="ar bg bn bs cs da de el et en_CA en_GB es fi fr gl he hi hu hy id it ja jv lv ml ms nb ne nl oc pl pt pt_BR ro ru sq sv th tr zh_CN zh_TW"
270 AC_SUBST(GETTEXT_PACKAGE)
271 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[GMPC gettext package])
273 if test x$gt_cv_have_gettext != "xyes"; then
275 echo "Translations support is required."
279 #AM_GNU_GETTEXT([external])
280 # setting correct paths
281 PACKAGE_LOCALE_DIR="${PACKAGE_PREFIX}/${DATADIRNAME}/locale"
282 AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR,"$PACKAGE_LOCALE_DIR",[The package's locale path for gettext])
285 AC_SUBST(PACKAGE_LOCALE_DIR)
286 AC_SUBST(PACKAGE_LIBS)
288 #Win32 compile support
294 EXTRA_CFLAGS="-Wmissing-prototypes -Wmissing-declarations"
301 *-*-mingw32* | *-*-windows)
303 EXTRA_CFLAGS="$EXTRA_CFLAGS -mno-cygwin -mwindows -mms-bitfields"
304 EXTRA_LDFLAGS="-export-all-symbols -mwindows -mms-bitfields" ;;
307 EXTRA_LDFLAGS="-export-all-symbols -mms-bitfields" ;;
309 EXTRA_LDFLAGS="-framework Carbon"
312 AM_CONDITIONAL(WIN32, test x$win32 = xyes)
313 AM_CONDITIONAL(OSX, test x$macosx = xyes)
315 AM_CONDITIONAL(PLATFORM_WIN32, test x$win32 = xyes)
316 AM_CONDITIONAL(PLATFORM_OSX, test x$macosx = xyes)
319 # These depend on if we are or are not on windows or osX
323 if test x$macosx = xno && test x$win32 = xno ; then
325 AC_ARG_ENABLE([mmkeys],
326 [ --disable-mmkeys Disable multimedia keys support.],
327 [ case "${enableval}" in
328 yes) enable_mmkeys=yes;;
329 no) enable_mmkeys=no;;
330 *) AC_MSG_ERROR([bad value ${enableval} for --disable--mmkeys]);;
333 if test x${enable_mmkeys} = xyes; then
334 AC_DEFINE(ENABLE_MMKEYS, 1, [Enable multimedia support])
338 PKG_CHECK_MODULES([libx11], x11)
339 AC_SUBST(libx11_LIBS)
340 AC_SUBST(libx11_CFLAGS)
346 AC_SUBST(EXTRA_CFLAGS)
347 AC_SUBST(EXTRA_LDFLAGS)
351 # Make the gob2 check fatal
352 if test x${GOB2} = x""; then
356 AM_PROG_VALAC([0.11.0])
358 if test x${VALAC} = x""; then
363 AC_ARG_ENABLE([shave],
364 [ --disable-shave Use shave output cleaner when building.],
365 [ case "${enableval}" in
366 yes) enable_shave=yes;;
367 no) enable_shave=no;;
368 *) AC_MSG_ERROR([bad value ${enableval} for --disable-shave]);;
371 if test x$enable_shave = xyes; then
389 pixmaps/icons/Makefile
390 pixmaps/icons/hicolor/Makefile
391 pixmaps/icons/hicolor/16x16/Makefile
392 pixmaps/icons/hicolor/16x16/actions/Makefile
393 pixmaps/icons/hicolor/16x16/status/Makefile
394 pixmaps/icons/hicolor/16x16/apps/Makefile
395 pixmaps/icons/hicolor/22x22/Makefile
396 pixmaps/icons/hicolor/22x22/actions/Makefile
397 pixmaps/icons/hicolor/22x22/status/Makefile
398 pixmaps/icons/hicolor/22x22/apps/Makefile
399 pixmaps/icons/hicolor/32x32/Makefile
400 pixmaps/icons/hicolor/32x32/actions/Makefile
401 pixmaps/icons/hicolor/32x32/status/Makefile
402 pixmaps/icons/hicolor/32x32/apps/Makefile
403 pixmaps/icons/hicolor/48x48/Makefile
404 pixmaps/icons/hicolor/48x48/actions/Makefile
405 pixmaps/icons/hicolor/48x48/apps/Makefile
406 pixmaps/icons/hicolor/48x48/status/Makefile
407 pixmaps/icons/hicolor/64x64/Makefile
408 pixmaps/icons/hicolor/64x64/apps/Makefile
409 pixmaps/icons/hicolor/64x64/status/Makefile
410 pixmaps/icons/hicolor/72x72/Makefile
411 pixmaps/icons/hicolor/72x72/apps/Makefile
412 pixmaps/icons/hicolor/72x72/status/Makefile
413 pixmaps/icons/hicolor/96x96/Makefile
414 pixmaps/icons/hicolor/96x96/apps/Makefile
415 pixmaps/icons/hicolor/96x96/status/Makefile
416 pixmaps/icons/hicolor/128x128/Makefile
417 pixmaps/icons/hicolor/128x128/apps/Makefile
418 pixmaps/icons/hicolor/128x128/status/Makefile
419 pixmaps/icons/hicolor/128x128/categories/Makefile
420 pixmaps/icons/hicolor/scalable/Makefile
421 pixmaps/icons/hicolor/scalable/actions/Makefile
422 pixmaps/icons/hicolor/scalable/status/Makefile
423 pixmaps/icons/hicolor/scalable/apps/Makefile
424 pixmaps/icons/hicolor/scalable/categories/Makefile
425 pixmaps/icons/Humanity/16x16/Makefile
426 pixmaps/icons/Humanity/16x16/actions/Makefile
427 pixmaps/icons/Humanity/16x16/status/Makefile
428 pixmaps/icons/Humanity/16x16/apps/Makefile
429 pixmaps/icons/Humanity/22x22/Makefile
430 pixmaps/icons/Humanity/22x22/actions/Makefile
431 pixmaps/icons/Humanity/22x22/status/Makefile
432 pixmaps/icons/Humanity/22x22/apps/Makefile
433 pixmaps/icons/Humanity/24x24/Makefile
434 pixmaps/icons/Humanity/24x24/actions/Makefile
435 pixmaps/icons/Humanity/24x24/status/Makefile
436 pixmaps/icons/Humanity/24x24/categories/Makefile
437 pixmaps/icons/Humanity/24x24/apps/Makefile
438 pixmaps/icons/Humanity/32x32/Makefile
439 pixmaps/icons/Humanity/32x32/actions/Makefile
440 pixmaps/icons/Humanity/32x32/status/Makefile
441 pixmaps/icons/Humanity/32x32/apps/Makefile
442 pixmaps/icons/Humanity/48x48/Makefile
443 pixmaps/icons/Humanity/48x48/actions/Makefile
444 pixmaps/icons/Humanity/48x48/apps/Makefile
445 pixmaps/icons/Humanity/48x48/status/Makefile
446 pixmaps/icons/Humanity/64x64/Makefile
447 pixmaps/icons/Humanity/64x64/apps/Makefile
448 pixmaps/icons/Humanity/64x64/status/Makefile
449 pixmaps/icons/Humanity/64x64/actions/Makefile
450 pixmaps/icons/Humanity/72x72/Makefile
451 pixmaps/icons/Humanity/72x72/apps/Makefile
452 pixmaps/icons/Humanity/72x72/status/Makefile
453 pixmaps/icons/Humanity/72x72/actions/Makefile
454 pixmaps/icons/Humanity/96x96/Makefile
455 pixmaps/icons/Humanity/96x96/apps/Makefile
456 pixmaps/icons/Humanity/96x96/status/Makefile
457 pixmaps/icons/Humanity/96x96/actions/Makefile
458 pixmaps/icons/Humanity/128x128/Makefile
459 pixmaps/icons/Humanity/128x128/apps/Makefile
460 pixmaps/icons/Humanity/128x128/status/Makefile
461 pixmaps/icons/Humanity/128x128/categories/Makefile
462 pixmaps/icons/Humanity/128x128/actions/Makefile
463 pixmaps/icons/Humanity/Makefile
464 pixmaps/icons/Humanity/scalable/Makefile
465 pixmaps/icons/Humanity/scalable/actions/Makefile
466 pixmaps/icons/Humanity/scalable/status/Makefile
467 pixmaps/icons/Humanity/scalable/apps/Makefile
468 pixmaps/icons/Humanity/scalable/categories/Makefile
471 test/MpdDataModel/Makefile
472 test/GmpcEasyDownload/Makefile
473 test/MetaDataCache/Makefile
474 test/PixbufCache/Makefile
475 test/AsyncImage/Makefile
477 test/DiscoGS/Makefile
482 echo "------------------ Status ------------------"
483 if test x$enable_timing = xtrue; then
484 echo "Debug timing output is: enabled"
486 echo "Debug timing output is: disabled"
488 if test x${enable_mmkeys} = xyes; then
489 echo "Multimedia keys support is: enabled"
491 echo "Multimedia keys support is: disabled"
493 if test "x$libspiff" = "x1"; then
494 echo "Use libspiff library: enabled"
496 echo "Use libspiff library: disabled"
498 if test "x$libxspf" = "x1"; then
499 echo "Use libxspf library: enabled"
501 echo "Use libxspf library: disabled"
503 if test "x$unique" = "xtrue"; then
504 echo "Use unique library: enabled"
506 echo "Use unique library: disabled"
509 echo "Now type make to build"
510 if test x$enable_shave = xyes; then
511 echo "Building is done with reduced output. (shave";
512 echo "use --disable-shave to get all (old) output back";