1AC_PREREQ(2.59) 2 3m4_define(ario_version,1.6) 4 5AC_INIT([Ario], [ario_version], [marc.pavot@gmail.com], [ario]) 6AM_CONFIG_HEADER(config.h) 7AM_INIT_AUTOMAKE([subdir-objects]) 8m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) 9 10AC_PROG_CC 11AC_PROG_INSTALL 12AC_STDC_HEADERS 13AM_PROG_LIBTOOL 14 15dnl ================================================================ 16dnl i18n 17dnl ================================================================ 18IT_PROG_INTLTOOL(0.35.5) 19GETTEXT_PACKAGE=ario 20AC_SUBST(GETTEXT_PACKAGE) 21AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) 22AM_GLIB_GNU_GETTEXT 23 24dnl ================================================================ 25dnl Dependencies 26dnl ================================================================ 27 28PKG_CHECK_MODULES(DEPS, [gtk+-3.0 29 glib-2.0 >= 2.4 30 gobject-2.0 >= 2.4 31 gmodule-2.0 32 gthread-2.0 33 gio-2.0 34 libxml-2.0 35 libcurl]) 36 37AC_SUBST(DEPS_CFLAGS) 38AC_SUBST(DEPS_LIBS) 39 40AC_SUBST(CFLAGS) 41AC_SUBST(LDFLAGS) 42 43AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) 44 45dnl ================================================================ 46dnl Warnings 47dnl ================================================================ 48WARN_CFLAGS="-Wall \ 49-Wall -Wimplicit -Wunused-label \ 50-Wmissing-declarations -Wmissing-prototypes \ 51-Wnested-externs -Wpointer-arith \ 52-Wcast-align -Wpointer-sign \ 53-Wclobbered -Wempty-body -Wignored-qualifiers \ 54-Wmissing-parameter-type \ 55-Wold-style-declaration -Woverride-init \ 56-Wsign-compare -Wtype-limits -Wuninitialized \ 57-Wold-style-definition" 58 59for option in $WARN_CFLAGS; do 60 SAVE_CFLAGS="$CFLAGS" 61 CFLAGS="$CFLAGS $option" 62 AC_MSG_CHECKING([whether gcc understands $option]) 63 AC_TRY_COMPILE([], [], 64 has_option=yes, 65 has_option=no,) 66 if test x$has_option = xyes; then 67 WARNINGS="$WARNINGS $option" 68 fi 69 AC_MSG_RESULT($has_option) 70 CFLAGS="$SAVE_CFLAGS" 71 unset has_option 72 unset SAVE_CFLAGS 73done 74unset option 75 76dnl ================================================================ 77dnl Debugging information 78dnl ================================================================ 79AC_ARG_ENABLE(debug, 80 AC_HELP_STRING([--enable-debug], 81 [Add runtime debugging information (slower)])) 82if test x"$enable_debug" = xyes; then 83 AC_DEFINE(DEBUG, 1, [Add runtime debugging information (slower)]) 84fi 85 86dnl ================================================================ 87dnl XMMS2 support 88dnl ================================================================ 89AC_ARG_ENABLE(xmms2, 90 AC_HELP_STRING([--enable-xmms2], 91 [Add support of XMMS2 (VERY EXPERIMENTAL)])) 92if test x"$enable_xmms2" = xyes; then 93 AC_DEFINE(ENABLE_XMMS2, 1, [Add support of XMMS2 (VERY EXPERIMENTAL)]) 94 PKG_CHECK_MODULES(XMMS2, 95 xmms2-client 96 xmms2-client-glib) 97 AC_SUBST(XMMS2_CFLAGS) 98 AC_SUBST(XMMS2_LIBS) 99fi 100AM_CONDITIONAL(USE_XMMS2, test x${enable_xmms2} = xyes) 101 102dnl ================================================================ 103dnl libmpdclient2 104dnl ================================================================ 105AC_ARG_ENABLE(libmpdclient2, 106 AC_HELP_STRING([--disable-libmpdclient2], 107 [Disable use libmpdclient2 (embedded version of libmpdclient zill be used)])) 108if test x"$enable_libmpdclient2" != xno; then 109 AC_DEFINE(ENABLE_LIBMPDCLIENT2, 1, [Use libmpdclient2]) 110 PKG_CHECK_MODULES(LIBMPDCLIENT2, [libmpdclient >= 2.0]) 111 AC_SUBST(LIBMPDCLIENT2_CFLAGS) 112 AC_SUBST(LIBMPDCLIENT2_LIBS) 113fi 114AM_CONDITIONAL(USE_LIBMPDCLIENT2, test x${enable_libmpdclient2} != xno) 115 116dnl ================================================================ 117dnl Python plugins 118dnl ================================================================ 119AC_ARG_ENABLE(python, 120 AC_HELP_STRING([--enable-python], 121 [Enable python plugins support])) 122if test x"$enable_python" = xyes; then 123 AC_DEFINE(ENABLE_PYTHON, 1, [Enable python plugins support]) 124fi 125 126if test "x$enable_python" = "xyes"; then 127 AM_PATH_PYTHON([2.3],[],[no]) 128 if test "x$PYTHON" = "x:"; then 129 enable_python=no 130 fi 131fi 132 133if test "x$enable_python" = "xyes"; then 134 PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'` 135 PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'` 136 PYTHON_LIBS="-lpython$PYTHON_VERSION" 137 PYTHON_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config" 138 PYTHON_CFLAGS="-I$PY_PREFIX/include/python$PYTHON_VERSION" 139 PYTHON_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/Makefile" 140 PYTHON_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE` 141 PYTHON_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE` 142 PYTHON_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE` 143 PYTHON_EXTRA_LIBS="$PYTHON_LOCALMODLIBS $PYTHON_BASEMODLIBS $PYTHON_OTHER_LIBS" 144 AC_SUBST([PYTHON_LIBS]) 145 AC_SUBST([PYTHON_LIB_LOC]) 146 AC_SUBST([PYTHON_CFLAGS]) 147 AC_SUBST([PYTHON_EXTRA_LIBS]) 148 149 PKG_CHECK_MODULES([PYGTK], [pygobject-2.0 >= 2.11.5 150 pygtk-2.0 >= 2.8.0]) 151 152 AC_SUBST([PYGTK_CFLAGS]) 153 AC_SUBST([PYGTK_LIBS]) 154 AC_MSG_CHECKING([for pygtk defs]) 155 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` 156 AC_MSG_RESULT([$PYGTK_DEFSDIR]) 157 158 AC_MSG_CHECKING([for pygtk codegen]) 159 PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py" 160 AC_MSG_RESULT([$PYGTK_CODEGEN]) 161 162 AC_MSG_CHECKING([for pygtk h2def]) 163 PYGTK_H2DEF="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/h2def.py" 164 AC_MSG_RESULT([$PYGTK_H2DEF]) 165 166 AC_SUBST([PYGTK_DEFSDIR]) 167 AC_SUBST([PYGTK_CODEGEN]) 168 AC_SUBST([PYGTK_H2DEF]) 169fi 170AM_CONDITIONAL(ENABLE_PYTHON, test x"$enable_python" = xyes) 171 172# Silence warning: ar: 'u' modifier ignored since 'D' is the default 173AC_SUBST(AR_FLAGS, [cr]) 174 175dnl ================================================================ 176dnl Search 177dnl ================================================================ 178AC_ARG_ENABLE(search, 179 AC_HELP_STRING([--disable-search], 180 [Disable support of search view])) 181if test x"$enable_search" != xno; then 182 AC_DEFINE(ENABLE_SEARCH, 1, [Add support of search view]) 183fi 184 185dnl ================================================================ 186dnl MPD idle mode 187dnl ================================================================ 188AC_ARG_ENABLE(mpdidle, 189 AC_HELP_STRING([--disable-mpdidle], 190 [Disable MPD idle mode (MPD idle mode reduces CPU and network usage)])) 191if test x"$enable_mpdidle" != xno; then 192 AC_DEFINE(ENABLE_MPDIDLE, 1, [Use MPD idle mode (reduces CPU and network usage but still experimental)]) 193fi 194AM_CONDITIONAL(MPD_GLIB, test x"$enable_mpdidle" != xno) 195 196dnl ================================================================ 197dnl Stored Playlists 198dnl ================================================================ 199AC_ARG_ENABLE(playlists, 200 AC_HELP_STRING([--disable-playlists], 201 [Disable support of playlists])) 202if test x"$enable_playlists" != xno; then 203 AC_DEFINE(ENABLE_STOREDPLAYLISTS, 1, [Add support of playlists]) 204fi 205 206dnl ================================================================ 207dnl DBUS 208dnl ================================================================ 209AC_ARG_ENABLE(dbus, 210 AC_HELP_STRING([--disable-dbus], 211 [Disable support of dbus])) 212if test x"$enable_dbus" != xno; then 213 PKG_CHECK_MODULES(DBUS, [dbus-glib-1 >= 0.35]) 214 DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE" 215 DBUS_GLIB_BIN="`$PKG_CONFIG --variable=exec_prefix dbus-glib-1`/bin" 216 AC_SUBST(DBUS_GLIB_BIN) 217fi 218AM_CONDITIONAL(USE_DBUS, test x"$enable_dbus" != xno) 219 220dnl ================================================================ 221dnl Avahi 222dnl ================================================================ 223AC_ARG_ENABLE(avahi, 224 AC_HELP_STRING([--disable-avahi], 225 [Disable support of avahi])) 226if test x"$enable_avahi" != xno; then 227 AC_DEFINE(ENABLE_AVAHI, 1, [Add support of avahi]) 228 PKG_CHECK_MODULES(AVAHI, [avahi-client 229 avahi-glib]) 230 AC_SUBST(AVAHI_CFLAGS) 231 AC_SUBST(AVAHI_LIBS) 232fi 233AM_CONDITIONAL(USE_AVAHI, test x"$enable_avahi" != xno) 234 235dnl ================================================================ 236dnl Taglib 237dnl ================================================================ 238AC_ARG_ENABLE(taglib, 239 AC_HELP_STRING([--disable-taglib], 240 [Disable support of Taglib])) 241if test x"$enable_taglib" != xno; then 242 AC_DEFINE(ENABLE_TAGLIB, 1, [Add support of taglib]) 243 PKG_CHECK_MODULES(TAGLIB, [taglib_c]) 244 AC_SUBST(TAGLIB_CFLAGS) 245 AC_SUBST(TAGLIB_LIBS) 246fi 247 248dnl ================================================================ 249dnl Deprecations 250dnl ================================================================ 251AC_ARG_ENABLE(deprecations, 252 AC_HELP_STRING([--enable-deprecations], 253 [Warn about deprecated usages])) 254if test x"$enable_deprecations" = xyes; then 255 WARNINGS="$WARNINGS -DG_DISABLE_DEPRECATED \ 256-DGDK_DISABLE_DEPRECATED \ 257-DGTK_DISABLE_SINGLE_INCLUDES \ 258-DGDK_PIXBUF_DISABLE_DEPRECATED \ 259-DGTK_DISABLE_DEPRECATED \ 260-DGSEAL_ENABLE \ 261-DG_DISABLE_SINGLE_INCLUDES" 262fi 263AC_SUBST(WARNINGS) 264 265PLUGINDIR='${libdir}/ario/plugins' 266AC_SUBST(PLUGINDIR) 267 268PLUGIN_DATA_DIR='${pkgdatadir}/plugins' 269AC_SUBST(PLUGIN_DATA_DIR) 270 271AC_OUTPUT([ 272Makefile 273bindings/Makefile 274bindings/python/Makefile 275src/Makefile 276data/Makefile 277data/icons/Makefile 278data/icons/hicolor/Makefile 279data/icons/hicolor/16x16/Makefile 280data/icons/hicolor/16x16/apps/Makefile 281data/icons/hicolor/22x22/Makefile 282data/icons/hicolor/22x22/apps/Makefile 283data/icons/hicolor/24x24/Makefile 284data/icons/hicolor/24x24/apps/Makefile 285data/icons/hicolor/32x32/Makefile 286data/icons/hicolor/32x32/apps/Makefile 287data/icons/hicolor/48x48/Makefile 288data/icons/hicolor/48x48/apps/Makefile 289data/icons/hicolor/64x64/Makefile 290data/icons/hicolor/64x64/apps/Makefile 291data/icons/hicolor/72x72/Makefile 292data/icons/hicolor/72x72/apps/Makefile 293data/icons/hicolor/96x96/Makefile 294data/icons/hicolor/96x96/apps/Makefile 295data/icons/hicolor/128x128/Makefile 296data/icons/hicolor/128x128/apps/Makefile 297data/icons/hicolor/256x256/Makefile 298data/icons/hicolor/256x256/apps/Makefile 299data/icons/hicolor/scalable/Makefile 300data/icons/hicolor/scalable/apps/Makefile 301plugins/Makefile 302plugins/filesystem/Makefile 303plugins/information/Makefile 304plugins/mmkeys/Makefile 305plugins/radios/Makefile 306po/Makefile.in 307data/ario.desktop.in 308]) 309echo "" 310echo "" 311echo "-------------- Options --------------" 312if test x${enable_debug} = xyes; then 313 echo "Debug information is: ENABLED" 314else 315 echo "Debug information is: DISABLED (--enable-debug)" 316fi 317if test x${enable_xmms2} = xyes; then 318 echo "XMMS2 support (VERY EXPERIMENTAL) is: ENABLED" 319else 320 echo "XMMS2 support (VERY EXPERIMENTAL) is: DISABLED (--enable-xmms2)" 321fi 322if test x${enable_python} = xyes; then 323 echo "Python plugins support (Experimental) is: ENABLED" 324else 325 echo "Python plugins support (Experimental) is: DISABLED (--enable-python)" 326fi 327if test x${enable_search} != xno; then 328 echo "Search view support is: ENABLED (--disable-search)" 329else 330 echo "Search view support is: DISABLED" 331fi 332if test x${enable_avahi} != xno; then 333 echo "Avahi support is: ENABLED (--disable-avahi)" 334else 335 echo "Avahi support is: DISABLED" 336fi 337if test x${enable_dbus} != xno; then 338 echo "DBUS support is: ENABLED (--disable-dbus)" 339else 340 echo "DBUS support is: DISABLED" 341fi 342if test x${enable_playlists} != xno; then 343 echo "Playlists support is: ENABLED (--disable-playlists)" 344else 345 echo "Playlists support is: DISABLED" 346fi 347if test x${enable_mpdidle} != xno; then 348 echo "MPD 'idle' mode support is: ENABLED (--enable-mpdidle)" 349else 350 echo "MPD 'idle' mode support is: DISABLED" 351fi 352if test x${enable_taglib} != xno; then 353 echo "Taglib support is: ENABLED (--disable-taglib)" 354else 355 echo "Taglib support is: DISABLED" 356fi 357if test x${enable_libmpdclient2} != xno; then 358 echo "libmpdclient2 support is: ENABLED (--enable-libmpdclient2)" 359else 360 echo "libmpdclient2 support is: DISABLED" 361fi 362 363