summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2002-03-30 18:24:06 +0000
committerAndy Wingo <wingo@pobox.com>2002-03-30 18:24:06 +0000
commit4229b1cbd1d3c6021fdafff062200493c815a7e4 (patch)
tree5f683743ed5a02f3c2234b9d606e45f6ed894592
parent7f17956d2bf613843b768b342219699bba4e1ed9 (diff)
downloadgstreamer-plugins-bad-4229b1cbd1d3c6021fdafff062200493c815a7e4.tar.gz
added check for 0.7.3 a52 api
Original commit message from CVS: added check for 0.7.3 a52 api
-rw-r--r--configure.ac2
-rw-r--r--m4/gst-a52.m465
2 files changed, 66 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 339a53d43..a484e90c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,7 +270,7 @@ AC_MSG_NOTICE(Checking for plugin libraries)
dnl *** a52dec ***
translit(dnm, m, l) AM_CONDITIONAL(USE_A52DEC, true)
GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [
- GST_CHECK_LIBHEADER(A52DEC, a52, a52_init, -lm, a52dec/a52.h, A52DEC_LIBS="-la52")
+ GST_CHECK_A52DEC()
])
dnl *** aalib ***
diff --git a/m4/gst-a52.m4 b/m4/gst-a52.m4
new file mode 100644
index 000000000..55d947a6a
--- /dev/null
+++ b/m4/gst-a52.m4
@@ -0,0 +1,65 @@
+AC_DEFUN(GST_CHECK_A52DEC,
+[dnl
+AC_ARG_WITH(a52dec-prefix,
+ AC_HELP_STRING([--with-a52dec-prefix=PFX],[Prefix where a52dec is installed (optional)]),
+ a52dec_config_prefix="$withval", a52dec_config_prefix="")
+
+if test x$a52dec_config_prefix = x ; then
+ CHECK_LIBHEADER(A52DEC, a52, a52_init, a52dec/a52.h,
+ A52DEC_LIBS="-la52 -lm", , -lm)
+else
+ CHECK_LIBHEADER(A52DEC, a52, a52_init, a52dec/a52.h, [
+ A52DEC_LIBS="-la52 -L$a52dec_config_prefix/lib -lm"
+ A52DEC_CFLAGS="-I$a52dec_config_prefix/include"
+ ], , -L$a52dec_config_prefix/lib, -I$a52dec_config_prefix/include)
+fi
+
+if test $HAVE_A52DEC = "yes"; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $A52DEC_CFLAGS"
+ LIBS="$A52DEC_LIBS $LIBS"
+ AC_TRY_RUN([
+#include <inttypes.h>
+#include <a52dec/a52.h>
+
+int
+main ()
+{
+ a52_state_t *state;
+ return 0;
+}
+ ],, HAVE_A52DEC=no, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
+
+ if test HAVE_A52DEC = "no"; then
+ echo "*** Your a52dec is borked somehow. Please update to 0.7.3."
+ else
+ AC_TRY_RUN([
+#include <inttypes.h>
+#include <a52dec/a52.h>
+
+int
+main ()
+{
+ int i = sizeof (a52_state_t);
+ return 0;
+}
+ ], HAVE_A52DEC=no,, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
+
+ if test HAVE_A52DEC = "no"; then
+ echo "*** Your a52dec is too old. Please update to 0.7.3."
+ fi
+ fi
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+fi
+
+if test HAVE_A52DEC = "no"; then
+ A52DEC_CFLAGS=""
+ A52DEC_LIBS=""
+fi
+
+AC_SUBST(A52DEC_CFLAGS)
+AC_SUBST(A52DEC_LIBS)
+AC_SUBST(HAVE_A52DEC)
+])