configure.ac 22.6 KB
Newer Older
1 2 3
dnl ***
dnl *** Process this file with autoconf to produce a configure script.
dnl ***
4

5 6
dnl Initialize
dnl ==========
7
AC_PREREQ([2.59])
8
AC_INIT([audacious-plugins], [3.10.1])
Alf Gaida's avatar
Alf Gaida committed
9
AC_COPYRIGHT([Copyright (C) 2001-2018 Audacious developers and others])
10

11 12
AC_DEFINE_UNQUOTED([PACKAGE], "$PACKAGE_NAME", [Name of package])
AC_DEFINE_UNQUOTED([VERSION], "$PACKAGE_VERSION", [Version number of package])
13

14
AC_CONFIG_AUX_DIR([build-aux])
15
AC_CONFIG_HEADERS([config.h])
16
AC_CONFIG_MACRO_DIR([m4])
17

18
AUD_COMMON_PROGS
19

Alf Gaida's avatar
Alf Gaida committed
20
BUILDSYS_INIT
21
BUILDSYS_SHARED_LIB
22

23 24
dnl gettext
dnl =======
25
AM_GNU_GETTEXT([external])
26 27 28
if test "$MSGFMT" = ":" ; then
    AC_MSG_ERROR([msgfmt was not found; have you installed gettext?])
fi
29

30 31
LIBS="$LIBS $LIBINTL"

32 33
dnl Check for Audacious
dnl ===================
34

Alf Gaida's avatar
Alf Gaida committed
35
PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 3.10],
36
    [],
Alf Gaida's avatar
Alf Gaida committed
37
    [AC_MSG_ERROR([Cannot find Audacious 3.10; have you installed Audacious yet?])]
38 39
)

40 41
CPPFLAGS="$CPPFLAGS $AUDACIOUS_CFLAGS"
LIBS="$LIBS $AUDACIOUS_LIBS"
42

43 44 45
dnl Check for libxml2 (required to load XSPF playlists from previous versions)
dnl ==========================================================================

46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
if test $HAVE_DARWIN = yes ; then
    AC_ARG_WITH([system-libxml2],
     [AS_HELP_STRING([--with-system-libxml2=yes,no], [Use system version of libxml2 (default=yes)])],
     [with_system_libxml2=$withval],
     [with_system_libxml2=yes])

    if test $with_system_libxml2 = yes ; then
        XML_LIBS="-lxml2"
        XML_CFLAGS="-I/usr/include/libxml2"
        AC_SUBST(XML_LIBS)
        AC_SUBST(XML_CFLAGS)
    else
        PKG_CHECK_MODULES([XML], [libxml-2.0])
    fi
else
    PKG_CHECK_MODULES([XML], [libxml-2.0])
fi
63

64 65
dnl Default Set of Plugins
dnl ======================
66

Alf Gaida's avatar
Alf Gaida committed
67
INPUT_PLUGINS="metronom psf tonegen vtx xsf"
68
OUTPUT_PLUGINS=""
69 70 71
EFFECT_PLUGINS="compressor crossfade crystalizer mixer silence-removal stereo_plugin voice_removal echo_plugin"
GENERAL_PLUGINS=""
VISUALIZATION_PLUGINS=""
72 73
CONTAINER_PLUGINS="asx asx3 audpl m3u pls xspf"
TRANSPORT_PLUGINS="gio"
74

75
if test "x$USE_GTK" = "xyes" ; then
76
    EFFECT_PLUGINS="$EFFECT_PLUGINS ladspa"
77
    GENERAL_PLUGINS="$GENERAL_PLUGINS alarm albumart lyricwiki playlist-manager search-tool statusicon"
78
    GENERAL_PLUGINS="$GENERAL_PLUGINS gtkui skins"
79
    VISUALIZATION_PLUGINS="$VISUALIZATION_PLUGINS blur_scope cairo-spectrum"
80 81 82
fi

if test "x$USE_QT" = "xyes" ; then
83 84 85 86
    GENERAL_PLUGINS="$GENERAL_PLUGINS albumart-qt lyricwiki-qt playlist-manager-qt search-tool-qt song-info-qt statusicon-qt"
    GENERAL_PLUGINS="$GENERAL_PLUGINS qtui skins-qt"
fi

87
USE_GTK_OR_QT=no
88
if test "x$USE_GTK" = "xyes" -o "x$USE_QT" = "xyes" ; then
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
    USE_GTK_OR_QT=yes
    GENERAL_PLUGINS="$GENERAL_PLUGINS delete-files skins-data"
fi

if test $HAVE_MSWINDOWS = yes ; then
    OUTPUT_PLUGINS="$OUTPUT_PLUGINS waveout"
fi

check_allowed () {
    case $1 in
        glspectrum|hotkey|aosd)
            plugin_allowed=$USE_GTK
            if test $plugin_allowed = no -a $2 = yes ; then
                AC_MSG_ERROR([--enable-$1 cannot be used without --enable-gtk])
            fi
            ;;
        ampache|qtaudio|qtglspectrum)
            plugin_allowed=$USE_QT
            if test $plugin_allowed = no -a $2 = yes ; then
                AC_MSG_ERROR([--enable-$1 cannot be used without --enable-qt])
            fi
Alf Gaida's avatar
Alf Gaida committed
110 111 112 113 114 115
            if test $plugin_allowed = yes -a $1 = ampache ; then
                plugin_allowed=$have_neon
                if test $plugin_allowed = no -a $2 = yes ; then
                    AC_MSG_ERROR([--enable-$1 cannot be used without --enable-neon])
                fi
            fi
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
            ;;
        *)
            plugin_allowed=yes
            ;;
    esac
}

dnl Enable/disable plugin with pkg-config dependency
dnl ================================================
dnl $1 = short name of plugin (e.g. pulse)
dnl $2 = long name of plugin (e.g. PulseAudio output plugin)
dnl $3 = enabled by default (auto/yes/no)
dnl $4 = type of plugin (e.g. OUTPUT)
dnl $5 = CFLAGS/LIBS prefix (e.g. PULSE)
dnl $6 = dependency (e.g. libpulse >= 0.9.5)

AC_DEFUN([ENABLE_PLUGIN_WITH_DEP], [
    AC_ARG_ENABLE($1,
        [AS_HELP_STRING([--enable-$1], [enable $2 (default=$3)])],
        [enable_$1=$enableval],
        [enable_$1=$3])

    have_$1=no
    check_allowed $1 $enable_$1
    if test $enable_$1 != no -a $plugin_allowed = yes ; then
        PKG_CHECK_MODULES($5, $6, [
            have_$1=yes
            $4_PLUGINS="$$4_PLUGINS $1"
        ], [
            if test $enable_$1 = yes ; then
                AC_MSG_ERROR([Missing dependency for $2: $6])
            else
                AC_MSG_WARN([$2 disabled due to missing dependency: $6])
            fi
        ])
    fi
])
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
dnl Enable/disable plugin, first calling test_<name>
dnl ================================================
dnl $1 = short name of plugin (e.g. pulse)
dnl $2 = long name of plugin (e.g. PulseAudio output plugin)
dnl $3 = enabled by default (auto/yes/no)
dnl $4 = type of plugin (e.g. OUTPUT)

AC_DEFUN([ENABLE_PLUGIN_WITH_TEST], [
    AC_ARG_ENABLE($1,
        [AS_HELP_STRING([--enable-$1], [enable $2 (default=$3)])],
        [enable_$1=$enableval],
        [enable_$1=$3])

    have_$1=no
    check_allowed $1 $enable_$1
    if test $enable_$1 != no -a $plugin_allowed = yes ; then
        test_$1
        if test $have_$1 = yes ; then
            $4_PLUGINS="$$4_PLUGINS $1"
        elif test $enable_$1 = yes ; then
            AC_MSG_ERROR([Missing dependency for $2])
        else
            AC_MSG_WARN([$2 disabled due to missing dependency])
        fi
    fi
])
180

181 182 183
dnl Optional Plugins
dnl ================

Alf Gaida's avatar
Alf Gaida committed
184 185 186 187 188 189 190
ENABLE_PLUGIN_WITH_DEP(adplug,
    AdLib support,
    auto,
    INPUT,
    ADLIB,
    adplug)

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
ENABLE_PLUGIN_WITH_DEP(cdaudio,
    audio CD support,
    auto,
    INPUT,
    CDIO,
    libcdio >= 0.70 libcdio_cdda >= 0.70 libcddb >= 1.2.1)

if test $have_cdaudio = yes ; then
    GENERAL_PLUGINS="$GENERAL_PLUGINS cd-menu-items"
fi

ENABLE_PLUGIN_WITH_DEP(flac,
    FLAC support,
    yes,
    INPUT,
    LIBFLAC,
    flac >= 1.2.1)

ENABLE_PLUGIN_WITH_DEP(vorbis,
    Ogg Vorbis support,
    yes,
    INPUT,
    VORBIS,
    ogg >= 1.0 vorbis >= 1.0 vorbisenc >= 1.0 vorbisfile >= 1.0)

ENABLE_PLUGIN_WITH_DEP(amidiplug,
    MIDI synthesizer,
    auto,
    INPUT,
    FLUIDSYNTH,
    fluidsynth >= 1.0.6)

ENABLE_PLUGIN_WITH_DEP(mpg123,
    MP3 support,
    yes,
    INPUT,
    MPG123,
    libmpg123 >= 1.12)

test_aac () {
    AC_CHECK_HEADER(neaacdec.h, have_aac=yes, have_aac=no)
    AC_CHECK_LIB(faad, NeAACDecInit2, true, have_aac=no)
}

ENABLE_PLUGIN_WITH_TEST(aac,
    AAC support,
    auto,
    INPUT)

ENABLE_PLUGIN_WITH_DEP(wavpack,
    WavPack support,
    yes,
    INPUT,
    WAVPACK,
    wavpack >= 4.31)

ENABLE_PLUGIN_WITH_DEP(sndfile,
    libsndfile decoder,
    auto,
    INPUT,
    SNDFILE,
    sndfile >= 0.19)

ENABLE_PLUGIN_WITH_DEP(modplug,
    ModPlug,
    auto,
    INPUT,
    MODPLUG,
    libmodplug)

ENABLE_PLUGIN_WITH_DEP(sid,
    Commodore 64 audio,
    auto,
    INPUT,
    SIDPLAYFP,
    libsidplayfp >= 1.0)

test_console () {
    AC_CHECK_HEADERS(zlib.h, have_console=yes, have_console=no)
}

ENABLE_PLUGIN_WITH_TEST(console,
    Game Music Emu,
    auto,
    INPUT)

ENABLE_PLUGIN_WITH_DEP(bs2b,
    BS2B effect,
    auto,
    EFFECT,
    BS2B,
    libbs2b >= 3.0.0)

ENABLE_PLUGIN_WITH_DEP(resample,
    sample rate converter,
    auto,
    EFFECT,
    SAMPLERATE,
    samplerate)

ENABLE_PLUGIN_WITH_DEP(speedpitch,
    speed/pitch effect,
    auto,
    EFFECT,
    SAMPLERATE,
    samplerate)

ENABLE_PLUGIN_WITH_DEP(soxr,
    SoX resampler,
    auto,
    EFFECT,
    SOXR,
    soxr)

ENABLE_PLUGIN_WITH_DEP(alsa,
    ALSA output,
    auto,
    OUTPUT,
    ALSA,
    alsa >= 1.0.16)

test_jack () {
    PKG_CHECK_MODULES(JACK, jack >= 1.9.7, have_jack=yes, [
        PKG_CHECK_MODULES(JACK, jack >= 0.120.1 jack < 1.0, have_jack=yes, have_jack=no)
    ])
}

ENABLE_PLUGIN_WITH_TEST(jack,
    JACK output,
    auto,
    OUTPUT)

test_oss4 () {
    OSS_CFLAGS=
    if test -f "/etc/oss.conf"; then
        . "/etc/oss.conf"
        OSS_CFLAGS="-I$OSSLIBDIR/include"
    fi
    AC_SUBST(OSS_CFLAGS)
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
    OLD_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS $OSS_CFLAGS"
    have_oss4=no
    AC_CHECK_HEADERS(sys/soundcard.h soundcard.h, [
        have_oss4=yes
        break
    ])
    CPPFLAGS="$OLD_CPPFLAGS"
}

ENABLE_PLUGIN_WITH_TEST(oss4,
    OSS output,
    auto,
    OUTPUT)

ENABLE_PLUGIN_WITH_DEP(pulse,
    PulseAudio output,
    auto,
    OUTPUT,
    PULSE,
    libpulse >= 0.9.5)

test_sndio () {
    AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
}

ENABLE_PLUGIN_WITH_TEST(sndio,
    Sndio output,
    auto,
    OUTPUT)

test_cue () {
    PKG_CHECK_MODULES(CUE, libcue >= 2.0, [
        AC_DEFINE(HAVE_LIBCUE2, 1, [Define if libcue version is >= 2.0])
        have_cue=yes
    ], [
        PKG_CHECK_MODULES(CUE, libcue, have_cue=yes, have_cue=no)
    ])
}

ENABLE_PLUGIN_WITH_TEST(cue,
    cue sheet support,
    auto,
    CONTAINER)

ENABLE_PLUGIN_WITH_DEP(neon,
    HTTP/HTTPS transport,
    yes,
    TRANSPORT,
    NEON,
    neon >= 0.27)

ENABLE_PLUGIN_WITH_DEP(mms,
    MMS transport,
    auto,
    TRANSPORT,
    MMS,
    libmms >= 0.3)

ENABLE_PLUGIN_WITH_DEP(notify,
    libnotify OSD,
    auto,
    GENERAL,
    NOTIFY,
    libnotify >= 0.7 gdk-pixbuf-2.0 >= 2.26)

test_lirc () {
    AC_CHECK_HEADERS(lirc/lirc_client.h, have_lirc=yes, have_lirc=no)
}

ENABLE_PLUGIN_WITH_TEST(lirc,
    LIRC support,
    auto,
    GENERAL)

test_mpris2 () {
    unset have_mpris2
    AC_CHECK_PROG(have_mpris2, gdbus-codegen, yes, no)
}

ENABLE_PLUGIN_WITH_TEST(mpris2,
    MPRIS 2 server,
    auto,
    GENERAL)

test_songchange () {
    AC_CHECK_HEADERS(sys/wait.h, have_songchange=yes, have_songchange=no)
}
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
ENABLE_PLUGIN_WITH_TEST(songchange,
    song change plugin,
    auto,
    GENERAL)

dnl Optional plugins (GTK-only)
dnl ===========================

ENABLE_PLUGIN_WITH_DEP(scrobbler2,
    Scrobbler 2,
    auto,
    GENERAL,
    CURL,
    libcurl >= 7.9.7)

test_glspectrum () {
    if test $HAVE_MSWINDOWS = yes ; then
        have_glspectrum=yes
        GL_LIBS="-lopengl32"
    else
        AC_CHECK_LIB(GL, glXCreateContext, [
            have_glspectrum=yes
            GL_LIBS="-lGL -lX11"
        ], [have_glspectrum=no])
444
    fi
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
    AC_SUBST(GL_LIBS)
}

ENABLE_PLUGIN_WITH_TEST(glspectrum,
    OpenGL spectrum analyzer,
    auto,
    VISUALIZATION)

ENABLE_PLUGIN_WITH_DEP(hotkey,
    global hotkeys (X11),
    auto,
    GENERAL,
    GDKX11,
    gdk-x11-2.0)

ENABLE_PLUGIN_WITH_DEP(aosd,
    X11 OSD,
    auto,
    GENERAL,
    X11EXT,
    xrender xcomposite)

dnl Optional plugins (Qt-only)
dnl ==========================

ENABLE_PLUGIN_WITH_DEP(ampache,
    Ampache browser,
    auto,
    GENERAL,
    AMPACHE,
Simon Quigley's avatar
Simon Quigley committed
475
    ampache_browser_1)
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

ENABLE_PLUGIN_WITH_DEP(qtaudio,
    QtMultimedia output,
    auto,
    OUTPUT,
    QTMULTIMEDIA,
    Qt5Multimedia)

test_qtglspectrum () {
    PKG_CHECK_MODULES(QTOPENGL, Qt5OpenGL, [
        QTOPENGL_CFLAGS="$QTOPENGL_CFLAGS -fPIC"
        if test $have_glspectrum = yes ; then
            have_qtglspectrum=yes
        elif test $HAVE_MSWINDOWS = yes ; then
            have_qtglspectrum=yes
            GL_LIBS="-lopengl32"
        else
            AC_CHECK_LIB(GL, glBegin, [
                have_qtglspectrum=yes
                GL_LIBS="-lGL"
            ], [have_qtglspectrum=no])
        fi
        AC_SUBST(GL_LIBS)
    ], [have_qtglspectrum=no])
}

ENABLE_PLUGIN_WITH_TEST(qtglspectrum,
    Qt OpenGL spectrum analyzer,
    auto,
    VISUALIZATION)
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524

dnl CoreAudio
dnl =========

AC_ARG_ENABLE(coreaudio,
    [AS_HELP_STRING([--disable-coreaudio], [disable CoreAudio output plugin (default=enabled)])],
    [enable_coreaudio=$enableval],
    [enable_coreaudio=auto]
)

have_coreaudio=no
if test "x$enable_coreaudio" != "xno"; then
    if test "x$HAVE_DARWIN" != "xno"; then
        have_coreaudio=yes
        OUTPUT_PLUGINS="$OUTPUT_PLUGINS coreaudio"
    fi
else
    AC_MSG_RESULT([*** CoreAudio output plugin disabled per user request ***])
fi
525

526 527
dnl *** FFaudio

528 529
AC_ARG_WITH([ffmpeg],
 AS_HELP_STRING([--with-ffmpeg=ffmpeg,libav,none], [choose between FFmpeg, libav, or neither (default=ffmpeg)]),
530
 [ffmpeg_variant=$withval], [ffmpeg_variant=ffmpeg])
531 532

if test $ffmpeg_variant = ffmpeg ; then
533
    PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 53.40.0 libavformat >= 53.25.0 libavutil >= 51.27.0],
534 535
     [INPUT_PLUGINS="$INPUT_PLUGINS ffaudio"
      AC_DEFINE([HAVE_FFMPEG], [1], [Define if using FFmpeg])],
536
     [AC_MSG_ERROR([FFmpeg is not installed or too old (required: libavcodec 53.40.0, libavformat 53.25.0, libavutil 51.27.0).  Use --with-ffmpeg=none to disable the ffaudio plugin or --with-ffmpeg=libav to use libav instead.])])
537
elif test $ffmpeg_variant = libav ; then
538
    PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 53.25.0 libavformat >= 53.17.0 libavutil >= 51.18.0],
539 540
     [INPUT_PLUGINS="$INPUT_PLUGINS ffaudio"
      AC_DEFINE([HAVE_LIBAV], [1], [Define if using libav])],
541
     [AC_MSG_ERROR([libav is not installed or too old (required: libavcodec 53.25.0, libavformat 53.17.0, libavutil 51.18.0).])])
542 543
fi

544 545 546
dnl SDL Output
dnl ==========

547 548 549
AC_ARG_WITH(libsdl,
 AS_HELP_STRING([--with-libsdl=1,2], [select which SDL version to use (default=auto)]),
 [with_libsdl=$withval], [with_libsdl=auto])
550

551 552 553
test_sdlout () {
    if test "x$with_libsdl" = "x1"; then
        PKG_CHECK_MODULES(SDL, sdl >= 1.2.11, have_sdlout=yes, have_sdlout=no)
554
    elif test "x$with_libsdl" = "x2"; then
555 556 557 558 559
        PKG_CHECK_MODULES(SDL, sdl2 >= 2.0, have_sdlout=yes, have_sdlout=no)
    else
        PKG_CHECK_MODULES(SDL, sdl2 >= 2.0, have_sdlout=yes, [
            PKG_CHECK_MODULES(SDL, sdl >= 1.2.11, have_sdlout=yes, have_sdlout=no)
        ])
560
    fi
561
}
562

563 564 565 566
ENABLE_PLUGIN_WITH_TEST(sdlout,
    SDL Output,
    auto,
    OUTPUT)
567

568 569 570 571 572 573 574
dnl Check for at least one output plugin (not including filewriter)
dnl ===============================================================

if test "x$OUTPUT_PLUGINS" = "x" ; then
    AC_MSG_ERROR([No output plugin was enabled.  Please install the necessary packages for your system and run configure again.])
fi

575 576
dnl FileWriter
dnl ==========
577 578

AC_ARG_ENABLE(filewriter,
579
    [AS_HELP_STRING([--disable-filewriter], [disable FileWriter output plugin (default=enabled)])],
580
    [enable_filewriter=$enableval],
581
    [enable_filewriter=yes]
582 583
)

584 585
if test "x$enable_filewriter" != "xno"; then
    OUTPUT_PLUGINS="$OUTPUT_PLUGINS filewriter"
586 587 588
fi

AC_ARG_ENABLE(filewriter_mp3,
589 590
    [AS_HELP_STRING([--disable-filewriter_mp3], [disable FileWriter MP3 output part (default=enabled)])],
    [enable_filewriter_mp3=$enableval], [enable_filewriter_mp3=auto]
591 592
)

593
have_lame=no
594
if test "x$enable_filewriter" = "xyes" -a "x$enable_filewriter_mp3" != "xno"; then
595 596 597 598 599 600 601 602 603
    AC_CHECK_LIB([mp3lame], [lame_get_id3v2_tag],
        [have_lame=yes
         AC_DEFINE(FILEWRITER_MP3, 1, [Define if MP3 output part should be built])
         FILEWRITER_LIBS="$FILEWRITER_LIBS -lmp3lame"],
        [if test "x$enable_filewriter_mp3" = "xyes"; then
            AC_MSG_ERROR([Cannot find lame development files, but compilation of FileWriter MP3 output part has been explicitly requested; please install lame dev files and run configure again])
         fi],
        [-lm]
    )
604 605
fi

606
dnl Vorbis and FLAC support support reuse input plugin checks.
607

608
if test "x$enable_filewriter" = "xyes" -a "x$have_vorbis" = "xyes"; then
609 610 611
    AC_DEFINE(FILEWRITER_VORBIS, 1, [Define if Vorbis output part should be built])
    FILEWRITER_CFLAGS="$FILEWRITER_CFLAGS $VORBIS_CFLAGS"
    FILEWRITER_LIBS="$FILEWRITER_LIBS $VORBIS_LIBS"
612 613
fi

614
if test "x$enable_filewriter" = "xyes" -a "x$have_flac" = "xyes"; then
615 616 617
    AC_DEFINE(FILEWRITER_FLAC, 1, [Define if FLAC output part should be built])
    FILEWRITER_CFLAGS="$FILEWRITER_CFLAGS $LIBFLAC_CFLAGS"
    FILEWRITER_LIBS="$FILEWRITER_LIBS $LIBFLAC_LIBS"
618 619 620 621 622
fi

AC_SUBST(FILEWRITER_CFLAGS)
AC_SUBST(FILEWRITER_LIBS)

623 624 625 626 627 628 629 630 631 632 633
dnl Mac Media Keys
dnl ============

AC_ARG_ENABLE(mac_media_keys,
 [AS_HELP_STRING([--enable-mac-media-keys], [enable Mac Media Keys])],
 [enable_mac_media_keys=$enableval], [enable_mac_media_keys="no"])

if test "x$enable_mac_media_keys" != "xno"; then
    GENERAL_PLUGINS="$GENERAL_PLUGINS mac-media-keys"
fi

634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656
dnl *** End of all plugin checks ***

plugindir=`pkg-config audacious --variable=plugin_dir`
AC_SUBST(plugindir)

dnl XXX

INPUT_PLUGIN_DIR=Input
OUTPUT_PLUGIN_DIR=Output
EFFECT_PLUGIN_DIR=Effect
GENERAL_PLUGIN_DIR=General
VISUALIZATION_PLUGIN_DIR=Visualization
CONTAINER_PLUGIN_DIR=Container
TRANSPORT_PLUGIN_DIR=Transport

AC_SUBST(INPUT_PLUGIN_DIR)
AC_SUBST(OUTPUT_PLUGIN_DIR)
AC_SUBST(EFFECT_PLUGIN_DIR)
AC_SUBST(GENERAL_PLUGIN_DIR)
AC_SUBST(VISUALIZATION_PLUGIN_DIR)
AC_SUBST(CONTAINER_PLUGIN_DIR)
AC_SUBST(TRANSPORT_PLUGIN_DIR)

657
localedir="$datarootdir/locale"
658 659 660 661 662 663 664 665 666 667
AC_SUBST(localedir)

AC_SUBST(EFFECT_PLUGINS)
AC_SUBST(GENERAL_PLUGINS)
AC_SUBST(INPUT_PLUGINS)
AC_SUBST(OUTPUT_PLUGINS)
AC_SUBST(VISUALIZATION_PLUGINS)
AC_SUBST(CONTAINER_PLUGINS)
AC_SUBST(TRANSPORT_PLUGINS)

668 669 670 671 672 673 674 675 676

dnl Reliably #include "config.h" (for large file support)
dnl =====================================================
CPPFLAGS="$CPPFLAGS -include config.h"


dnl Generate config files
dnl =====================

677
AC_CONFIG_FILES([
678 679
    buildsys.mk
    extra.mk
680 681 682 683
])

AC_OUTPUT

684 685 686 687

dnl Print results
dnl =============

688 689 690
echo
echo "Configuration:"
echo
691
echo "  Install path:                           $plugindir"
692
echo
693 694
echo "  GTK+ support:                           $USE_GTK"
echo "  Qt support:                             $USE_QT"
695
echo
696
echo "  Audio Formats"
697
echo "  -------------"
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712
echo "  Audio CD:                               $have_cdaudio"
echo "  Free Lossless Audio Codec:              $have_flac"
echo "  Ogg Vorbis:                             $have_vorbis"
echo "  MIDI (via FluidSynth):                  $have_amidiplug"
echo "  MPEG-1 Layer I/II/III (via mpg123):     $have_mpg123"
echo "  MPEG-2/4 AAC:                           $have_aac"
echo "  WavPack:                                $have_wavpack"
echo
echo "  External Decoders"
echo "  -----------------"
echo "  FFmpeg/Libav:                           $ffmpeg_variant"
echo "  libsndfile:                             $have_sndfile"
echo
echo "  Chiptunes"
echo "  ---------"
Alf Gaida's avatar
Alf Gaida committed
713
echo "  AdLib synthesizer (adplug):             $have_adplug"
714 715 716 717 718 719
echo "  Commodore 64 audio (sid):               $have_sid"
echo "  Game Music Emu (spc, nsf, gbs, etc.):   $have_console"
echo "  ModPlug:                                $have_modplug"
echo "  Nintendo DS audio (xsf):                yes"
echo "  PlayStation audio (psf/psf2):           yes"
echo "  Vortex Tracker (vtx):                   yes"
720
echo
721 722 723 724
echo "  Other Inputs"
echo "  ------------"
echo "  Metronome:                              yes"
echo "  Tone Generator:                         yes"
725
echo
726 727 728
echo "  Effects"
echo "  -------"
echo "  Bauer stereophonic-to-binaural (bs2b):  $have_bs2b"
729 730
echo "  Channel Mixer:                          yes"
echo "  Crystalizer:                            yes"
731 732
echo "  Dynamic Range Compressor:               yes"
echo "  Echo/Surround:                          yes"
733
echo "  Extra Stereo:                           yes"
734 735
echo "  LADSPA Host (requires GTK+):            $USE_GTK"
echo "  Sample Rate Converter:                  $have_resample"
736
echo "  Silence Removal:                        yes"
737
echo "  SoX Resampler:                          $have_soxr"
738 739
echo "  Speed and Pitch:                        $have_speedpitch"
echo "  Voice Removal:                          yes"
740
echo
741 742 743 744 745 746 747 748 749 750 751 752 753
echo "  Outputs"
echo "  -------"
echo "  Advanced Linux Sound Architecture:      $have_alsa"
echo "  Jack Audio Connection Kit:              $have_jack"
echo "  Open Sound System:                      $have_oss4"
echo "  PulseAudio:                             $have_pulse"
echo "  Simple DirectMedia Layer:               $have_sdlout"
echo "  Sndio:                                  $have_sndio"
echo "  Win32 waveOut:                          $HAVE_MSWINDOWS"
echo "  FileWriter:                             $enable_filewriter"
echo "    -> MP3 encoding:                      $have_lame"
echo "    -> Vorbis encoding:                   $have_vorbis"
echo "    -> FLAC encoding:                     $have_flac"
754
echo
755
echo "  Playlists"
756
echo "  ---------"
757 758
echo "  Cue sheets:                             $have_cue"
echo "  M3U playlists:                          yes"
759 760
echo "  Microsoft ASX (legacy):                 yes"
echo "  Microsoft ASX 3.0:                      yes"
761 762
echo "  PLS playlists:                          yes"
echo "  XML Sharable Playlist Format (XSPF):    yes"
763
echo
764
echo "  Transports"
765
echo "  ----------"
766 767 768
echo "  FTP, SFTP, SMB (via GIO):               yes"
echo "  HTTP/HTTPS (via neon):                  $have_neon"
echo "  MMS (via libmms):                       $have_mms"
769
echo
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822
echo "  General"
echo "  -------"
echo "  Alarm (requires GTK+):                  $USE_GTK"
echo "  Ampache browser (requires Qt):          $have_ampache"
echo "  Delete Files:                           $USE_GTK_OR_QT"
echo "  libnotify OSD:                          $have_notify"
echo "  Linux Infrared Remote Control (LIRC):   $have_lirc"
echo "  MPRIS 2 Server:                         $have_mpris2"
echo "  Scrobbler 2.0:                          $have_scrobbler2"
echo "  Song Change:                            $have_songchange"
echo

if test "x$USE_GTK" = "xyes" ; then
    echo "  GTK+ Support"
    echo "  ------------"
    echo "  GTK Interface:                          yes"
    echo "  Winamp Classic Interface:               yes"
    echo "  Album Art:                              yes"
    echo "  Blur Scope:                             yes"
    echo "  OpenGL Spectrum Analyzer:               $have_glspectrum"
    echo "  LyricWiki viewer:                       yes"
    echo "  Playlist Manager:                       yes"
    echo "  Search Tool:                            yes"
    echo "  Spectrum Analyzer (2D):                 yes"
    echo "  Status Icon:                            yes"
    echo "  X11 Global Hotkeys:                     $have_hotkey"
    echo "  X11 On-Screen Display (aosd):           $have_aosd"
    echo
fi

if test "x$USE_QT" = "xyes" ; then
    echo "  Qt Support"
    echo "  ----------"
    echo "  Qt Multimedia output:                   $have_qtaudio"
    echo "  Qt Interface:                           yes"
    echo "  Winamp Classic Interface:               yes"
    echo "  Album Art:                              yes"
    echo "  LyricWiki viewer:                       yes"
    echo "  OpenGL Spectrum Analyzer:               $have_qtglspectrum"
    echo "  Playlist Manager:                       yes"
    echo "  Search Tool:                            yes"
    echo "  Song Info:                              yes"
    echo "  Status Icon:                            yes"
    echo
fi

if test "x$HAVE_DARWIN" = "xyes" ; then
    echo "  Mac OS X Support"
    echo "  ----------------"
    echo "  CoreAudio output:                       $have_coreaudio"
    echo "  Media Keys:                             $enable_mac_media_keys"
    echo
fi