]> git.sesse.net Git - vlc/commitdiff
control: clean up build rules
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 10 Feb 2015 16:08:28 +0000 (18:08 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 10 Feb 2015 21:12:26 +0000 (23:12 +0200)
configure.ac
modules/control/Modules.am

index 198b23a1538dfd2082e3e5b870674d31249e5400..e0d0cc05e978179c087cf771ba7b8e15b693aec6 100644 (file)
@@ -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
index b60d5c367e36c6c73a88b207d291a0dd9f5a8272..1b1f0d95e55e1ecae92049f2b12cf4e9102ee40a 100644 (file)
@@ -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