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 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
|
#Define the version
m4_define([package_major_version], [11])
m4_define([package_minor_version], [8])
m4_define([package_micro_version], [16])
m4_define([package_version], [package_major_version.package_minor_version.package_micro_version])
AC_INIT([gmpc], [11.8.16], [qball@sarine.nl])
#Define variable
m4_define([package_tagline], "All hail the Greg")
m4_define([package_website], "http://gmpclient.org")
m4_define([package_copyright], "Copyright 2003-2011 Qball Cow")
m4_define([package_bugtracker], "http://gmpc.wikia.com/wiki/GMPC_HELP")
AM_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
#Make version and variables available in config.h
#AC_DEFINE(GMPC_MAJOR_VERSION, package_major_version, ["Major version of gmpc"])
#AC_DEFINE(GMPC_MINOR_VERSION, package_minor_version, ["Minor version of gmpc"])
#AC_DEFINE(GMPC_MICRO_VERSION, package_micro_version, ["Micro version of gmpc"])
# This makes sure the right substitution is done
[GMPC_MAJOR_VERSION]=package_major_version
[GMPC_MINOR_VERSION]=package_minor_version
[GMPC_MICRO_VERSION]=package_micro_version
AC_SUBST([GMPC_MAJOR_VERSION])
AC_SUBST([GMPC_MINOR_VERSION])
AC_SUBST([GMPC_MICRO_VERSION])
AC_DEFINE(GMPC_TAGLINE, package_tagline, ["Gmpc's tagline"])
AC_DEFINE(GMPC_WEBSITE, package_website, ["Gmpc's website"])
AC_DEFINE(GMPC_BUGTRACKER, package_bugtracker, ["Gmpc's bugtracker"])
AC_DEFINE(GMPC_COPYRIGHT, package_copyright, ["Gmpc's Copyright"])
AC_PREREQ(2.59)
# Remove the check for c++ and fortran compiler
LT_INIT
m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
AC_REPLACE_FUNCS(strndup)
#intltool, libtool. Check for CC compiler
AC_PROG_INTLTOOL([0.21])
# Check for intltool version, needed for make dist.
AM_CONDITIONAL([INTLTOOL_HIGHER_04000], [test ${INTLTOOL_APPLIED_VERSION_AS_INT} -ge 4000])
AC_PROG_CC
AM_PROG_CC_C_O
LT_AC_PROG_RC
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_RC
AC_PROG_LIBTOOL
# test for zlib
zlib=0
AC_CHECK_LIB(z, inflate,zlib=1,zlib=0)
AM_CONDITIONAL(HAVE_ZLIB, test x$zlib = x1)
if test "x$zlib" != "x1"
then
AC_MSG_ERROR([GMPC plugin requires zlib])
fi
PKG_PROG_PKG_CONFIG
unique=0;
AC_ARG_ENABLE([unique],
[--enable-unique Use unique.],
[case "${enableval}" in
yes) enable_unique=true;;
no) enable_unique=false;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-unique]);;
esac],
[enable_unique=true])
# libxspf
libxspf=0;
libspiff=0;
AC_ARG_ENABLE([libxspf],
[--enable-libxspf Use libxspf.],
[case "${enableval}" in
yes) enable_libxspf=true;;
no) enable_libxspf=false;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-libxspf]);;
esac],
[enable_libxspf=detect])
if test "x$enable_libxspf" = "xdetect"; then
PKG_CHECK_MODULES([libxspf], xspf, enable_libxspf=true, enable_libxspf=false)
fi
if test "x$enable_libxspf" = "xtrue"; then
PKG_CHECK_MODULES([libxspf], xspf)
AC_SUBST(libxspf_LIBS)
AC_SUBST(libxspf_CFLAGS)
libxspf=1;
AC_DEFINE([XSPF], 1, [Use xspf])
else
AC_ARG_ENABLE(libspiff,
[ --enable-libspiff Use libspiff to parse spiff playlists.],
[ case "${enableval}" in
yes) enable_libspiff=yes;;
no) enable_libspiff=no;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-libspiff]);;
esac],
[enable_libspiff=auto])
if test "x${enable_libspiff}" != xno; then
AC_CHECK_HEADER(spiff/spiff_c.h, AC_CHECK_LIB(spiff, spiff_parse,libspiff=1,libspiff=0),libspiff=0)
if test "x${libspiff}" = "x1";
then
AC_DEFINE(SPIFF,1,["Use or don't use libspiff"])
SPIFF_LIBS=-lspiff
AC_SUBST(SPIFF_LIBS)
else
if test "x${enable_libspiff}" = "xyes"; then
AC_MSG_ERROR([libspiff not found])
fi
fi
fi
fi
# Checking for libunique.
if test "x$enable_unique" = "xtrue"; then
PKG_CHECK_MODULES([unique], unique-1.0)
AC_SUBST(unique_LIBS)
AC_SUBST(unique_CFLAGS)
unique=true;
AC_DEFINE([HAVE_UNIQUE], 1, [Use libunique])
fi
AM_CONDITIONAL(HAVE_UNIQUE, test "x$unique" = "xtrue")
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# Checks for libraries.
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
##
# User params
##
# Maintainer mode
AC_ARG_ENABLE([timing],
[--enable-timing Print timing debug output.],
[case "${enableval}" in
yes) enable_timing=true;;
no) enable_timing=false;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-timing]);;
esac],
[enable_timing=false])
if test x${enable_timing} = xtrue; then
# Add DEBUG_ENABLE define to config.h
AC_DEFINE(DEBUG_TIMING, 1, [Enable timing output])
fi
# Maintainer mode
AC_ARG_ENABLE([test],
[--enable-test Enable tests],
[case "${enableval}" in
yes) test_mode=true;;
no) test_mode=false;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-test]);;
esac],
[test_mode=false])
AM_CONDITIONAL([ENABLE_TEST], [test x$test_mode = xtrue])
# EXTRA VERSION
AC_ARG_WITH([extra-version],
[--with-extra-version=revision Specify extra version.],
with_extra_version=${withval})
if test x"${with_extra_version}" != x; then
AM_CONDITIONAL([EXTRA_VERSION], [true])
EXTRA_VERSION="${with_extra_version}";
AC_SUBST(EXTRA_VERSION)
else
AM_CONDITIONAL([EXTRA_VERSION], [false])
fi
# Split this out, because pkgconfig macro doesn't return nicely what is missing
# glib
PKG_CHECK_MODULES([glib], glib-2.0 >= 2.16)
AC_SUBST(glib_LIBS)
AC_SUBST(glib_CFLAGS)
# gobject
PKG_CHECK_MODULES([gobject], gobject-2.0 >= 2.4)
AC_SUBST(gobject_LIBS)
AC_SUBST(gobject_CFLAGS)
#gtk
PKG_CHECK_MODULES([gtk], gtk+-2.0 >= 2.18)
AC_SUBST(gtk_LIBS)
AC_SUBST(gtk_CFLAGS)
#gmodule
PKG_CHECK_MODULES([gmodule], gmodule-2.0 >= 2.4)
AC_SUBST(gmodule_LIBS)
AC_SUBST(gmodule_CFLAGS)
# libmpd
PKG_CHECK_MODULES([libmpd], libmpd >= 0.20.0)
AC_SUBST(libmpd_LIBS)
AC_SUBST(libmpd_CFLAGS)
# gthread
PKG_CHECK_MODULES([gthread], gthread-2.0)
AC_SUBST(gthread_LIBS)
AC_SUBST(gthread_CFLAGS)
#libsoup
PKG_CHECK_MODULES([libsoup], [libsoup-3.0])
AC_SUBST(libsoup_LIBS)
AC_SUBST(libsoup_CFLAGS)
#libgio
PKG_CHECK_MODULES([libgio], gio-2.0)
AC_SUBST(libgio_LIBS)
AC_SUBST(libgio_CFLAGS)
#sqlite3
PKG_CHECK_MODULES([sqlite3], sqlite3)
AC_SUBST(sqlite3_LIBS)
AC_SUBST(sqlite3_CFLAGS)
#libxml2
PKG_CHECK_MODULES([libxml2], libxml-2.0)
AC_SUBST(libxml2_LIBS)
AC_SUBST(libxml2_CFLAGS)
# installation paths
AC_MSG_CHECKING(prefix)
if test "x${prefix}" = "xNONE"; then
PACKAGE_PREFIX="${ac_default_prefix}"
else
PACKAGE_PREFIX="${prefix}"
fi
AC_MSG_RESULT($PACKAGE_PREFIX)
# i18n support
dnl please keep them in alphabetical order
ALL_LINGUAS="ar bg bn bs ca 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"
AM_GLIB_GNU_GETTEXT
GETTEXT_PACKAGE=gmpc
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[GMPC gettext package])
if test x$gt_cv_have_gettext != "xyes"; then
echo "Translations support is required."
exit 1;
fi
#AM_GNU_GETTEXT([external])
# setting correct paths
PACKAGE_LOCALE_DIR="${PACKAGE_PREFIX}/${DATADIRNAME}/locale"
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR,"$PACKAGE_LOCALE_DIR",[The package's locale path for gettext])
AC_SUBST(PACKAGE_LOCALE_DIR)
AC_SUBST(PACKAGE_LIBS)
#Win32 compile support
EXTRA_CFLAGS=
EXTRA_LDFLAGS=
case "$CC" in
*gcc*)
EXTRA_CFLAGS="-Wmissing-prototypes -Wmissing-declarations"
;;
esac
win32=no
macosx=no
case $host in
*-*-mingw32* | *-*-windows)
win32=yes
EXTRA_CFLAGS="$EXTRA_CFLAGS -mno-cygwin -mwindows -mms-bitfields"
EXTRA_LDFLAGS="-export-all-symbols -mwindows -mms-bitfields" ;;
*-*-cygwin*)
win32=yes
EXTRA_LDFLAGS="-export-all-symbols -mms-bitfields" ;;
*-apple-darwin*)
EXTRA_LDFLAGS="-framework Carbon"
macosx=yes;;
esac
AM_CONDITIONAL(WIN32, test x$win32 = xyes)
AM_CONDITIONAL(OSX, test x$macosx = xyes)
# for smclient
AM_CONDITIONAL(PLATFORM_WIN32, test x$win32 = xyes)
AM_CONDITIONAL(PLATFORM_OSX, test x$macosx = xyes)
##
# These depend on if we are or are not on windows or osX
##
# Session support
if test x$macosx = xno && test x$win32 = xno ; then
# Multimedia keys
AC_ARG_ENABLE([mmkeys],
[ --disable-mmkeys Disable multimedia keys support.],
[ case "${enableval}" in
yes) enable_mmkeys=yes;;
no) enable_mmkeys=no;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable--mmkeys]);;
esac],
[enable_mmkeys=yes])
if test x${enable_mmkeys} = xyes; then
AC_DEFINE(ENABLE_MMKEYS, 1, [Enable multimedia support])
fi
#libx11
PKG_CHECK_MODULES([libx11], x11)
AC_SUBST(libx11_LIBS)
AC_SUBST(libx11_CFLAGS)
else
# force them off
enable_mmkeys=no;
fi
AC_SUBST(EXTRA_CFLAGS)
AC_SUBST(EXTRA_LDFLAGS)
# Check for gob2
GOB2_CHECK(2.0.0)
# Make the gob2 check fatal
if test x${GOB2} = x""; then
exit 1;
fi
AM_PROG_VALAC([0.11.0])
if test x${VALAC} = x""; then
exit 1;
fi
APPINDICATOR_REQUIRED=0.3
AC_ARG_ENABLE(appindicator,
AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators ]),
[enable_appindicator=$enableval],
[enable_appindicator="auto"])
if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],
enable_appindicator="yes",
enable_appindicator="no")
fi
if test x$enable_appindicator = xyes ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],,
AC_MSG_ERROR([appindicator-0.1 is not installed]))
PKG_CHECK_MODULES(APP_INDICATOR,
appindicator-0.1 >= $APPINDICATOR_REQUIRED)
AC_SUBST(APP_INDICATOR_CFLAGS)
AC_SUBST(APP_INDICATOR_LIBS)
AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])
fi
AM_CONDITIONAL(HAVE_APP_INDICATOR, test x"$enable_appindicator" = xyes)
AC_ARG_ENABLE([shave],
[ --disable-shave Use shave output cleaner when building.],
[ case "${enableval}" in
yes) enable_shave=yes;;
no) enable_shave=no;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-shave]);;
esac],
[enable_shave=no])
if test x$enable_shave = xyes; then
SHAVE_INIT([./])
fi
AC_ARG_WITH([help],
[AS_HELP_STRING],
[have_yelp="$withval"],
[have_yelp=yes])
AS_IF([test "x$have_yelp" != xno],
[YELP_HELP_INIT])
AM_CONDITIONAL([HAVE_YELP], [test x"$have_yelp" = xyes])
AC_OUTPUT([
shave
shave-libtool
Makefile
src/Makefile
src/gmpc-version.h
glade/Makefile
data/Makefile
po/Makefile.in
po/Makefile
data/gmpc.pc
remote/Makefile
doc/Makefile
doc/Mallard/Makefile
pixmaps/Makefile
pixmaps/icons/Makefile
pixmaps/icons/hicolor/Makefile
pixmaps/icons/hicolor/16x16/Makefile
pixmaps/icons/hicolor/16x16/actions/Makefile
pixmaps/icons/hicolor/16x16/status/Makefile
pixmaps/icons/hicolor/16x16/apps/Makefile
pixmaps/icons/hicolor/22x22/Makefile
pixmaps/icons/hicolor/22x22/actions/Makefile
pixmaps/icons/hicolor/22x22/status/Makefile
pixmaps/icons/hicolor/22x22/apps/Makefile
pixmaps/icons/hicolor/32x32/Makefile
pixmaps/icons/hicolor/32x32/actions/Makefile
pixmaps/icons/hicolor/32x32/status/Makefile
pixmaps/icons/hicolor/32x32/apps/Makefile
pixmaps/icons/hicolor/48x48/Makefile
pixmaps/icons/hicolor/48x48/actions/Makefile
pixmaps/icons/hicolor/48x48/apps/Makefile
pixmaps/icons/hicolor/48x48/status/Makefile
pixmaps/icons/hicolor/64x64/Makefile
pixmaps/icons/hicolor/64x64/apps/Makefile
pixmaps/icons/hicolor/64x64/status/Makefile
pixmaps/icons/hicolor/72x72/Makefile
pixmaps/icons/hicolor/72x72/apps/Makefile
pixmaps/icons/hicolor/72x72/status/Makefile
pixmaps/icons/hicolor/96x96/Makefile
pixmaps/icons/hicolor/96x96/apps/Makefile
pixmaps/icons/hicolor/96x96/status/Makefile
pixmaps/icons/hicolor/128x128/Makefile
pixmaps/icons/hicolor/128x128/apps/Makefile
pixmaps/icons/hicolor/128x128/status/Makefile
pixmaps/icons/hicolor/128x128/categories/Makefile
pixmaps/icons/hicolor/scalable/Makefile
pixmaps/icons/hicolor/scalable/actions/Makefile
pixmaps/icons/hicolor/scalable/status/Makefile
pixmaps/icons/hicolor/scalable/apps/Makefile
pixmaps/icons/hicolor/scalable/categories/Makefile
pixmaps/icons/Humanity/16x16/Makefile
pixmaps/icons/Humanity/16x16/actions/Makefile
pixmaps/icons/Humanity/16x16/status/Makefile
pixmaps/icons/Humanity/16x16/apps/Makefile
pixmaps/icons/Humanity/22x22/Makefile
pixmaps/icons/Humanity/22x22/actions/Makefile
pixmaps/icons/Humanity/22x22/status/Makefile
pixmaps/icons/Humanity/22x22/apps/Makefile
pixmaps/icons/Humanity/24x24/Makefile
pixmaps/icons/Humanity/24x24/actions/Makefile
pixmaps/icons/Humanity/24x24/status/Makefile
pixmaps/icons/Humanity/24x24/categories/Makefile
pixmaps/icons/Humanity/24x24/apps/Makefile
pixmaps/icons/Humanity/32x32/Makefile
pixmaps/icons/Humanity/32x32/actions/Makefile
pixmaps/icons/Humanity/32x32/status/Makefile
pixmaps/icons/Humanity/32x32/apps/Makefile
pixmaps/icons/Humanity/48x48/Makefile
pixmaps/icons/Humanity/48x48/actions/Makefile
pixmaps/icons/Humanity/48x48/apps/Makefile
pixmaps/icons/Humanity/48x48/status/Makefile
pixmaps/icons/Humanity/64x64/Makefile
pixmaps/icons/Humanity/64x64/apps/Makefile
pixmaps/icons/Humanity/64x64/status/Makefile
pixmaps/icons/Humanity/64x64/actions/Makefile
pixmaps/icons/Humanity/72x72/Makefile
pixmaps/icons/Humanity/72x72/apps/Makefile
pixmaps/icons/Humanity/72x72/status/Makefile
pixmaps/icons/Humanity/72x72/actions/Makefile
pixmaps/icons/Humanity/96x96/Makefile
pixmaps/icons/Humanity/96x96/apps/Makefile
pixmaps/icons/Humanity/96x96/status/Makefile
pixmaps/icons/Humanity/96x96/actions/Makefile
pixmaps/icons/Humanity/128x128/Makefile
pixmaps/icons/Humanity/128x128/apps/Makefile
pixmaps/icons/Humanity/128x128/status/Makefile
pixmaps/icons/Humanity/128x128/categories/Makefile
pixmaps/icons/Humanity/128x128/actions/Makefile
pixmaps/icons/Humanity/Makefile
pixmaps/icons/Humanity/scalable/Makefile
pixmaps/icons/Humanity/scalable/actions/Makefile
pixmaps/icons/Humanity/scalable/status/Makefile
pixmaps/icons/Humanity/scalable/apps/Makefile
pixmaps/icons/Humanity/scalable/categories/Makefile
test/Makefile
test/config/Makefile
test/MpdDataModel/Makefile
test/GmpcEasyDownload/Makefile
test/MetaDataCache/Makefile
test/PixbufCache/Makefile
test/AsyncImage/Makefile
test/Misc/Makefile
test/DiscoGS/Makefile
test/LastFM/Makefile
])
echo ""
echo ""
echo "------------------ Status ------------------"
if test x$enable_timing = xtrue; then
echo "Debug timing output is: enabled"
else
echo "Debug timing output is: disabled"
fi
if test x${enable_mmkeys} = xyes; then
echo "Multimedia keys support is: enabled"
else
echo "Multimedia keys support is: disabled"
fi
if test x"$enable_appindicator" = xyes; then
echo "AppIndicator Support is: enabled"
else
echo "AppIndicator Support is: disabled"
fi
if test "x$libspiff" = "x1"; then
echo "Use libspiff library: enabled"
else
echo "Use libspiff library: disabled"
fi
if test "x$libxspf" = "x1"; then
echo "Use libxspf library: enabled"
else
echo "Use libxspf library: disabled"
fi
if test "x$unique" = "xtrue"; then
echo "Use unique library: enabled"
else
echo "Use unique library: disabled"
fi
if test "x$have_yelp" = "xyes"; then
echo "Use Gnome Documentation: enabled"
else
echo "Use Gnome Documentation: disabled"
fi
echo "";
echo "Now type make to build"
if test x$enable_shave = xyes; then
echo "Building is done with reduced output. (shave";
echo "use --disable-shave to get all (old) output back";
fi
|