Commit a3c7e55e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Configure: update macro to deal with the case where you want --enable-foo, but...

Configure: update macro to deal with the case where you want --enable-foo, but the module name is not foo.

So, add a new argument that can be empty
This happens for --enable-dv (access_dv) --enable-shout (stream_output_shout)
parent 314bd6d6
...@@ -945,10 +945,10 @@ AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ]) ...@@ -945,10 +945,10 @@ AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
dnl Check for hal dnl Check for hal
PKG_ENABLE_MODULES_VLC([HAL], [hal >= 0.5.0], [Linux HAL services discovery], [auto]) PKG_ENABLE_MODULES_VLC([HAL], [], [hal >= 0.5.0], [Linux HAL services discovery], [auto])
dnl Check for mtp dnl Check for mtp
PKG_ENABLE_MODULES_VLC([MTP],[libmtp >= 0.3.0],[MTP devices support],[auto]) PKG_ENABLE_MODULES_VLC([MTP], [], [libmtp >= 0.3.0],[MTP devices support],[auto])
dnl Check for dbus dnl Check for dbus
AC_ARG_ENABLE(dbus, AC_ARG_ENABLE(dbus,
...@@ -1676,7 +1676,7 @@ AS_IF([test "${enable_sout}" != "no"], [ ...@@ -1676,7 +1676,7 @@ AS_IF([test "${enable_sout}" != "no"], [
AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"]) AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"])
dnl Check for libshout dnl Check for libshout
PKG_ENABLE_MODULES_VLC([access_output_shout], [shout >= 2.1], [libshout output plugin], [auto]) PKG_ENABLE_MODULES_VLC([shout], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
dnl Lua modules dnl Lua modules
AC_ARG_ENABLE(lua, AC_ARG_ENABLE(lua,
...@@ -1731,7 +1731,7 @@ AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"]) ...@@ -1731,7 +1731,7 @@ AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"])
dnl dnl
dnl libproxy support dnl libproxy support
dnl dnl
PKG_ENABLE_MODULES_VLC([LIBPROXY], [libproxy-1.0], [libproxy support], [auto]) PKG_ENABLE_MODULES_VLC([LIBPROXY], [], [libproxy-1.0], [libproxy support], [auto])
dnl dnl
...@@ -1767,7 +1767,7 @@ AS_IF([test "${enable_growl}" != "no"], [ ...@@ -1767,7 +1767,7 @@ AS_IF([test "${enable_growl}" != "no"], [
dnl dnl
dnl Libnotify notification plugin dnl Libnotify notification plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([NOTIFY], [libnotify], [libnotify notification], [auto]) PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify], [libnotify notification], [auto])
dnl dnl
dnl Audioscrobbler plugin dnl Audioscrobbler plugin
...@@ -1934,8 +1934,8 @@ dnl ...@@ -1934,8 +1934,8 @@ dnl
dnl - special access module for dc1394 input dnl - special access module for dc1394 input
dnl - dv module: digital video module check for libraw1394 dnl - dv module: digital video module check for libraw1394
dnl dnl
PKG_ENABLE_MODULES_VLC([dc1394], [libraw1394 >= 2.0.1 libdc1394 >= 1.0.0], [dc1394 access module], [auto]) PKG_ENABLE_MODULES_VLC([dc1394], [], [libraw1394 >= 2.0.1 libdc1394 >= 1.0.0], [dc1394 access module], [auto])
PKG_ENABLE_MODULES_VLC([access_dv], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV input module], [auto]) PKG_ENABLE_MODULES_VLC([dv], [access_dv], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV input module], [auto])
dnl dnl
dnl dvdread module: check for libdvdread dnl dvdread module: check for libdvdread
...@@ -2324,7 +2324,7 @@ fi ...@@ -2324,7 +2324,7 @@ fi
dnl dnl
dnl gnomeVFS access module dnl gnomeVFS access module
dnl dnl
PKG_ENABLE_MODULES_VLC([GNOMEVFS], [gnome-vfs-2.0], [GnomeVFS access module], [auto]) PKG_ENABLE_MODULES_VLC([GNOMEVFS], [], [gnome-vfs-2.0], [GnomeVFS access module], [auto])
dnl Need to test libcdio and libvcdinfo for a number of things. Do it now. dnl Need to test libcdio and libvcdinfo for a number of things. Do it now.
...@@ -2561,9 +2561,9 @@ AC_CHECK_FUNCS(inet_ntop,[ ...@@ -2561,9 +2561,9 @@ AC_CHECK_FUNCS(inet_ntop,[
dnl dnl
dnl ogg demux plugin dnl ogg demux plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([OGG], [ogg >= 1.0], [Ogg demux support], [auto]) PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
if test "${enable_sout}" != "no"; then if test "${enable_sout}" != "no"; then
PKG_ENABLE_MODULES_VLC([MUX_OGG], [ogg >= 1.0], [Ogg demux support], [auto]) PKG_ENABLE_MODULES_VLC([MUX_OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
fi fi
dnl dnl
...@@ -3207,17 +3207,17 @@ AS_IF([test "${enable_dca}" != "no"], [ ...@@ -3207,17 +3207,17 @@ AS_IF([test "${enable_dca}" != "no"], [
dnl dnl
dnl Flac plugin dnl Flac plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([FLAC], [flac], [libflac decoder/encoder support], [auto]) PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])
dnl dnl
dnl Libmpeg2 plugin dnl Libmpeg2 plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([LIBMPEG2], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto]) PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])
dnl dnl
dnl Vorbis plugin dnl Vorbis plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([VORBIS], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto]) PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
dnl dnl
dnl Tremor plugin dnl Tremor plugin
...@@ -3235,7 +3235,7 @@ fi ...@@ -3235,7 +3235,7 @@ fi
dnl dnl
dnl Speex plugin dnl Speex plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([SPEEX], [ogg speex >= 1.0.5], [Speex decoder support], [auto]) PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex decoder support], [auto])
dnl dnl
dnl tarkin decoder plugin dnl tarkin decoder plugin
...@@ -3268,17 +3268,17 @@ fi ...@@ -3268,17 +3268,17 @@ fi
dnl dnl
dnl theora decoder plugin dnl theora decoder plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([THEORA], [ogg theora >= 1.0], [experimental theora codec], [auto]) PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theora >= 1.0], [experimental theora codec], [auto])
dnl dnl
dnl dirac encoder plugin dnl dirac encoder plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([DIRAC], [dirac >= 0.10.0], [dirac encoder], [auto], [], [ -lstdc++]) PKG_ENABLE_MODULES_VLC([DIRAC], [], [dirac >= 0.10.0], [dirac encoder], [auto])
dnl dnl
dnl schroedinger decoder plugin (for dirac format video) dnl schroedinger decoder plugin (for dirac format video)
dnl dnl
PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [schroedinger-1.0 >= 1.0.6], [dirac decoder using schroedinger], [auto]) PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.6], [dirac decoder using schroedinger], [auto])
dnl dnl
dnl PNG decoder module dnl PNG decoder module
...@@ -3370,7 +3370,7 @@ fi ...@@ -3370,7 +3370,7 @@ fi
dnl dnl
dnl libfluidsynth (MIDI synthetizer) plugin dnl libfluidsynth (MIDI synthetizer) plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [fluidsynth], [MIDI synthetiser with libfluidsynth], [auto]) PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth], [MIDI synthetiser with libfluidsynth], [auto])
dnl dnl
dnl Teletext Modules dnl Teletext Modules
...@@ -3496,7 +3496,7 @@ AS_IF([test "${enable_kate}" != "no"], [ ...@@ -3496,7 +3496,7 @@ AS_IF([test "${enable_kate}" != "no"], [
dnl dnl
dnl tiger decoder plugin dnl tiger decoder plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([TIGER], [tiger >= 0.3.1], [Tiger rendering library for Kate streams],[auto]) PKG_ENABLE_MODULES_VLC([TIGER], [], [tiger >= 0.3.1], [Tiger rendering library for Kate streams],[auto])
dnl dnl
...@@ -3903,7 +3903,7 @@ AS_IF([test "${enable_libxml2}" != "no"], [ ...@@ -3903,7 +3903,7 @@ AS_IF([test "${enable_libxml2}" != "no"], [
dnl dnl
dnl SVG module dnl SVG module
dnl dnl
PKG_ENABLE_MODULES_VLC([SVG], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto]) PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
dnl dnl
dnl Snapshot vout module (with cache) dnl Snapshot vout module (with cache)
...@@ -4244,7 +4244,7 @@ fi ...@@ -4244,7 +4244,7 @@ fi
dnl dnl
dnl Pulseaudio module dnl Pulseaudio module
dnl dnl
PKG_ENABLE_MODULES_VLC([PULSE], [libpulse >= 0.9.11], [Pulseaudio support], [auto]) PKG_ENABLE_MODULES_VLC([PULSE], [], [libpulse >= 0.9.11], [Pulseaudio support], [auto])
dnl dnl
dnl Portaudio module dnl Portaudio module
...@@ -4841,7 +4841,7 @@ fi ...@@ -4841,7 +4841,7 @@ fi
dnl dnl
dnl libprojectM visualization plugin dnl libprojectM visualization plugin
dnl dnl
PKG_ENABLE_MODULES_VLC([projectm], [libprojectM], [projectM visualization plugin], [auto]) PKG_ENABLE_MODULES_VLC([projectm], [], [libprojectM], [projectM visualization plugin], [auto])
dnl dnl
dnl AtmoLight (homebrew AmbiLight) dnl AtmoLight (homebrew AmbiLight)
...@@ -4860,7 +4860,7 @@ fi ...@@ -4860,7 +4860,7 @@ fi
dnl dnl
dnl Bonjour services discovery dnl Bonjour services discovery
dnl dnl
PKG_ENABLE_MODULES_VLC([BONJOUR], [avahi-client >= 0.6], [Bonjour services discovery], [auto]) PKG_ENABLE_MODULES_VLC([BONJOUR], [], [avahi-client >= 0.6], [Bonjour services discovery], [auto])
dnl dnl
dnl Lirc plugin dnl Lirc plugin
......
...@@ -75,24 +75,31 @@ AM_CONDITIONAL([HAVE_][$1], ...@@ -75,24 +75,31 @@ AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
]) ])
dnl PKG_ENABLE_MODULES_VLC(VARIABLE-PREFIX, MODULES, dnl PKG_ENABLE_MODULES_VLC(VARIABLE-PREFIX,
dnl VLC_MODULE_NAME dnl (if empty, same as VARIABLE-PREFIX)
dnl PKG MODULES,
dnl [DESCRIPTION], [DEFAULT], dnl [DESCRIPTION], [DEFAULT],
dnl [EXTRA_CFLAGS], [EXTRA_LIBS]) dnl [EXTRA_CFLAGS], [EXTRA_LIBS])
AC_DEFUN([PKG_ENABLE_MODULES_VLC], AC_DEFUN([PKG_ENABLE_MODULES_VLC],
[ [
PKG_WITH_MODULES([$1],[$2], m4_pushdef([module_name], m4_default(m4_tolower([$2]),m4_tolower([$1])))
VLC_ADD_PLUGIN(m4_tolower([$1])) m4_pushdef([enable_arg], m4_tolower([$1]))
VLC_ADD_CFLAGS(m4_tolower([$1]),[$$1_CFLAGS] [$5])
VLC_ADD_LIBS(m4_tolower([$1]),[$$1_LIBS] [$6]), PKG_WITH_MODULES([$1],[$3],
AS_IF([test x"$AS_TR_SH([enable_]m4_tolower([$1]))" = "xyes"], VLC_ADD_PLUGIN(module_name)
[AC_MSG_ERROR(Library [$2] needed for [m4_tolower([$1]) was not found])], VLC_ADD_CFLAGS(module_name,[$$1_CFLAGS] [$6])
[AC_MSG_WARN(Library [$2] needed for [m4_tolower([$1]) was not found])] VLC_ADD_LIBS(module_name,[$$1_LIBS] [$7]),
AS_IF([test x"$AS_TR_SH([enable_]enable_arg)" = "xyes"],
[AC_MSG_ERROR(Library [$3] needed for [m4_tolower([$1])] was not found)],
[AC_MSG_WARN(Library [$3] needed for [m4_tolower([$1])] was not found)]
), ),
[$3],[$4]) [$4],[$5])
AM_CONDITIONAL([HAVE_][$1], AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) [test "$AS_TR_SH([with_]enable_arg)" = "yes"])
m4_popdef([module_name])
m4_popdef([enable_arg])
]) ])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment