make building SDL app optional, off by default. just build libprojectM by default

This commit is contained in:
Mischa Spiegelmock
2018-03-12 13:38:47 -07:00
parent 58269b04d3
commit e234792c91

View File

@ -7,18 +7,22 @@ LT_INIT
AC_PROG_CXX
AC_CONFIG_MACRO_DIRS([m4 m4/autoconf-archive])
m4_include([m4/sdl2.m4])
AX_CHECK_GL
AC_CHECK_LIB(c, dlopen, LIBDL="", AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl"))
dnl Check for SDL
SDL_VERSION=2.0.5
AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care
AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_WARN([*** SDL version $SDL_VERSION not found!]))
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
AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
@ -28,22 +32,14 @@ AC_CONFIG_FILES([
src/libprojectM/MilkdropPresetFactory/Makefile
src/projectM-sdl/Makefile
])
dnl FIXME
AC_CONFIG_FILES([src/libprojectM/config.inp], [sed -i -e"s/\${prefix}/$prefix/" src/libprojectM/config.inp])
AC_PREFIX_DEFAULT([/usr/local])
AC_PROG_MKDIR_P
my_CFLAGS="\
-Wall \
-Wchar-subscripts \
-Wformat-security \
-Wmissing-declarations \
-Wpointer-arith \
-Wshadow \
-Wsign-compare \
-Wtype-limits \
"
my_CFLAGS="-Wall -Wchar-subscripts -Wformat-security -Wmissing-declarations -Wpointer-arith -Wshadow -Wsign-compare -Wtype-limits "
AC_SUBST([my_CFLAGS])
# check OS
@ -78,4 +74,10 @@ includedir: ${includedir}
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
Applications:
=====
SDL: ${enable_sdl}
])