[vlc-commits] text_renderer: remove Makefile recursion

Rémi Denis-Courmont git at videolan.org
Mon Feb 9 19:46:43 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb  9 20:40:46 2015 +0200| [cf84ed937a1dd4dfdd430c492709758d8339f8d3] | committer: Rémi Denis-Courmont

text_renderer: remove Makefile recursion

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

 configure.ac                      |   37 ++++++++++++++-----------------
 modules/Makefile.am               |    2 +-
 modules/text_renderer/.gitignore  |    1 -
 modules/text_renderer/Makefile.am |   44 +++++++++++++++++++++++++++++++++++++
 modules/text_renderer/Modules.am  |    7 ------
 5 files changed, 61 insertions(+), 30 deletions(-)

diff --git a/configure.ac b/configure.ac
index 007b99f..198183e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -516,7 +516,6 @@ AS_IF([test "${SYS}" = "mingw32"],[
     vlc_winstore_app=1
      VLC_ADD_LIBS([libvlccore], [-lole32 -lruntimeobject])
     ],[
-     VLC_ADD_LIBS([win32text],[-lgdi32])
      VLC_ADD_LIBS([libvlccore],[-lwinmm])
     ])
   ])
@@ -700,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 a52tofloat32 dtstofloat32 x264 goom noise grain scene chorus_flanger freetype swscale postproc equalizer spatializer param_eq samplerate freetype mpc qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v mono colorthres extract ball hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum smooth],[-lm])
+  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom noise grain scene chorus_flanger swscale postproc equalizer spatializer param_eq samplerate mpc qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v mono colorthres extract ball hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum smooth],[-lm])
   LIBM="-lm"
 ], [
   LIBM=""
@@ -3154,15 +3153,15 @@ AC_ARG_WITH([default-monospace-font-family],
         [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FAMILY],
             "$withval", [Default monospace font family])])
 
+have_freetype="no"
+have_fontconfig="no"
+have_fribidi="no"
+
 if test "${enable_freetype}" != "no"; then
    PKG_CHECK_MODULES(FREETYPE, freetype2, [
-      have_freetype=yes
-      VLC_ADD_PLUGIN([freetype])
-      VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
-      if test "${SYS}" = "mingw32"; then
-        VLC_ADD_LIBS([freetype],[-liconv -lz])
-      fi
-      VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
+      have_freetype="yes"
+      VLC_ADD_CPPFLAGS([skins2],[${FREETYPE_CFLAGS}])
+      VLC_ADD_LIBS([skins2],[${FREETYPE_LIBS}])
 
       AC_CHECK_HEADERS(Carbon/Carbon.h,
                        [VLC_ADD_LIBS([freetype],[-Wl,-framework,Carbon])])
@@ -3171,32 +3170,30 @@ if test "${enable_freetype}" != "no"; then
       if test "${SYS}" != "mingw32"; then
           if test "${enable_fontconfig}" != "no"; then
             AC_CHECK_HEADERS(fontconfig/fontconfig.h, [
-              VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
-              VLC_ADD_LIBS([freetype],[-lfontconfig])
+              have_fontconfig="yes"
             ],[AC_MSG_WARN([library fontconfig not found. Styles will be disabled in freetype])])
           fi
-      else
-          AS_IF([test "$vlc_winstore_app" != "1"],[
-            VLC_ADD_LIBS([freetype],[-lgdi32])
-          ])
       fi
 
       dnl fribidi support
       if test "${enable_fribidi}" != "no"; then
         PKG_CHECK_MODULES(FRIBIDI, fribidi, [
-          VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
-          VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
+          have_fribidi="yes"
+          VLC_ADD_CPPFLAGS([skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
+          VLC_ADD_LIBS([skins2], [${FRIBIDI_LIBS}])
         ],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional support will be disabled in FreeType.])])
       fi
-
   ],[
-  have_freetype=no
   AS_IF([test -n "${enable_freetype}"],[
     AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
     ])
   ])
 fi
 
+AM_CONDITIONAL([HAVE_FREETYPE], [test "${have_freetype}" = "yes"])
+AM_CONDITIONAL([HAVE_FONTCONFIG], [test "${have_fontconfig}" = "yes"])
+AM_CONDITIONAL([HAVE_FRIBIDI], [test "${have_fribidi}" = "yes"])
+
 
 dnl
 dnl  QuartzText vout module (iOS/Mac OS)
@@ -3207,7 +3204,6 @@ if test "x${enable_macosx_quartztext}" != "xno" &&
   (test "${SYS}" = "darwin" || test "${enable_macosx_quartztext}" = "yes")
 then
   VLC_ADD_PLUGIN([quartztext])
-  VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices])
 fi
 
 dnl
@@ -4151,7 +4147,6 @@ AC_CONFIG_FILES([
   modules/gui/skins2/Makefile
   modules/mux/Makefile
   modules/stream_out/Makefile
-  modules/text_renderer/Makefile
   modules/video_filter/Makefile
   modules/visualization/Makefile
   modules/hw/mmal/Makefile
diff --git a/modules/Makefile.am b/modules/Makefile.am
index 5aa6b23..46feda1 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -7,7 +7,6 @@ BASE_SUBDIRS = \
 	audio_filter \
 	control \
 	gui \
-	text_renderer \
 	video_filter \
 	visualization
 EXTRA_SUBDIRS = \
@@ -48,6 +47,7 @@ include notify/Makefile.am
 include packetizer/Makefile.am
 include services_discovery/Makefile.am
 include stream_filter/Makefile.am
+include text_renderer/Makefile.am
 include video_chroma/Makefile.am
 include video_splitter/Makefile.am
 include video_output/Makefile.am
diff --git a/modules/text_renderer/.gitignore b/modules/text_renderer/.gitignore
deleted file mode 100644
index 08a6d72..0000000
--- a/modules/text_renderer/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.am
diff --git a/modules/text_renderer/Makefile.am b/modules/text_renderer/Makefile.am
new file mode 100644
index 0000000..1b258cc
--- /dev/null
+++ b/modules/text_renderer/Makefile.am
@@ -0,0 +1,44 @@
+textdir = $(pluginsdir)/text_render
+
+libtdummy_plugin_la_SOURCES = text_renderer/tdummy.c
+text_LTLIBRARIES = libtdummy_plugin.la
+
+libfreetype_plugin_la_SOURCES = \
+	text_renderer/text_renderer.c text_renderer/text_renderer.h \
+	text_renderer/platform_fonts.c text_renderer/platform_fonts.h \
+	text_renderer/freetype.c
+libfreetype_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(FREETYPE_CFLAGS)
+libfreetype_plugin_la_LIBADD = $(LIBM) $(FREETYPE_LIBS)
+if HAVE_FREETYPE
+text_LTLIBRARIES += libfreetype_plugin.la
+endif
+if HAVE_FONTCONFIG
+libfreetype_plugin_la_CPPFLAGS += -DHAVE_FONTCONFIG
+libfreetype_plugin_la_LIBADD += -lfontconfig
+endif
+if HAVE_FRIBIDI
+libfreetype_plugin_la_CPPFLAGS += $(FRIBIDI_CFLAGS) -DHAVE_FRIBIDI
+libfreetype_plugin_la_LIBADD += $(FRIBIDI_LIBS)
+endif
+
+libquartztext_plugin_la_SOURCES = text_renderer/quartztext.c
+libquartztext_plugin_la_LDFLAGS = $(AM_LFLFAGS) \
+	-Wl,-framework,ApplicationServices
+EXTRA_LTLIBRARIES += libquartztext_plugin.la
+text_LTLIBRARIES += $(LTLIBquartztext)
+
+libsvg_plugin_la_SOURCES = text_renderer/svg.c
+libsvg_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(SVG_CFLAGS)
+libsvg_plugin_la_LIBADD = $(SVG_LIBS)
+EXTRA_LTLIBRARIES += libsvg_plugin.la
+text_LTLIBRARIES += $(LTLIBsvg)
+
+libwin32text_plugin_la_SOURCES = text_renderer/win32text.c
+libwin32text_plugin_la_LIBADD = -lgdi32
+if HAVE_WIN32
+libfreetype_plugin_la_LIBADD += -liconv -lz
+if !HAVE_WINSTORE
+libfreetype_plugin_la_LIBADD += -lgdi32
+text_LTLIBRARIES += libwin32text_plugin.la
+endif
+endif
diff --git a/modules/text_renderer/Modules.am b/modules/text_renderer/Modules.am
deleted file mode 100644
index dee601b..0000000
--- a/modules/text_renderer/Modules.am
+++ /dev/null
@@ -1,7 +0,0 @@
-SOURCES_freetype = freetype.c text_renderer.c text_renderer.h platform_fonts.c platform_fonts.h
-SOURCES_quartztext = quartztext.c
-SOURCES_svg = svg.c
-SOURCES_tdummy = tdummy.c
-SOURCES_win32text = win32text.c
-
-text_renderer_LTLIBRARIES += libtdummy_plugin.la



More information about the vlc-commits mailing list