diff --git a/.travis.yml b/.travis.yml index 2b127a867c..64107affd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ before_install: # TODO: test different combinations of flags, --enable-sdl, --enable-qt, etc script: - - ./configure --enable-sdl --prefix=$PWD/local && make -j8 && make install # build from checkout - - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure --enable-sdl --prefix=$PWD/dist_install && make -j8 && make install # build from dist + - ./configure --enable-sdl --enable-ftgl --prefix=$PWD/local && make -j8 && make install # build from checkout + - make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure --enable-sdl --enable-ftgl --prefix=$PWD/dist_install && make -j8 && make install # build from dist - echo "PWD $PWD" - ls . - test -e src/projectM-sdl/projectMSDL @@ -56,7 +56,7 @@ matrix: - os: osx osx_image: xcode8 env: - - MATRIX_EVAL="brew update && brew install sdl2" + - MATRIX_EVAL="brew update && brew install sdl2 && brew install ftgl" notifications: email: diff --git a/configure.ac b/configure.ac index e1bfd1c7c5..3fe6ac2b95 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,15 @@ AS_IF([test "x$enable_sdl" = "xyes"], [ AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) ]) +dnl FTGL +AC_ARG_ENABLE([ftgl], + AS_HELP_STRING([--enable-ftgl], [FTGL support to display text such as preset title, stats, fps, ...]), + [], [enable_ftgl=no]) +AS_IF([test "x$enable_ftgl" = "xyes"], [ + PKG_CHECK_MODULES(FTGL, [ftgl], [], [AC_MSG_ERROR([libftgl is required.])]) + AC_DEFINE([USE_FTGL], [1], [Define USE_FTGL]) +]) + dnl from https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable answer: https://stackoverflow.com/a/30960268 dnl ptomato https://stackoverflow.com/users/172999/ptomato AC_SUBST([PACKAGE]) @@ -118,4 +127,5 @@ Applications: libprojectM: yes SDL: ${enable_sdl} Qt & Pulseaudio: ${enable_qt} +FTGL: ${enable_ftgl} ]) diff --git a/src/libprojectM/Common.hpp b/src/libprojectM/Common.hpp index 8bf484e6bc..368d03fad7 100755 --- a/src/libprojectM/Common.hpp +++ b/src/libprojectM/Common.hpp @@ -30,6 +30,7 @@ #include #include #include +#include "config.h" #ifdef _MSC_sVER #define strcasecmp(s, t) _strcmpi(s, t) #endif diff --git a/src/libprojectM/Makefile.am b/src/libprojectM/Makefile.am index 0cdc7dc2a0..8da9745e1c 100644 --- a/src/libprojectM/Makefile.am +++ b/src/libprojectM/Makefile.am @@ -4,10 +4,11 @@ CLEANFILES= SUBDIRS=Renderer NativePresetFactory MilkdropPresetFactory AM_CPPFLAGS = \ --include $(top_builddir)/config.h \ --DSYSCONFDIR=\""$(sysconfdir)"\" \ --I$(top_srcdir)/src/libprojectM \ --I$(top_srcdir)/src/libprojectM/Renderer + -include $(top_builddir)/config.h \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -I$(top_srcdir)/src/libprojectM \ + -I$(top_srcdir)/src/libprojectM/Renderer \ + ${FTGL_CFLAGS} # system headers/libraries/data to install include_HEADERS = projectM.hpp diff --git a/src/libprojectM/Renderer/Makefile.am b/src/libprojectM/Renderer/Makefile.am index e6ba436881..c6868b7f26 100644 --- a/src/libprojectM/Renderer/Makefile.am +++ b/src/libprojectM/Renderer/Makefile.am @@ -41,4 +41,9 @@ libRenderer_la_SOURCES = \ libRenderer_la_CPPFLAGS = ${my_CFLAGS} \ --I$(top_srcdir)/src/libprojectM + -I$(top_srcdir)/src/libprojectM \ + ${FTGL_CFLAGS} + + +libRenderer_la_LDFLAGS = \ + ${FTGL_LIBS}