more of the same
[platform/upstream/gst-plugins-good.git] / m4 / gst-artsc.m4
1 dnl Perform a check for existence of ARTSC
2 dnl Richard Boulton <richard-alsa@tartarus.org>
3 dnl Last modification: 26/06/2001
4 dnl GST_CHECK_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION,
5 dnl                   DEPENDENT-PLUGINS, TEST-FOR-FEATURE)
6 dnl
7 dnl This check was written for GStreamer: it should be renamed and checked
8 dnl for portability if you decide to use it elsewhere.
9 dnl
10 AC_DEFUN(GST_CHECK_ARTSC,
11
12   AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
13   if test x$ARTSC_CONFIG = xno; then
14   if test x$ARTSC_CONFIG = xno; then
15     AC_MSG_WARN([Couldn't find artsc-config])
16     HAVE_ARTSC=no
17     ARTSC_LIBS=
18     ARTSC_CFLAGS=
19   else
20     ARTSC_LIBS=`artsc-config --libs`
21     ARTSC_CFLAGS=`artsc-config --cflags`
22     dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.  
23     dnl FIXME: Ensure only suitable flags result from artsc-config --cflags
24     CPPFLAGS="$CPPFLAGS $ARTSC_CFLAGS"
25     AC_CHECK_HEADER(artsc.h, HAVE_ARTSC=yes, HAVE_ARTSC=no)
26   fi
27   AC_SUBST(ARTSC_LIBS)
28   AC_SUBST(ARTSC_CFLAGS) 
29 ])
30