summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac120
1 files changed, 108 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 7a113167..2a364423 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([deadbeef], [devel])
+AC_INIT([deadbeef], [0.4.3])
AC_CONFIG_HEADER(config.h)
@@ -33,15 +33,19 @@ fi
case "$host" in
i386-*-* | i486-*-* | i586-*-* | i686-*-* | i86pc-*-*)
AC_DEFINE(ARCH_X86_32, 1, [architecture is x86])
+ LIB="lib-x86-32"
;;
x86_64-*-* | amd64-*-*)
AC_DEFINE(ARCH_X86_64, 1, [architecture is x86_64])
+ LIB="lib-x86-64"
;;
powerpc-*-* )
AC_DEFINE(ARCH_PPC_32, 1, [architecture is ppc32])
+ LIB="lib-ppc-32"
;;
powerpc64-*-* )
AC_DEFINE(ARCH_PPC_64, 1, [architecture is ppc64])
+ LIB="lib-ppc-64"
;;
*)
AC_DEFINE(ARCH_UNKNOWN, 1, [architecture is unknown])
@@ -56,9 +60,6 @@ dnl INSANE_CXXFLAGS="-Wcomment -Wchar-subscripts -Wunused-function -Wunused-valu
AC_SUBST(INSANE_CFLAGS)
AC_SUBST(INSANE_CXXFLAGS)
-CXXFLAGS="$CXXFLAGS $INSANE_CXXFLAGS -D_GNU_SOURCE -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\\\"$prefix\\\" -DDOCDIR=\\\"$docdir\\\""
-CFLAGS="$CFLAGS $INSANE_CFLAGS -D_GNU_SOURCE -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\\\"$prefix\\\" -DDOCDIR=\\\"$docdir\\\""
-
AC_ARG_ENABLE(nullout, [AS_HELP_STRING([--disable-nullout ], [disable NULL output plugin (default: enabled)])], [enable_nullout=$enableval], [enable_nullout=yes])
AC_ARG_ENABLE(alsa, [AS_HELP_STRING([--disable-alsa ], [disable ALSA output plugin (default: enabled)])], [enable_alsa=$enableval], [enable_alsa=yes])
AC_ARG_ENABLE(oss, [AS_HELP_STRING([--disable-oss ], [disable Open Sound System output plugin (default: enabled)])], [enable_oss=$enableval], [enable_oss=yes])
@@ -93,8 +94,27 @@ AC_ARG_ENABLE(aac, [AS_HELP_STRING([--disable-aac ], [disable AAC decod
AC_ARG_ENABLE(mms, [AS_HELP_STRING([--disable-mms ], [disable MMS streaming vfs plugin (default: enabled)])], [enable_mms=$enableval], [enable_mms=yes])
AC_ARG_ENABLE(shn, [AS_HELP_STRING([--disable-shn ], [disable shorten plugin (default: enabled)])], [enable_shn=$enableval], [enable_shn=yes])
AC_ARG_ENABLE(ao, [AS_HELP_STRING([--disable-ao ], [disable audio overload plugin (default: enabled)])], [enable_ao=$enableval], [enable_ao=yes])
+AC_ARG_ENABLE(mpris, [ --enable-mpris enable Ubuntu Sound Menu plugin (default: disabled)], [enable_mpris=$enableval], [enable_mpris=no])
+AC_ARG_ENABLE(portable, [ --enable-portable make portable static build (default: disabled)], [enable_portable=$enableval], [enable_portable=no])
+
+if test "x$enable_portable" != "xno" ; then
+ AC_DEFINE_UNQUOTED([PORTABLE], [1], [Define if building portable version])
+ PORTABLE=yes
+ PREFIXFLAGS="-DPREFIX=donotuse -DLIBDIR=donotuse -DDOCDIR=donotuse -I./include -I../../include"
+else
+ PREFIXFLAGS=" -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\\\"$prefix\\\" -DDOCDIR=\\\"$docdir\\\""
+fi
+
+CXXFLAGS="$CXXFLAGS $INSANE_CXXFLAGS -D_GNU_SOURCE $PREFIXFLAGS"
+CFLAGS="$CFLAGS $INSANE_CFLAGS -D_GNU_SOURCE $PREFIXFLAGS"
PKG_CHECK_MODULES(DEPS, samplerate)
+if test "x$enable_portable" != "xno" ; then
+ DEPS_LIBS="$LIB/libsamplerate.a -lpthread -ldl"
+ AC_SUBST(DEPS_LIBS)
+else
+ PKG_CHECK_MODULES(DEPS, samplerate)
+fi
if test "x$enable_gtkui" != "xno" ; then
if test "x$enable_gtk3" == "xyes" ; then
@@ -111,15 +131,21 @@ if test "x$enable_alsa" != "xno" ; then
fi
if test "x$enable_ffmpeg" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ FFMPEG_DEPS_LIBS="../../$LIB/libavcodec.a -lpthread ../../$LIB/libavformat.a ../../$LIB/libavcodec.a ../../$LIB/libavutil.a ../../$LIB/libavcore.a -lm ../../$LIB/libz.a "
+ AC_SUBST(FFMPEG_DEPS_LIBS)
+ HAVE_FFMPEG=yes
+else
PKG_CHECK_MODULES(FFMPEG_DEPS, libavcodec >= 51.0.0 libavutil libavformat >= 52.0.0, HAVE_FFMPEG=yes, HAVE_FFMPEG=no)
fi
+fi
if test "x$enable_pulse" != "xno" ; then
PKG_CHECK_MODULES(PULSE_DEPS, libpulse-simple, HAVE_PULSE=yes, HAVE_PULSE=no)
fi
-AC_CHECK_LIB([pthread], [main])
-AC_CHECK_LIB([dl], [main])
+dnl AC_CHECK_LIB([pthread], [main])
+dnl AC_CHECK_LIB([dl], [main])
AC_CHECK_HEADER([iconv.h],[],[iconv.h not found.])
@@ -136,17 +162,33 @@ if test ${HAVE_SSE2}; then
fi
dnl curl lib
-AC_CHECK_LIB([curl], [main], [HAVE_CURL=yes])
-if test "x$HAVE_CURL" = "xyes"; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_CURL=yes
+ CURL_LIBS="../../$LIB/libcurl.a -lrt"
+ AC_SUBST(CURL_LIBS)
+else
+ AC_CHECK_LIB([curl], [main], [HAVE_CURL=yes])
CURL_LIBS="-lcurl"
AC_SUBST(CURL_LIBS)
fi
-PKG_CHECK_MODULES(DBUS_DEPS, dbus-1, HAVE_DBUS=yes, HAVE_DBUS=no)
+if test "x$enable_portable" != "xno" ; then
+ HAVE_DBUS=yes
+ DBUS_DEPS_LIBS="../../$LIB/libdbus-1.a ../../$LIB/libexpat.a -lrt"
+ DBUS_DEPS_CFLAGS="-I../../include/dbus-1"
+ AC_SUBST(DBUS_DEPS_LIBS)
+else
+ PKG_CHECK_MODULES(DBUS_DEPS, dbus-1, HAVE_DBUS=yes, HAVE_DBUS=no)
+fi
dnl mpgmad plugin
if test "x$enable_mpgmad" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_MPGMAD=yes
+ MAD_LIBS="../../$LIB/libmad.a"
+ AC_SUBST(MAD_LIBS)
+else
AC_CHECK_LIB([mad], [main], [HAVE_LIBMAD=yes])
if test "x$HAVE_LIBMAD" = "xyes" ; then
HAVE_MPGMAD=yes
@@ -154,9 +196,15 @@ if test "x$enable_mpgmad" != "xno" ; then
AC_SUBST(MAD_LIBS)
fi
fi
+fi
dnl vorbis plugin
if test "x$enable_vorbis" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_VORBISPLUGIN=yes
+ VORBIS_LIBS="../../$LIB/libogg.a ../../$LIB/libvorbis.a ../../$LIB/libvorbisenc.a ../../$LIB/libvorbisfile.a"
+ AC_SUBST(VORBIS_LIBS)
+else
AC_CHECK_LIB([vorbis], [main], [HAVE_VORBIS=yes])
AC_CHECK_LIB([vorbisfile], [main], [HAVE_VORBISFILE=yes])
if test "x$HAVE_VORBIS" = "xyes" && test "x$HAVE_VORBISFILE" = "xyes" ; then
@@ -165,9 +213,15 @@ if test "x$enable_vorbis" != "xno" ; then
AC_SUBST(VORBIS_LIBS)
fi
fi
+fi
dnl flac plugin
if test "x$enable_flac" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_FLACPLUGIN=yes
+ FLAC_LIBS="../../$LIB/libFLAC.a ../../$LIB/libogg.a"
+ AC_SUBST(FLAC_LIBS)
+else
AC_CHECK_LIB([FLAC], [main], [HAVE_FLAC=yes])
if test "x$HAVE_FLAC" = "xyes" ; then
HAVE_FLACPLUGIN=yes
@@ -175,9 +229,15 @@ if test "x$enable_flac" != "xno" ; then
AC_SUBST(FLAC_LIBS)
fi
fi
+fi
dnl wavpack plugin
if test "x$enable_wavpack" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_WAVPACKPLUGIN=yes
+ WAVPACK_LIBS="../../$LIB/libwavpack.a"
+ AC_SUBST(WAVPACK_LIBS)
+else
AC_CHECK_LIB([wavpack], [main], [HAVE_WAVPACK=yes])
if test "x$HAVE_WAVPACK" = "xyes" ; then
HAVE_WAVPACKPLUGIN=yes
@@ -185,9 +245,15 @@ if test "x$enable_wavpack" != "xno" ; then
AC_SUBST(WAVPACK_LIBS)
fi
fi
+fi
dnl libsndfile plugin
if test "x$enable_sndfile" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_SNDFILEPLUGIN=yes
+ SNDFILE_LIBS="../../$LIB/libsndfile.a"
+ AC_SUBST(SNDFILE_LIBS)
+else
AC_CHECK_LIB([sndfile], [main], [HAVE_SNDFILE=yes])
if test "x$HAVE_SNDFILE" = "xyes" ; then
HAVE_SNDFILEPLUGIN=yes
@@ -195,18 +261,24 @@ if test "x$enable_sndfile" != "xno" ; then
AC_SUBST(SNDFILE_LIBS)
fi
fi
+fi
dnl vfs_curl plugin
if test "x$enable_vfs_curl" != "xno" ; then
if test "x$HAVE_CURL" = "xyes" ; then
HAVE_VFS_CURL=yes
- VFS_CURL_LIBS="-lcurl"
+ VFS_CURL_LIBS="$CURL_LIBS"
AC_SUBST(VFS_CURL_LIBS)
fi
fi
dnl cdda plugin
if test "x$enable_cdda" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_CDDAPLUGIN=yes
+ CDDA_LIBS="../../$LIB/libcdio.a ../../$LIB/libudf.a ../../$LIB/libiso9660.a ../../$LIB/libcddb.a"
+ AC_SUBST(CDDA_LIBS)
+else
AC_CHECK_LIB([cdio], [main], [HAVE_CDIO=yes])
AC_CHECK_LIB([cddb], [main], [HAVE_CDDB=yes])
if test "x$HAVE_CDIO" = "xyes" && test "x$HAVE_CDDB" = "xyes" ; then
@@ -215,6 +287,7 @@ if test "x$enable_cdda" != "xno" ; then
AC_SUBST(CDDA_LIBS)
fi
fi
+fi
dnl gtkui plugin
if test "x$enable_gtkui" != "xno" ; then
@@ -230,10 +303,14 @@ if test "x$enable_alsa" != "xno" ; then
fi
if test "x$enable_ffmpeg" != "xno" ; then
+if test "x$enable_portable" = "xno" ; then
if test "x$HAVE_FFMPEG" = "xyes" ; then
HAVE_FFMPEGPLUGIN=yes
AC_CHECK_HEADER([ffmpeg/avformat.h], FFMPEG_DEPS_CFLAGS="$FFMPEG_DEPS_CFLAGS -D FFMPEG_OLD")
fi
+else
+ HAVE_FFMPEGPLUGIN=yes
+fi
fi
if test "x$enable_hotkeys" != "xno" ; then
@@ -365,6 +442,11 @@ if test "x$enable_dca" != "xno" ; then
fi
if test "x$enable_aac" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ FAAD2_LIBS="../../$LIB/libfaad.a"
+ AC_SUBST(FAAD2_LIBS)
+ HAVE_AAC=yes
+else
AC_CHECK_LIB([faad], [main], [HAVE_FAAD=1])
if test ${HAVE_FAAD} ; then
FAAD2_LIBS="-lfaad"
@@ -372,6 +454,7 @@ if test "x$enable_aac" != "xno" ; then
HAVE_AAC=yes
fi
fi
+fi
if test "x$enable_mms" != "xno" ; then
LIBMMS_LIBS=""
@@ -384,15 +467,24 @@ if test "x$enable_shn" != "xno" ; then
fi
if test "x$enable_ao" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_ZLIB=yes
+ ZLIB_LIBS="../../$LIB/libz.a"
+else
AC_CHECK_LIB([z], [main], [HAVE_ZLIB=yes])
+ ZLIB_LIBS="-lz"
+fi
if test "x$HAVE_ZLIB" = "xyes"; then
- ZLIB_LIBS="-lz"
AC_SUBST(ZLIB_LIBS)
HAVE_AO=yes
fi
fi
-PLUGINS_DIRS="plugins/lastfm plugins/mpgmad plugins/vorbis plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/dumb plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shn plugins/ao plugins/shellexec"
+if test "x$enable_mpris" != "xno" ; then
+ PKG_CHECK_MODULES(MPRIS_DEPS, gio-2.0 glib-2.0 >= 2.26.0, HAVE_MPRIS=yes, HAVE_MPRIS=no)
+fi
+
+PLUGINS_DIRS="plugins/lastfm plugins/mpgmad plugins/vorbis plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/dumb plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shn plugins/ao plugins/shellexec plugins/mpris"
AM_CONDITIONAL(HAVE_VORBIS, test "x$HAVE_VORBISPLUGIN" = "xyes")
AM_CONDITIONAL(HAVE_FLAC, test "x$HAVE_FLACPLUGIN" = "xyes")
@@ -427,6 +519,8 @@ AM_CONDITIONAL(HAVE_AAC, test "x$HAVE_AAC" = "xyes")
AM_CONDITIONAL(HAVE_MMS, test "x$HAVE_MMS" = "xyes")
AM_CONDITIONAL(HAVE_SHN, test "x$HAVE_SHN" = "xyes")
AM_CONDITIONAL(HAVE_AO, test "x$HAVE_AO" = "xyes")
+AM_CONDITIONAL(HAVE_MPRIS, test "x$HAVE_MPRIS" = "xyes")
+AM_CONDITIONAL(PORTABLE, test "x$PORTABLE" = "xyes")
AC_SUBST(PLUGINS_DIRS)
@@ -487,6 +581,7 @@ PRINT_PLUGIN_INFO([aac],[AAC player (m4a, aac, mp4) based on FAAD2],[test "x$HAV
PRINT_PLUGIN_INFO([mms],[mms streaming support],[test "x$HAVE_MMS" = "xyes"])
PRINT_PLUGIN_INFO([shn],[shorten player based on xmms-shn],[test "x$HAVE_SHN" = "xyes"])
PRINT_PLUGIN_INFO([ao],[psf1/psf2/spu/ssf player using Audio Overload],[test "x$HAVE_AO" = "xyes"])
+PRINT_PLUGIN_INFO([mpris],[Ubuntu Sound Menu integration],[test "x$HAVE_MPRIS" = "xyes"])
echo
@@ -527,6 +622,7 @@ plugins/aac/Makefile
plugins/mms/Makefile
plugins/shn/Makefile
plugins/ao/Makefile
+plugins/mpris/Makefile
intl/Makefile
po/Makefile.in
deadbeef.desktop