summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-02-11 16:44:05 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-02-11 16:44:05 +0000
commitfe7471053ff320e4094912220dcfffd466099e2c (patch)
tree29b1157e45620b88f9f27b563263c574766d8a55 /m4
parentb5e2237bc6715d8afd333b67fb0823fbd4f9c2df (diff)
fix underquotedness of macros
Original commit message from CVS: fix underquotedness of macros
Diffstat (limited to 'm4')
-rw-r--r--m4/a52.m44
-rw-r--r--m4/aalib.m42
-rw-r--r--m4/as-avifile.m4150
-rw-r--r--m4/as-ffmpeg.m42
-rw-r--r--m4/as-liblame.m42
-rw-r--r--m4/as-slurp-ffmpeg.m42
-rw-r--r--m4/check-libheader.m42
-rw-r--r--m4/esd.m44
-rw-r--r--m4/freetype2.m42
-rw-r--r--m4/gconf-2.m42
-rw-r--r--m4/glib.m42
-rw-r--r--m4/gst-alsa.m42
-rw-r--r--m4/gst-artsc.m42
-rw-r--r--m4/gst-ivorbis.m42
-rw-r--r--m4/gst-matroska.m44
-rw-r--r--m4/gst-sdl.m42
-rw-r--r--m4/gst-shout2.m42
-rw-r--r--m4/gst-sid.m42
-rw-r--r--m4/gtk.m42
-rw-r--r--m4/libdv.m42
-rw-r--r--m4/libfame.m42
-rw-r--r--m4/libmikmod.m42
-rw-r--r--m4/ogg.m42
-rw-r--r--m4/vorbis.m42
-rw-r--r--m4/xmms.m4153
25 files changed, 26 insertions, 329 deletions
diff --git a/m4/a52.m4 b/m4/a52.m4
index c7396cb1..84bbf61f 100644
--- a/m4/a52.m4
+++ b/m4/a52.m4
@@ -15,7 +15,7 @@ dnl EXTRA-CPPFLAGS - extra C preprocessor flags, i.e. -I/usr/X11R6/include
dnl
dnl Based on GST_CHECK_LIBHEADER from gstreamer plugins 0.3.1.
dnl
-AC_DEFUN(A52_CHECK_LIBHEADER,
+AC_DEFUN([A52_CHECK_LIBHEADER],
[
AC_CHECK_LIB([$2], [$3], HAVE_[$1]=yes, HAVE_[$1]=no, [$7])
check_libheader_feature_name=translit([$1], A-Z, a-z)
@@ -49,7 +49,7 @@ dnl
dnl Based on GST_CHECK_A52DEC from gstreamer plugins 0.3.3.1
dnl Thomas Vander Stichele <thomas@apestaart.org>, Andy Wingo <wingo@pobox.com>
dnl
-AC_DEFUN(AC_CHECK_A52DEC,
+AC_DEFUN([AC_CHECK_A52DEC],
[dnl
AC_ARG_WITH(a52dec-prefix,
AC_HELP_STRING([--with-a52dec-prefix=PFX],
diff --git a/m4/aalib.m4 b/m4/aalib.m4
index 8260b2d3..10e0a647 100644
--- a/m4/aalib.m4
+++ b/m4/aalib.m4
@@ -10,7 +10,7 @@
dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS
dnl
-AC_DEFUN(AM_PATH_AALIB,
+AC_DEFUN([AM_PATH_AALIB],
[dnl
dnl Get the cflags and libraries from the aalib-config script
dnl
diff --git a/m4/as-avifile.m4 b/m4/as-avifile.m4
deleted file mode 100644
index dbe680d2..00000000
--- a/m4/as-avifile.m4
+++ /dev/null
@@ -1,150 +0,0 @@
-# AS_AVIFILE 0.1.0
-# CXXFLAGS and LIBS for avifile
-# taken from Autostar Sandbox, http://autostars.sourceforge.net/
-# constructed by careful cross-pollination from various sources and lots of
-# hard labour
-
-dnl Usage:
-dnl AS_AVIFILE(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for avifile, and defines
-dnl - AVIFILE_CXXFLAGS (C++ compiler flags)
-dnl - AVIFILE_LDFLAGS (linker flags, stripping and path)
-dnl as well as set HAVE_AVIFILE to yes or no
-dnl
-dnl FIXME: should define AVIFILE_VERSION
-dnl
-dnl prerequisites:
-dnl - working C++ compiler
-dnl - usable libstdc++
-dnl - AC_PATH_XTRA
-
-AC_DEFUN(AS_AVIFILE,
-[
- HAVE_AVIFILE="no"
-
- dnl first look for avifile-config
- AC_PATH_PROG(AVIFILE_CONFIG, avifile-config, no)
- min_avifile_version=ifelse([$1], ,0.7.0,$1)
- if test "x$AVIFILE_CONFIG" != "xno"; then
- dnl now that we have it, we need to save libs and cflags
- AVIFILE_LDFLAGS=`avifile-config --libs`
- AVIFILE_CXXFLAGS=`avifile-config --cflags`
- AC_SUBST(AVIFILE_LDFLAGS)
- AC_SUBST(AVIFILE_CXXFLAGS)
- HAVE_AVIFILE="yes"
- fi
-
- dnl we got this far, now start checking if we have the right version
- if test "x$HAVE_AVIFILE" = "xyes";
- then
- AC_MSG_CHECKING(for avifile - version >= $min_avifile_version)
- dnl first get the version number from avifile-config
- avifile_major_version=`$AVIFILE_CONFIG $avifile_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- avifile_minor_version=`$AVIFILE_CONFIG $avifile_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- avifile_micro_version=`$AVIFILE_CONFIG $avifile_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- dnl now run a short C app that tells us if the version is ok or not
- dnl all of this is boilerplate code from other examples
- rm -f conf.avifiletest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-char*
-my_strdup (char *str)
-{
- char *new_str;
-
- if (str)
- {
- new_str = (char *) malloc ((strlen (str) + 1) * sizeof (char));
- strcpy (new_str, str);
- }
- else
- new_str = NULL;
-
- return new_str;
-}
-
-int
-main ()
-{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.avifiletest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = my_strdup ("$min_avifile_version");
- if (sscanf (tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3)
- {
- printf ("%s, bad version string\n", "$min_avifile_version");
- exit (1);
- }
- if (($avifile_major_version > major) ||
- (($avifile_major_version == major) && ($avifile_minor_version > minor)) ||
- (($avifile_major_version == major) && ($avifile_minor_version == minor) && ($avifile_micro_version >= micro)))
- return 0;
- else
- {
- printf ("\n*** 'avifile-config --version' returned %d.%d.%d, but the minimum version\n", $avifile_major_version, $avifile_minor_version, $avifile_micro_version);
- printf ("*** of AVIFILE required is %d.%d.%d. If avifile-config is correct, then it is\n", major, minor, micro);
- printf ("*** best to upgrade to the required version.\n");
- printf ("*** If avifile-config was wrong, set the environment variable AVIFILE_CONFIG\n");
- printf ("*** to point to the correct copy of avifile-config, and remove the file\n");
- printf ("*** config.cache (if it exists) before re-running configure\n");
- return 1;
- }
-}
- ],
- [
- AC_MSG_RESULT(yes)
- HAVE_AVIFILE="yes"
- ],
- [
- HAVE_AVIFILE="no"
- ])
- fi
- if test "x$HAVE_AVIFILE" = "xyes";
- then
- dnl now try to compile a sample test app
-
- dnl first save whatever language we're currently testing in
- dnl AC_LANG_SAVE
- dnl AC_LANG_CPLUSPLUS
- AC_LANG_PUSH(C++)
- ac_save_CXXFLAGS=$CXXFLAGS
- ac_save_LDFLAGS=$LDFLAGS
- dnl add X flags, because it looks like avifile needs libXv and libXxf86vm
- CXXFLAGS="$XXCFLAGS $AVIFILE_CXXFLAGS"
- LDFLAGS="$LDFLAGS $AVIFILE_LDFLAGS $X_LIBS -lXv -lXxf86vm"
-
- AC_MSG_CHECKING(compilation of avifile test program)
- dnl try the compile
- AC_TRY_LINK([
-#include <stdio.h>
-#include <stdlib.h>
-#include <avifile.h>
-#include <creators.h>
- ],[
-/* function body */
-IVideoDecoder *decoder;
-BITMAPINFOHEADER bh;
-
-decoder = Creators::CreateVideoDecoder (bh);
- ],
- AC_MSG_RESULT(succeeded)
- HAVE_AVIFILE="yes",
- AC_MSG_RESULT(failed)
- HAVE_AVIFILE="no",
- )
- AC_LANG_RESTORE
- CXXFLAGS="$ac_save_CXXFLAGS"
- LDFLAGS="$ac_save_LDFLAGS"
- fi
-])
-
diff --git a/m4/as-ffmpeg.m4 b/m4/as-ffmpeg.m4
index 4b438a2d..fa0c38d7 100644
--- a/m4/as-ffmpeg.m4
+++ b/m4/as-ffmpeg.m4
@@ -12,7 +12,7 @@ dnl Defines FFMPEG_LIBS
dnl FIXME: should define FFMPEG_VERSION
dnl
-AC_DEFUN(AM_PATH_FFMPEG,
+AC_DEFUN([AM_PATH_FFMPEG],
[
dnl allow for specification of a source path (for uninstalled)
AC_ARG_WITH(ffmpeg-source,
diff --git a/m4/as-liblame.m4 b/m4/as-liblame.m4
index 40722a29..ed7070c6 100644
--- a/m4/as-liblame.m4
+++ b/m4/as-liblame.m4
@@ -13,7 +13,7 @@ dnl Defines LIBLAME_LIBS
dnl FIXME: should define LIBLAME_VERSION
dnl
-AC_DEFUN(AM_PATH_LIBLAME,
+AC_DEFUN([AM_PATH_LIBLAME],
[
dnl check for the library
AC_CHECK_LIB(mp3lame, lame_init, HAVE_LIBLAME=yes, HAVE_LIBLAME=no, -lm)
diff --git a/m4/as-slurp-ffmpeg.m4 b/m4/as-slurp-ffmpeg.m4
index 0df909c6..fd54b429 100644
--- a/m4/as-slurp-ffmpeg.m4
+++ b/m4/as-slurp-ffmpeg.m4
@@ -15,7 +15,7 @@ dnl the same date
dnl (in an ideal world, cvs would understand it's own Tag file format as
dnl a date spec)
-AC_DEFUN(AS_SLURP_FFMPEG,
+AC_DEFUN([AS_SLURP_FFMPEG],
[
# save original dir
FAILED=""
diff --git a/m4/check-libheader.m4 b/m4/check-libheader.m4
index 120e9e23..a7fc5a6a 100644
--- a/m4/check-libheader.m4
+++ b/m4/check-libheader.m4
@@ -15,7 +15,7 @@ dnl EXTRA-CPPFLAGS - extra C preprocessor flags, i.e. -I/usr/X11R6/include
dnl
dnl Based on GST_CHECK_LIBHEADER from gstreamer plugins 0.3.1.
dnl
-AC_DEFUN(CHECK_LIBHEADER,
+AC_DEFUN([CHECK_LIBHEADER],
[
AC_CHECK_LIB([$2], [$3], HAVE_[$1]=yes, HAVE_[$1]=no, [$7])
check_libheader_feature_name=translit([$1], A-Z, a-z)
diff --git a/m4/esd.m4 b/m4/esd.m4
index ea606dff..c6286c07 100644
--- a/m4/esd.m4
+++ b/m4/esd.m4
@@ -7,7 +7,7 @@
dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
dnl
-AC_DEFUN(AM_PATH_ESD,
+AC_DEFUN([AM_PATH_ESD],
[dnl
dnl Get the cflags and libraries from the esd-config script
dnl
@@ -174,7 +174,7 @@ int main ()
dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
dnl Test, whether esd supports multiple recording clients (version >=0.2.21)
dnl
-AC_DEFUN(AM_ESD_SUPPORTS_MULTIPLE_RECORD,
+AC_DEFUN([AM_ESD_SUPPORTS_MULTIPLE_RECORD],
[dnl
AC_MSG_NOTICE([whether installed esd version supports multiple recording clients])
ac_save_ESD_CFLAGS="$ESD_CFLAGS"
diff --git a/m4/freetype2.m4 b/m4/freetype2.m4
index 21c6445e..7199071f 100644
--- a/m4/freetype2.m4
+++ b/m4/freetype2.m4
@@ -4,7 +4,7 @@
dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS
dnl
-AC_DEFUN(AC_CHECK_FT2,
+AC_DEFUN([AC_CHECK_FT2],
[dnl
dnl Get the cflags and libraries from the freetype-config script
dnl
diff --git a/m4/gconf-2.m4 b/m4/gconf-2.m4
index f0c684d4..e1ccc5a2 100644
--- a/m4/gconf-2.m4
+++ b/m4/gconf-2.m4
@@ -5,7 +5,7 @@ dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
dnl you should install foo.schemas files
dnl
-AC_DEFUN(AM_GCONF_SOURCE_2,
+AC_DEFUN([AM_GCONF_SOURCE_2],
[
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
diff --git a/m4/glib.m4 b/m4/glib.m4
index b8094bbf..b3c632b0 100644
--- a/m4/glib.m4
+++ b/m4/glib.m4
@@ -5,7 +5,7 @@ dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MO
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
dnl gthread is specified in MODULES, pass to glib-config
dnl
-AC_DEFUN(AM_PATH_GLIB,
+AC_DEFUN([AM_PATH_GLIB],
[dnl
dnl Get the cflags and libraries from the glib-config script
dnl
diff --git a/m4/gst-alsa.m4 b/m4/gst-alsa.m4
index e1b0177a..bb69c924 100644
--- a/m4/gst-alsa.m4
+++ b/m4/gst-alsa.m4
@@ -12,7 +12,7 @@ dnl
dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
dnl
-AC_DEFUN(AM_PATH_ALSA,
+AC_DEFUN([AM_PATH_ALSA],
[dnl Save the original CFLAGS, LDFLAGS, and LIBS
alsa_save_CFLAGS="$CFLAGS"
alsa_save_LDFLAGS="$LDFLAGS"
diff --git a/m4/gst-artsc.m4 b/m4/gst-artsc.m4
index 6a56d3ec..46599609 100644
--- a/m4/gst-artsc.m4
+++ b/m4/gst-artsc.m4
@@ -6,7 +6,7 @@ dnl
dnl This check was written for GStreamer: it should be renamed and checked
dnl for portability if you decide to use it elsewhere.
dnl
-AC_DEFUN(GST_CHECK_ARTSC,
+AC_DEFUN([GST_CHECK_ARTSC],
[
AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
if test "x$ARTSC_CONFIG" = "xno"; then
diff --git a/m4/gst-ivorbis.m4 b/m4/gst-ivorbis.m4
index 2d29de76..ae35bbb5 100644
--- a/m4/gst-ivorbis.m4
+++ b/m4/gst-ivorbis.m4
@@ -3,7 +3,7 @@
dnl XIPH_PATH_IVORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libivorbis, and define IVORBIS_CFLAGS and IVORBIS_LIBS
dnl
-AC_DEFUN(XIPH_PATH_IVORBIS,
+AC_DEFUN([XIPH_PATH_IVORBIS],
[dnl
dnl Get the cflags and libraries
dnl
diff --git a/m4/gst-matroska.m4 b/m4/gst-matroska.m4
index 3ebff648..b50caaa2 100644
--- a/m4/gst-matroska.m4
+++ b/m4/gst-matroska.m4
@@ -3,7 +3,7 @@
dnl PATH_EBML([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libebml, and define EBML_CFLAGS and EBML_LIBS
dnl
-AC_DEFUN(PATH_EBML,
+AC_DEFUN([PATH_EBML],
[dnl
dnl Get the cflags and libraries
dnl
@@ -125,7 +125,7 @@ int main ()
dnl PATH_MATROSKA(MIN_VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libmatroska, and define MATROSKA_CFLAGS and MATROSKA_LIBS
dnl
-AC_DEFUN(PATH_MATROSKA,
+AC_DEFUN([PATH_MATROSKA],
[dnl
dnl Get the cflags and libraries
dnl
diff --git a/m4/gst-sdl.m4 b/m4/gst-sdl.m4
index 5284fae0..cfc3196b 100644
--- a/m4/gst-sdl.m4
+++ b/m4/gst-sdl.m4
@@ -10,7 +10,7 @@
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
-AC_DEFUN(AM_PATH_SDL,
+AC_DEFUN([AM_PATH_SDL],
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
diff --git a/m4/gst-shout2.m4 b/m4/gst-shout2.m4
index 821c861e..9a523bbf 100644
--- a/m4/gst-shout2.m4
+++ b/m4/gst-shout2.m4
@@ -5,7 +5,7 @@
dnl AM_PATH_SHOUT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libshout, and define SHOUT2_CFLAGS and SHOUT2_LIBS
dnl
-AC_DEFUN(AM_PATH_SHOUT2,
+AC_DEFUN([AM_PATH_SHOUT2],
[dnl
dnl Get the cflags and libraries
dnl
diff --git a/m4/gst-sid.m4 b/m4/gst-sid.m4
index a9d9543f..0af8f3aa 100644
--- a/m4/gst-sid.m4
+++ b/m4/gst-sid.m4
@@ -1,6 +1,6 @@
dnl check for sidplay
-AC_DEFUN(GST_PATH_SIDPLAY,
+AC_DEFUN([GST_PATH_SIDPLAY],
[
AC_MSG_CHECKING([for libsidplay])
diff --git a/m4/gtk.m4 b/m4/gtk.m4
index b8cf4024..f2dd4721 100644
--- a/m4/gtk.m4
+++ b/m4/gtk.m4
@@ -4,7 +4,7 @@
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
-AC_DEFUN(AM_PATH_GTK,
+AC_DEFUN([AM_PATH_GTK],
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
diff --git a/m4/libdv.m4 b/m4/libdv.m4
index ca35db0b..108b640b 100644
--- a/m4/libdv.m4
+++ b/m4/libdv.m4
@@ -6,7 +6,7 @@
dnl AM_PATH_LIBDV([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for liblibdv, and define LIBDV_CFLAGS and LIBDV_LIBS
dnl
-AC_DEFUN(AM_PATH_LIBDV,
+AC_DEFUN([AM_PATH_LIBDV],
[dnl
dnl Get the cflags and libraries
diff --git a/m4/libfame.m4 b/m4/libfame.m4
index 1d660ef1..46341d26 100644
--- a/m4/libfame.m4
+++ b/m4/libfame.m4
@@ -3,7 +3,7 @@ dnl Test for libfame, and define LIBFAME_CFLAGS and LIBFAME_LIBS
dnl Vivien Chappelier 12/11/00
dnl stolen from ORBit autoconf
dnl
-AC_DEFUN(AM_PATH_LIBFAME,
+AC_DEFUN([AM_PATH_LIBFAME],
[dnl
dnl Get the cflags and libraries from the libfame-config script
dnl
diff --git a/m4/libmikmod.m4 b/m4/libmikmod.m4
index 18c4fc9a..8c51985c 100644
--- a/m4/libmikmod.m4
+++ b/m4/libmikmod.m4
@@ -8,7 +8,7 @@ dnl AM_PATH_LIBMIKMOD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and
dnl LIBMIKMOD_LDADD
dnl
-AC_DEFUN(AM_PATH_LIBMIKMOD,
+AC_DEFUN([AM_PATH_LIBMIKMOD],
[dnl
dnl Get the cflags and libraries from the libmikmod-config script
dnl
diff --git a/m4/ogg.m4 b/m4/ogg.m4
index c73bab54..91c82368 100644
--- a/m4/ogg.m4
+++ b/m4/ogg.m4
@@ -5,7 +5,7 @@
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
dnl
-AC_DEFUN(XIPH_PATH_OGG,
+AC_DEFUN([XIPH_PATH_OGG],
[dnl
dnl Get the cflags and libraries
dnl
diff --git a/m4/vorbis.m4 b/m4/vorbis.m4
index 97ece2d9..6a288931 100644
--- a/m4/vorbis.m4
+++ b/m4/vorbis.m4
@@ -7,7 +7,7 @@
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,
+AC_DEFUN([XIPH_PATH_VORBIS],
[dnl
dnl Get the cflags and libraries
dnl
diff --git a/m4/xmms.m4 b/m4/xmms.m4
deleted file mode 100644
index de6f4b78..00000000
--- a/m4/xmms.m4
+++ /dev/null
@@ -1,153 +0,0 @@
-# CFLAGS and library paths for XMMS
-# written 15 December 1999 by Ben Gertzfield <che@debian.org>
-
-dnl Usage:
-dnl AM_PATH_XMMS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl
-dnl Example:
-dnl AM_PATH_XMMS(0.9.5.1, , AC_MSG_ERROR([*** XMMS >= 0.9.5.1 not installed - please install first ***]))
-dnl
-dnl Defines XMMS_CFLAGS, XMMS_LIBS, XMMS_DATA_DIR, XMMS_PLUGIN_DIR,
-dnl XMMS_VISUALIZATION_PLUGIN_DIR, XMMS_INPUT_PLUGIN_DIR,
-dnl XMMS_OUTPUT_PLUGIN_DIR, XMMS_GENERAL_PLUGIN_DIR, XMMS_EFFECT_PLUGIN_DIR,
-dnl and XMMS_VERSION for your plugin pleasure.
-dnl
-
-dnl XMMS_TEST_VERSION(AVAILABLE-VERSION, NEEDED-VERSION [, ACTION-IF-OKAY [, ACTION-IF-NOT-OKAY]])
-AC_DEFUN(XMMS_TEST_VERSION, [
-
-# Determine which version number is greater. Prints 2 to stdout if
-# the second number is greater, 1 if the first number is greater,
-# 0 if the numbers are equal.
-
-# Written 15 December 1999 by Ben Gertzfield <che@debian.org>
-# Revised 15 December 1999 by Jim Monty <monty@primenet.com>
-
- AC_PROG_AWK
- xmms_got_version=[` $AWK ' \
-BEGIN { \
- print vercmp(ARGV[1], ARGV[2]); \
-} \
- \
-function vercmp(ver1, ver2, ver1arr, ver2arr, \
- ver1len, ver2len, \
- ver1int, ver2int, len, i, p) { \
- \
- ver1len = split(ver1, ver1arr, /\./); \
- ver2len = split(ver2, ver2arr, /\./); \
- \
- len = ver1len > ver2len ? ver1len : ver2len; \
- \
- for (i = 1; i <= len; i++) { \
- p = 1000 ^ (len - i); \
- ver1int += ver1arr[i] * p; \
- ver2int += ver2arr[i] * p; \
- } \
- \
- if (ver1int < ver2int) \
- return 2; \
- else if (ver1int > ver2int) \
- return 1; \
- else \
- return 0; \
-}' $1 $2`]
-
- if test $xmms_got_version -eq 2; then # failure
- ifelse([$4], , :, $4)
- else # success!
- ifelse([$3], , :, $3)
- fi
-])
-
-AC_DEFUN(AM_PATH_XMMS,
-[
-AC_ARG_WITH(xmms-prefix,
- AC_HELP_STRING([--with-xmms-prefix=PFX],
- [prefix where XMMS is installed (optional)]),
- xmms_config_prefix="$withval", xmms_config_prefix="")
-
-AC_ARG_WITH(xmms-exec-prefix,
- AC_HELP_STRING([--with-xmms-exec-prefix=PFX],
- [exec prefix where XMMS is installed (optional)]),
- xmms_config_exec_prefix="$withval", xmms_config_exec_prefix="")
-
-if test x$xmms_config_exec_prefix != x; then
- xmms_config_args="$xmms_config_args --exec-prefix=$xmms_config_exec_prefix"
- if test x${XMMS_CONFIG+set} != xset; then
- XMMS_CONFIG=$xmms_config_exec_prefix/bin/xmms-config
- fi
-fi
-
-if test x$xmms_config_prefix != x; then
- xmms_config_args="$xmms_config_args --prefix=$xmms_config_prefix"
- if test x${XMMS_CONFIG+set} != xset; then
- XMMS_CONFIG=$xmms_config_prefix/bin/xmms-config
- fi
-fi
-
-AC_PATH_PROG(XMMS_CONFIG, xmms-config, no)
-min_xmms_version=ifelse([$1], ,0.9.5.1, $1)
-
-if test "$XMMS_CONFIG" = "no"; then
- no_xmms=yes
-else
- XMMS_CFLAGS=`$XMMS_CONFIG $xmms_config_args --cflags`
- XMMS_LIBS=`$XMMS_CONFIG $xmms_config_args --libs`
- XMMS_VERSION=`$XMMS_CONFIG $xmms_config_args --version`
- XMMS_DATA_DIR=`$XMMS_CONFIG $xmms_config_args --data-dir`
- XMMS_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --plugin-dir`
- XMMS_VISUALIZATION_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args \
- --visualization-plugin-dir`
- XMMS_INPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --input-plugin-dir`
- XMMS_OUTPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --output-plugin-dir`
- XMMS_EFFECT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --effect-plugin-dir`
- XMMS_GENERAL_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --general-plugin-dir`
-
- XMMS_TEST_VERSION($XMMS_VERSION, $min_xmms_version, ,no_xmms=version)
-fi
-
-AC_MSG_CHECKING(for XMMS - version >= $min_xmms_version)
-
-if test "x$no_xmms" = x; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
-else
- AC_MSG_RESULT(no)
-
- if test "$XMMS_CONFIG" = "no" ; then
- echo "*** The xmms-config script installed by XMMS could not be found."
- echo "*** If XMMS was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the XMMS_CONFIG environment variable to the"
- echo "*** full path to xmms-config."
- else
- if test "$no_xmms" = "version"; then
- echo "*** An old version of XMMS, $XMMS_VERSION, was found."
- echo "*** You need a version of XMMS newer than $min_xmms_version."
- echo "*** The latest version of XMMS is always available from"
- echo "*** http://www.xmms.org/"
- echo "***"
-
- echo "*** If you have already installed a sufficiently new version, this error"
- echo "*** probably means that the wrong copy of the xmms-config shell script is"
- echo "*** being found. The easiest way to fix this is to remove the old version"
- echo "*** of XMMS, but you can also set the XMMS_CONFIG environment to point to the"
- echo "*** correct copy of xmms-config. (In this case, you will have to"
- echo "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf"
- echo "*** so that the correct libraries are found at run-time)"
- fi
- fi
- XMMS_CFLAGS=""
- XMMS_LIBS=""
- ifelse([$3], , :, [$3])
-fi
-AC_SUBST(XMMS_CFLAGS)
-AC_SUBST(XMMS_LIBS)
-AC_SUBST(XMMS_VERSION)
-AC_SUBST(XMMS_DATA_DIR)
-AC_SUBST(XMMS_PLUGIN_DIR)
-AC_SUBST(XMMS_VISUALIZATION_PLUGIN_DIR)
-AC_SUBST(XMMS_INPUT_PLUGIN_DIR)
-AC_SUBST(XMMS_OUTPUT_PLUGIN_DIR)
-AC_SUBST(XMMS_GENERAL_PLUGIN_DIR)
-AC_SUBST(XMMS_EFFECT_PLUGIN_DIR)
-])