[vlc-commits] control: clean up build rules

Rémi Denis-Courmont git at videolan.org
Tue Feb 10 22:32:28 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb 10 18:08:28 2015 +0200| [a80fe1ea5eb4ca426235a85884a41c3ac0ec5165] | committer: Rémi Denis-Courmont

control: clean up build rules

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a80fe1ea5eb4ca426235a85884a41c3ac0ec5165
---

 configure.ac               |   22 +++++++++++-----------
 modules/control/Modules.am |   42 ++++++++++++++++++++++++------------------
 2 files changed, 35 insertions(+), 29 deletions(-)

diff --git a/configure.ac b/configure.ac
index 198b23a..e0d0cc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -650,7 +650,7 @@ AC_CHECK_FUNCS([if_nameindex if_nametoindex])
 VLC_RESTORE_FLAGS
 
 AS_IF([test -n "$SOCKET_LIBS"], [
-  VLC_ADD_LIBS([access_rtmp access_output_shout sap stream_out_standard stream_out_rtp stream_out_raop stream_out_chromecast oldrc netsync ts remoteosd audiobargraph_a],[${SOCKET_LIBS}])
+  VLC_ADD_LIBS([access_rtmp access_output_shout sap stream_out_standard stream_out_rtp stream_out_raop stream_out_chromecast ts remoteosd audiobargraph_a],[${SOCKET_LIBS}])
 ])
 AC_SUBST(SOCKET_LIBS)
 
@@ -699,7 +699,7 @@ AC_CHECK_FUNC(getopt_long,, [
 AC_SUBST(GNUGETOPT_LIBS)
 
 AC_CHECK_LIB(m,cos,[
-  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient x264 goom noise grain scene swscale postproc mpc qt4 audiobargraph_v colorthres extract ball hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum smooth],[-lm])
+  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient x264 goom noise grain scene swscale postproc mpc qt4 audiobargraph_v colorthres extract ball mosaic gaussianblur x262 x26410b hqdn3d anaglyph ncurses oldmovie glspectrum smooth],[-lm])
   LIBM="-lm"
 ], [
   LIBM=""
@@ -3826,15 +3826,15 @@ dnl  Lirc plugin
 dnl
 AC_ARG_ENABLE(lirc,
   [  --enable-lirc           lirc support (default disabled)])
-if test "${enable_lirc}" = "yes"
-then
-  AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
-  if test "${have_lirc}" = "true"
-  then
-    VLC_ADD_PLUGIN([lirc])
-    VLC_ADD_LIBS([lirc],[-llirc_client])
-  fi
-fi
+have_lirc="no"
+AS_IF([test "${enable_lirc}" = "yes"], [
+  AC_CHECK_HEADER(lirc/lirc_client.h, [
+    AC_CHECK_LIB(lirc_client, lirc_init, [
+      have_lirc="true"
+    ])
+  ])
+])
+AM_CONDITIONAL([HAVE_LIRC], [test "${have_lirc}" = "yes"])
 
 EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
 dnl
diff --git a/modules/control/Modules.am b/modules/control/Modules.am
index b60d5c3..1b1f0d9 100644
--- a/modules/control/Modules.am
+++ b/modules/control/Modules.am
@@ -1,10 +1,24 @@
-SOURCES_dummy = dummy.c
-SOURCES_gestures = gestures.c
-SOURCES_netsync = netsync.c
-SOURCES_ntservice = ntservice.c
-SOURCES_hotkeys = hotkeys.c
-SOURCES_lirc = lirc.c
-SOURCES_oldrc = rc.c
+libdummy_plugin_la_SOURCES = dummy.c
+libgestures_plugin_la_SOURCES = gestures.c
+libhotkeys_plugin_la_SOURCES = hotkeys.c
+libhotkeys_plugin_la_LIBADD = $(LIBM)
+libnetsync_plugin_la_SOURCES = netsync.c
+libnetsync_plugin_la_LIBADD = $(SOCKET_LIBS)
+liboldrc_plugin_la_SOURCES = rc.c
+liboldrc_plugin_la_LIBADD = $(SOCKET_LIBS) $(LIBM)
+
+control_LTLIBRARIES += \
+	libdummy_plugin.la \
+	libgestures_plugin.la \
+	libhotkeys_plugin.la \
+	libnetsync_plugin.la \
+	liboldrc_plugin.la
+
+liblirc_plugin_la_SOURCES = lirc.c
+liblirc_plugin_la_LIBADD = -llirc_client
+if HAVE_LIRC
+control_LTLIBRARIES += liblirc_plugin.la
+endif
 
 libvlc_motion_la_SOURCES = motionlib.c motionlib.h
 if HAVE_DARWIN
@@ -20,17 +34,7 @@ libmotion_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(controldir)'
 if HAVE_DARWIN
 libmotion_plugin_la_LDFLAGS += -Wl,-framework,IOKit,-framework,CoreFoundation
 endif
-
-control_LTLIBRARIES += \
-	libdummy_plugin.la \
-	libgestures_plugin.la \
-	libnetsync_plugin.la \
-	libhotkeys_plugin.la \
-	liboldrc_plugin.la
-
-if HAVE_WIN32
-control_LTLIBRARIES += libntservice_plugin.la
-else
+if !HAVE_WIN32
 control_LTLIBRARIES += libmotion_plugin.la
 endif
 
@@ -54,9 +58,11 @@ if HAVE_XCB_KEYSYMS
 control_LTLIBRARIES += libxcb_hotkeys_plugin.la
 endif
 
+libntservice_plugin_la_SOURCES = ntservice.c
 libwin_hotkeys_plugin_la_SOURCES = globalhotkeys/win32.c
 libwin_msg_plugin_la_SOURCES = win_msg.c
 if HAVE_WIN32
+control_LTLIBRARIES += libntservice_plugin.la
 if !HAVE_WINSTORE
 control_LTLIBRARIES += libwin_hotkeys_plugin.la libwin_msg_plugin.la
 endif



More information about the vlc-commits mailing list