aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-16 08:33:29 +0200
committerMax Kellermann <max@duempel.org>2008-10-16 08:33:29 +0200
commitb53365949a549184191ec20625f13e059024effd (patch)
tree9d181be5d68a2a58fd0ee1912be73aecd4c88dea /m4
parentda83f2bbe702e20dd9c72f23ad44efcc65460cdf (diff)
downloadmpd-b53365949a549184191ec20625f13e059024effd.tar.gz
mpd-b53365949a549184191ec20625f13e059024effd.tar.xz
mpd-b53365949a549184191ec20625f13e059024effd.zip
configure.ac: find more libraries with pkg-config
Detect the following libraries with pkg-config: libshout, libid3tag, libmad.
Diffstat (limited to '')
-rw-r--r--m4/shout.m490
-rw-r--r--m4/vorbis.m4122
2 files changed, 0 insertions, 212 deletions
diff --git a/m4/shout.m4 b/m4/shout.m4
deleted file mode 100644
index 4eba5c09b..000000000
--- a/m4/shout.m4
+++ /dev/null
@@ -1,90 +0,0 @@
-dnl XIPH_PATH_SHOUT
-dnl Jack Moffitt <jack@icecast.org> 08-06-2001
-dnl Rewritten for libshout 2
-dnl Brendan Cully <brendan@xiph.org> 20030612
-dnl
-dnl $Id: shout.m4 7180 2004-07-20 02:50:54Z brendan $
-
-# XIPH_PATH_SHOUT([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-# Test for libshout, and define SHOUT_CPPFLAGS SHOUT_CFLAGS SHOUT_LIBS, and
-# SHOUT_THREADSAFE
-AC_DEFUN([XIPH_PATH_SHOUT],
-[dnl
-xt_have_shout="no"
-SHOUT_THREADSAFE="no"
-SHOUT_CPPFLAGS=""
-SHOUT_CFLAGS=""
-SHOUT_LIBS=""
-
-# NB: PKG_CHECK_MODULES exits if pkg-config is unavailable on the target
-# system, so we can't use it.
-
-# seed pkg-config with the default libshout location
-PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-/usr/local/lib/pkgconfig}
-export PKG_CONFIG_PATH
-
-# Step 1: Use pkg-config if available
-AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
-if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists shout`
-then
- SHOUT_CFLAGS=`$PKGCONFIG --variable=cflags_only shout`
- SHOUT_CPPFLAGS=`$PKGCONFIG --variable=cppflags shout`
- SHOUT_LIBS=`$PKGCONFIG --libs shout`
- xt_have_shout="maybe"
-else
- if test "$PKGCONFIG" != "no"
- then
- AC_MSG_NOTICE([$PKGCONFIG couldn't find libshout. Try adjusting PKG_CONFIG_PATH.])
- fi
- # pkg-config unavailable, try shout-config
- AC_PATH_PROG([SHOUTCONFIG], [shout-config], [no])
- if test "$SHOUTCONFIG" != "no" && test `$SHOUTCONFIG --package` = "libshout"
- then
- SHOUT_CPPFLAGS=`$SHOUTCONFIG --cppflags`
- SHOUT_CFLAGS=`$SHOUTCONFIG --cflags-only`
- SHOUT_LIBS=`$SHOUTCONFIG --libs`
- xt_have_shout="maybe"
- fi
-fi
-
-# Now try actually using libshout
-if test "$xt_have_shout" != "no"
-then
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
-
- # freebsd 6.1 + shout 2.2 port seems to leave pthread out
- case "$host_os" in
- freebsd*)
- case "$SHOUT_CFLAGS$SHOUT_CPPFLAGS" in
- *-D_THREAD_SAFE*)
- SHOUT_LIBS="$SHOUT_LIBS -lpthread"
- ;;
- esac
- ;;
- esac
- CPPFLAGS="$CPPFLAGS $SHOUT_CPPFLAGS"
- CFLAGS="$CFLAGS $SHOUT_CFLAGS"
- LIBS="$SHOUT_LIBS $LIBS"
- AC_CHECK_HEADERS([shout/shout.h], [
- AC_CHECK_FUNC([shout_new], [
- ifelse([$1], , :, [$1])
- xt_have_shout="yes"
- ])
- AC_EGREP_CPP([yes], [#include <shout/shout.h>
-#if SHOUT_THREADSAFE
-yes
-#endif
-], [SHOUT_THREADSAFE="yes"])
- ])
- CPPFLAGS="$ac_save_CPPFLAGS"
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
-fi
-
-if test "$xt_have_shout" != "yes"
-then
- ifelse([$2], , :, [$2])
-fi
-])dnl XIPH_PATH_SHOUT
diff --git a/m4/vorbis.m4 b/m4/vorbis.m4
deleted file mode 100644
index 300cc6c7d..000000000
--- a/m4/vorbis.m4
+++ /dev/null
@@ -1,122 +0,0 @@
-# Configure paths for libvorbis
-# Jack Moffitt <jack@icecast.org> 10-21-2000
-# Shamelessly stolen from Owen Taylor and Manish Singh
-# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
-
-dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
-dnl
-AC_DEFUN([XIPH_PATH_VORBIS],
-[dnl
-dnl Get the cflags and libraries
-dnl
-AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
-AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
-AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
-AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
-
- if test "x$vorbis_libraries" != "x" ; then
- VORBIS_LIBS="-L$vorbis_libraries"
- elif test "x$vorbis_prefix" != "x" ; then
- VORBIS_LIBS="-L$vorbis_prefix/lib"
- elif test "x$prefix" != "xNONE"; then
- VORBIS_LIBS="-L$prefix/lib"
- fi
-
- VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
- VORBISFILE_LIBS="-lvorbisfile"
- VORBISENC_LIBS="-lvorbisenc"
-
- if test "x$vorbis_includes" != "x" ; then
- VORBIS_CFLAGS="-I$vorbis_includes"
- elif test "x$vorbis_prefix" != "x" ; then
- VORBIS_CFLAGS="-I$vorbis_prefix/include"
- elif test "x$prefix" != "xNONE"; then
- VORBIS_CFLAGS="-I$prefix/include"
- fi
-
-
- AC_MSG_CHECKING(for Vorbis)
- no_vorbis=""
-
-
- if test "x$enable_vorbistest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
-dnl
-dnl Now check if the installed Vorbis is sufficiently new.
-dnl
- rm -f conf.vorbistest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <vorbis/codec.h>
-#include <vorbis/vorbisenc.h>
-
-int main ()
-{
- vorbis_block vb;
- vorbis_dsp_state vd;
- vorbis_info vi;
-
- vorbis_info_init (&vi);
- vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
- vorbis_analysis_init (&vd, &vi);
- vorbis_block_init (&vd, &vb);
- /* this function was added in 1.0rc3, so this is what we're testing for */
- vorbis_bitrate_addblock (&vb);
-
- system("touch conf.vorbistest");
- return 0;
-}
-
-],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
-
- if test "x$no_vorbis" = "x" ; then
- AC_MSG_RESULT(yes)
- ifelse([$1], , :, [$1])
- else
- AC_MSG_RESULT(no)
- if test -f conf.vorbistest ; then
- :
- else
- echo "*** Could not run Vorbis test program, checking why..."
- CFLAGS="$CFLAGS $VORBIS_CFLAGS"
- LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
- AC_TRY_LINK([
-#include <stdio.h>
-#include <vorbis/codec.h>
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
- echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
- echo "*** or that you have moved Vorbis since it was installed." ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- VORBIS_CFLAGS=""
- VORBIS_LIBS=""
- VORBISFILE_LIBS=""
- VORBISENC_LIBS=""
- ifelse([$2], , :, [$2])
- fi
- AC_SUBST(VORBIS_CFLAGS)
- AC_SUBST(VORBIS_LIBS)
- AC_SUBST(VORBISFILE_LIBS)
- AC_SUBST(VORBISENC_LIBS)
- rm -f conf.vorbistest
-])