Skip to content

Commit e234792

Browse files
committed
make building SDL app optional, off by default. just build libprojectM by default
1 parent 58269b0 commit e234792

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

configure.ac

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,22 @@ LT_INIT
77
AC_PROG_CXX
88

99
AC_CONFIG_MACRO_DIRS([m4 m4/autoconf-archive])
10-
m4_include([m4/sdl2.m4])
1110
AX_CHECK_GL
1211

1312
AC_CHECK_LIB(c, dlopen, LIBDL="", AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl"))
1413

15-
dnl Check for SDL
16-
SDL_VERSION=2.0.5
17-
AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care
18-
AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_WARN([*** SDL version $SDL_VERSION not found!]))
14+
dnl SDL
15+
AC_ARG_ENABLE([sdl],
16+
AS_HELP_STRING([--enable-sdl], [Build SDL2 app]),
17+
[], [enable_sdl=no])
18+
AS_IF([test "x$enable_sdl" = "xyes"], [
19+
m4_include([m4/sdl2.m4])
20+
SDL_VERSION=2.0.5
21+
AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care
22+
AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
23+
])
1924

2025
AC_CONFIG_HEADERS([config.h])
21-
2226
AC_CONFIG_FILES([
2327
Makefile
2428
src/Makefile
@@ -28,22 +32,14 @@ AC_CONFIG_FILES([
2832
src/libprojectM/MilkdropPresetFactory/Makefile
2933
src/projectM-sdl/Makefile
3034
])
35+
dnl FIXME
3136
AC_CONFIG_FILES([src/libprojectM/config.inp], [sed -i -e"s/\${prefix}/$prefix/" src/libprojectM/config.inp])
3237

3338
AC_PREFIX_DEFAULT([/usr/local])
3439

3540
AC_PROG_MKDIR_P
3641

37-
my_CFLAGS="\
38-
-Wall \
39-
-Wchar-subscripts \
40-
-Wformat-security \
41-
-Wmissing-declarations \
42-
-Wpointer-arith \
43-
-Wshadow \
44-
-Wsign-compare \
45-
-Wtype-limits \
46-
"
42+
my_CFLAGS="-Wall -Wchar-subscripts -Wformat-security -Wmissing-declarations -Wpointer-arith -Wshadow -Wsign-compare -Wtype-limits "
4743
AC_SUBST([my_CFLAGS])
4844

4945
# check OS
@@ -78,4 +74,10 @@ includedir: ${includedir}
7874
compiler: ${CC}
7975
cflags: ${CFLAGS}
8076
ldflags: ${LDFLAGS}
77+
78+
79+
Applications:
80+
=====
81+
82+
SDL: ${enable_sdl}
8183
])

0 commit comments

Comments
 (0)