-
-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: qt / jack / pulseaudio (#163)
Major updates to Makefiles, please report any build time issues! Adding/updating makefiles for Qt, Jack, and Pulseadio implementations * detect if we have libpulseaudio, libsdl2, and qt5 and if so just enable them automatically without the user having to. * jack support, travis build with pa/jack/qt * pass config opts * test * test * test * don't always enable sdl * better libsdl2 detection * hopefully fixed qt/pulse/jack makefiles * oops * travis * fix jack subdir * jack fixup * jack makefile * libsdl 1 for jack * jack builds yay (qt version) * testqt * readme * let's always build test * let's always build test * sdl2 for travis build test * qt is required for jack/pulse
- Loading branch information
Showing
12 changed files
with
194 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AC_INIT([projectM], [3.1.0], [[email protected]], [projectM], [https://github.com/revmischa/projectm]) | ||
AC_INIT([projectM], [3.1.1], [[email protected]], [projectM], [https://github.com/projectM-visualizer/projectm/]) | ||
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects tar-pax]) | ||
|
||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) | ||
|
@@ -72,27 +72,40 @@ AC_CONFIG_FILES([ | |
src/projectM-emscripten/Makefile | ||
src/projectM-qt/Makefile | ||
src/projectM-pulseaudio/Makefile | ||
src/projectM-jack/Makefile | ||
src/projectM-test/Makefile | ||
]) | ||
]) | ||
|
||
dnl SDL | ||
AC_ARG_ENABLE([sdl], | ||
AS_HELP_STRING([--enable-sdl], [Build SDL2 app]), | ||
[], [enable_sdl=no]) | ||
AS_IF([test "x$enable_sdl" = "xyes"], [ | ||
m4_include([m4/sdl2.m4]) | ||
SDL_VERSION=2.0.5 | ||
AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care | ||
AS_IF([test "EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care | ||
AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) | ||
|
||
# SDL | ||
AC_ARG_ENABLE([sdl], AS_HELP_STRING([--enable-sdl], [Build SDL2 application]), [], [enable_sdl=check]) | ||
AS_IF([test "$enable_sdl" != "no"], [ | ||
PKG_CHECK_MODULES([SDL], [sdl2], [ | ||
m4_include([m4/sdl2.m4]) | ||
SDL_VERSION="2.0.5" | ||
AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care | ||
AS_IF([test "$EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care | ||
# Check for libSDL >= $SDL_VERSION | ||
AM_PATH_SDL2($SDL_VERSION, | ||
[enable_sdl=yes], | ||
[AS_IF([test "$enable_sdl" = "yes"], AC_MSG_ERROR([*** SDL version >= $SDL_VERSION not found!])); enable_sdl=no]) | ||
], | ||
[ | ||
# not found | ||
AS_IF([test "$enable_sdl" = "yes"], AC_MSG_ERROR([*** libsdl2 not found!])) | ||
enable_sdl=no | ||
]) | ||
]) | ||
|
||
dnl glm | ||
|
||
# glm | ||
AS_IF([test "x$enable_emscripten" != "xyes"], [ | ||
AC_CHECK_HEADER([glm/glm.hpp],, AC_MSG_ERROR(libglm is required.)) | ||
]) | ||
|
||
dnl Threading | ||
|
||
# Threading | ||
AC_ARG_ENABLE([threading], | ||
AS_HELP_STRING([--enable-threading], [multhreading]), | ||
[], [enable_threading=yes]) | ||
|
@@ -133,32 +146,82 @@ AX_CHECK_COMPILE_FLAG([-std=c++11], [ | |
CXXFLAGS="$CXXFLAGS -std=c++11"]) | ||
|
||
dnl Qt | ||
AC_ARG_ENABLE([qt], | ||
AS_HELP_STRING([--enable-qt], [Build Qt]), | ||
[], [enable_qt=no]) | ||
AS_IF([test "x$enable_qt" = "xyes"], [ | ||
PKG_CHECK_MODULES(QT, [Qt5Core, Qt5Gui, Qt5Widgets Qt5OpenGL], [], [AC_MSG_ERROR([Qt libraries are required.])]) | ||
qt_CPPFLAGS="`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $CPPFLAGS" | ||
qt_LDFLAGS="`$PKG_CONFIG --libs-only-L Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LDFLAGS" | ||
qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" | ||
if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then | ||
AC_MSG_ERROR([Qt >= 5.0.0 is required. Try installing qtdeclarative5-dev]) | ||
fi | ||
AC_CHECK_PROGS(MOC, [moc-qt5 moc]) | ||
AC_CHECK_PROGS(UIC, [uic-qt5 uic]) | ||
AC_CHECK_PROGS(RCC, [rcc-qt5 rcc]) | ||
if test -z "$MOC" || test -z "$UIC" || test -z "$RCC"; then | ||
AC_MSG_ERROR([Qt utility programs moc, uic, and rcc are required.]) | ||
fi | ||
PKG_CHECK_MODULES(LIBPULSE, [libpulse], [], [AC_MSG_ERROR([Pulseaudio library libpulse is required.])]) | ||
]) | ||
|
||
AM_CONDITIONAL([ENABLE_SDL], [test "$enable_sdl" = yes]) | ||
AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" = yes]) | ||
AM_CONDITIONAL([ENABLE_EMSCRIPTEN], [test "$enable_emscripten" = yes]) | ||
AC_ARG_ENABLE([qt], AS_HELP_STRING([--enable-qt], [Enable Qt: needed for pulseaudio and jack GUIs]), [], [enable_qt=check]) | ||
AS_IF([test "$enable_qt" != "no"], | ||
[PKG_CHECK_MODULES([qt], | ||
[Qt5Core, Qt5Gui, Qt5Widgets Qt5OpenGL], | ||
[ | ||
enable_qt=yes | ||
# do more checks for Qt version and tools | ||
qt_CPPFLAGS="`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $CPPFLAGS" | ||
qt_LDFLAGS="`$PKG_CONFIG --libs-only-L Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LDFLAGS" | ||
qt_LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL` $LIBS" | ||
AC_SUBST(qt_CPPFLAGS) | ||
AC_SUBST(qt_LDFLAGS) | ||
AC_SUBST(qt_LIBS) | ||
if ! `$PKG_CONFIG --atleast-version=5.0.0 Qt5Core`; then | ||
AC_MSG_WARN([Qt >= 5.0.0 is required. Try installing libqt5opengl5-dev qtdeclarative5-dev]) | ||
enable_qt=no | ||
fi | ||
AC_CHECK_PROGS(MOC, [moc-qt5 moc]) | ||
AC_CHECK_PROGS(UIC, [uic-qt5 uic]) | ||
AC_CHECK_PROGS(RCC, [rcc-qt5 rcc]) | ||
if test -z "$MOC" || test -z "$UIC" || test -z "$RCC"; then | ||
AC_MSG_WARN([Qt utility programs moc, uic, and rcc are required.]) | ||
enable_qt=no | ||
fi | ||
MOC="$MOC -qt=5" | ||
UIC="$UIC -qt=5" | ||
RCC="$RCC -qt=5" | ||
export QT_SELECT=qt5 | ||
], | ||
[AS_IF([test "$enable_qt" = "yes"], | ||
[AC_MSG_ERROR(["Qt5 not found"])], | ||
[enable_qt=no])] | ||
)]) | ||
|
||
|
||
# Pulseaudio | ||
AC_ARG_ENABLE([pulseaudio], AS_HELP_STRING([--enable-pulseaudio], [Build Pulseaudio]), [], [enable_pulseaudio=check]) | ||
AS_IF([test "$enable_pulseaudio" != "no"], | ||
[PKG_CHECK_MODULES([libpulse], | ||
[libpulse], | ||
[ | ||
# still need qt | ||
AS_IF([test "$enable_qt" = "yes"], | ||
[enable_pulseaudio=yes], | ||
[enable_pulseaudio="Qt required"]) | ||
], | ||
[AS_IF([test "$enable_pulseaudio" = "yes"], | ||
[AC_MSG_ERROR([libpulse required, but not found.])], | ||
[enable_pulseaudio=no])])]) | ||
|
||
|
||
# Jack | ||
AC_ARG_ENABLE([jack], AS_HELP_STRING([--enable-jack], [Build Jack]), [], [enable_jack=check]) | ||
AS_IF([test "$enable_jack" != "no"], | ||
[PKG_CHECK_MODULES([jack], | ||
[jack], | ||
[ | ||
# still need qt | ||
AS_IF([test "$enable_qt" = "yes"], | ||
[enable_jack=yes], | ||
[enable_jack="Qt required"]) | ||
], | ||
[AS_IF([test "$enable_jack" = "yes"], | ||
[AC_MSG_ERROR([jack required, but not found.])], | ||
[enable_jack=no])])]) | ||
|
||
|
||
AM_CONDITIONAL([ENABLE_SDL], [test "x$enable_sdl" = "xyes"]) | ||
AM_CONDITIONAL([ENABLE_QT], [test "x$enable_qt" = "xyes"]) | ||
AM_CONDITIONAL([ENABLE_JACK], [test "x$enable_jack" = "xyes"]) | ||
AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test "x$enable_pulseaudio" = "xyes"]) | ||
AM_CONDITIONAL([ENABLE_EMSCRIPTEN], [test "x$enable_emscripten" = "xyes"]) | ||
|
||
|
||
my_CFLAGS="-Wall -Wchar-subscripts -Wformat-security -Wpointer-arith -Wshadow -Wsign-compare -Wtype-limits " | ||
|
@@ -192,7 +255,9 @@ Applications: | |
libprojectM: yes | ||
Threading: ${enable_threading} | ||
SDL: ${enable_sdl} | ||
Qt & Pulseaudio: ${enable_qt} | ||
Qt: ${enable_qt} | ||
Pulseaudio: ${enable_pulseaudio} | ||
Jack: ${enable_jack} | ||
OpenGLES: ${enable_gles} | ||
Emscripten: ${enable_emscripten} | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
if ENABLE_SDL | ||
PROJECTM_SDL_SUBDIR = projectM-sdl projectM-test | ||
PROJECTM_SDL_SUBDIR = projectM-test projectM-sdl | ||
endif | ||
|
||
if ENABLE_QT | ||
PROJECTM_QT_SUBDIR = projectM-qt projectM-pulseaudio | ||
PROJECTM_QT_SUBDIR = projectM-qt | ||
endif | ||
|
||
if ENABLE_PULSEAUDIO | ||
PROJECTM_PULSEAUDIO_SUBDIR = projectM-qt projectM-pulseaudio | ||
endif | ||
|
||
if ENABLE_JACK | ||
PROJECTM_JACK_SUBDIR = projectM-qt projectM-jack | ||
endif | ||
|
||
if ENABLE_EMSCRIPTEN | ||
PROJECTM_EMSCRIPTEN_SUBDIR = projectM-emscripten | ||
endif | ||
|
||
SUBDIRS=libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} | ||
|
||
# system headers/libraries/data to install | ||
# for compatibility reasons here as nobase_include | ||
nobase_include_HEADERS = libprojectM/projectM.hpp libprojectM/Common.hpp libprojectM/dlldefs.h libprojectM/event.h libprojectM/fatal.h libprojectM/PCM.hpp | ||
|
||
SUBDIRS = libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
AM_CPPFLAGS = \ | ||
${my_CFLAGS} \ | ||
-include $(top_builddir)/config.h \ | ||
-DSYSCONFDIR=\""$(sysconfdir)"\" \ | ||
-DPROJECTM_PREFIX=\""${prefix}"\" \ | ||
-DRESOURCE_PREFIX=\""share/projectM"\" \ | ||
-I${top_srcdir}/src/libprojectM \ | ||
-I${top_srcdir}/src/libprojectM/Renderer \ | ||
-I${top_srcdir}/src/projectM-qt \ | ||
${jack_CFLAGS} \ | ||
${qt_CPPFLAGS} \ | ||
-fPIC \ | ||
${qt_CFLAGS} | ||
|
||
# TODO: add remote control if we have qxt network lib | ||
# if QT_NETWORK_ENABLED | ||
# EXTRA_SRCS = HTTPRemoteControl.cpp | ||
# endif | ||
|
||
|
||
# TODO: build qprojectM-jack and projectM-jack as separate programs | ||
|
||
bin_PROGRAMS = projectM_jack | ||
projectM_jack_SOURCES = qprojectM-jack.cpp ConfigFile.cpp ${EXTRA_SRCS} | ||
projectM_jack_LDADD = \ | ||
../projectM-qt/libprojectM_qt.a \ | ||
${jack_LIBS} \ | ||
${qt_LIBS} \ | ||
../libprojectM/libprojectM.la \ | ||
-lSDL | ||
projectM_jack_LDFLAGS = -static -fPIC ${qt_LDFLAGS} | ||
projectM_jack_PROGRAM = projectM-jack | ||
|
||
dist_man_MANS = projectM-jack.1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.