summaryrefslogtreecommitdiffstats
path: root/m4/gst-mpeg2dec.m4
diff options
context:
space:
mode:
authorWrobell <wrobell@ite.pl>2002-01-18 14:09:52 +0000
committerWrobell <wrobell@ite.pl>2002-01-18 14:09:52 +0000
commit4fde116853d93991435fda57a8f8d0384ed100df (patch)
tree8b551f7a5543e85a42745cf25283c017bfdd47fb /m4/gst-mpeg2dec.m4
parent1fa123ed51a3d00f41ad877162792e23baef852e (diff)
downloadgst-plugins-bad-4fde116853d93991435fda57a8f8d0384ed100df.tar.gz
gst-plugins-bad-4fde116853d93991435fda57a8f8d0384ed100df.tar.bz2
gst-plugins-bad-4fde116853d93991435fda57a8f8d0384ed100df.zip
- GST_CHECK_MPEG2DEC macro - checks for mpeg2dec in /usr/lib.
Original commit message from CVS: - GST_CHECK_MPEG2DEC macro - checks for mpeg2dec in /usr/lib. If not found then checks for mpeg2dec in /usr/X11R6/lib. This macro is needed because mpeg2dec depends on X11R6 libraries and as FHS states, it should be placed in /usr/X11R6 tree but some distros do not care and put mpeg2dec into /usr/lib. It depends on CHECK_LIBHEADER macro.
Diffstat (limited to 'm4/gst-mpeg2dec.m4')
-rw-r--r--m4/gst-mpeg2dec.m424
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/gst-mpeg2dec.m4 b/m4/gst-mpeg2dec.m4
new file mode 100644
index 00000000..aa3f108f
--- /dev/null
+++ b/m4/gst-mpeg2dec.m4
@@ -0,0 +1,24 @@
+AC_DEFUN(GST_CHECK_MPEG2DEC,
+[dnl
+dnl
+dnl check for mpeg2dec in standard location
+dnl if not found then check for mpeg2dec in /usr/X11R6/lib
+dnl
+CHECK_LIBHEADER(MPEG2DEC, mpeg2, mpeg2_init, mpeg2dec/mpeg2.h, MPEG2DEC_LIBS="-lmpeg2 -lmpeg2dec")
+
+dnl unset cache variable - we want to check once again for the same library
+dnl but in different location
+unset ac_cv_lib_mpeg2_mpeg2_init
+
+dnl check again in /usr/X11R6/lib
+if test x$HAVE_MPEG2DEC = xno; then
+ AC_MSG_NOTICE([NOTICE: mpeg2dec not found, let's try again in /usr/X11R6])
+ CHECK_LIBHEADER(MPEG2DEC, mpeg2, mpeg2_init, mpeg2dec/mpeg2.h, [
+ MPEG2DEC_LIBS="-lmpeg2 -lmpeg2dec -L/usr/X11R6/lib"
+ MPEG2DEC_CFLAGS="-I/usr/X11R6/include"
+ ], , -L/usr/X11R6/lib, -I/usr/X11R6/include)
+fi
+
+AC_SUBST(MPEG2DEC_CFLAGS)
+AC_SUBST(MPEG2DEC_LIBS)
+])