summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorWrobell <wrobell@ite.pl>2002-01-18 19:46:03 +0000
committerWrobell <wrobell@ite.pl>2002-01-18 19:46:03 +0000
commit36006f6dbe79c293088ca499dd3383a0b094ccec (patch)
tree57af0b3aca4d5f0f67a908433ef10be9ba63faa7 /m4
parent836471779ec2337a52c33b4a4858d573b255199c (diff)
downloadgst-plugins-bad-36006f6dbe79c293088ca499dd3383a0b094ccec.tar.gz
gst-plugins-bad-36006f6dbe79c293088ca499dd3383a0b094ccec.tar.bz2
gst-plugins-bad-36006f6dbe79c293088ca499dd3383a0b094ccec.zip
- my mistake... mpeg2dec libs does not depend on X11 libraries (vo library distributed with mpeg2dec depends on X11 l...
Original commit message from CVS: - my mistake... mpeg2dec libs does not depend on X11 libraries (vo library distributed with mpeg2dec depends on X11 libs). Add configure option so user can specify where mpeg2dec library is installed. This way we do not guess where is mpeg2dec. If it is not in standard location (prefix==/usr), then leave it to the user. Changes inspired by AM_PATH_LIBMIKMOD.
Diffstat (limited to 'm4')
-rw-r--r--m4/gst-mpeg2dec.m427
1 files changed, 11 insertions, 16 deletions
diff --git a/m4/gst-mpeg2dec.m4 b/m4/gst-mpeg2dec.m4
index aa3f108f..0a5785fe 100644
--- a/m4/gst-mpeg2dec.m4
+++ b/m4/gst-mpeg2dec.m4
@@ -1,24 +1,19 @@
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
+AC_ARG_WITH(mpeg2dec-prefix,
+ [ --with-mpeg2dec-prefix=PFX Prefix where mpeg2dec is installed (optional)],
+ mpeg2dec_config_prefix="$withval", mpeg2dec_config_prefix="")
-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])
+if test x$mpeg2dec_config_prefix = x ; then
+ CHECK_LIBHEADER(MPEG2DEC, mpeg2, mpeg2_init, mpeg2dec/mpeg2.h,
+ MPEG2DEC_LIBS="-lmpeg2 -lmpeg2dec")
+else
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)
+ MPEG2DEC_LIBS="-lmpeg2 -lmpeg2dec -L$mpeg2dec_config_prefix/lib"
+ MPEG2DEC_CFLAGS="-I$mpeg2dec_config_prefix/include"
+ ], , -L$mpeg2dec_config_prefix/lib, -I$mpeg2dec_config_prefix/include)
fi
-
+
AC_SUBST(MPEG2DEC_CFLAGS)
AC_SUBST(MPEG2DEC_LIBS)
])