]> git.sesse.net Git - movit/blob - configure.ac
Fix an issue where -std=gnu++11 would become the only flag.
[movit] / configure.ac
1 AC_CONFIG_MACRO_DIR([m4])
2 AC_INIT(movit, git)
3 LT_INIT
4 PKG_PROG_PKG_CONFIG
5
6 AC_CONFIG_SRCDIR(effect.cpp)
7 AC_CONFIG_AUX_DIR(.)
8
9 AC_PROG_CC
10 AC_PROG_CXX
11 PKG_CHECK_MODULES([Eigen3], [eigen3])
12 PKG_CHECK_MODULES([epoxy], [epoxy])
13 PKG_CHECK_MODULES([FFTW3], [fftw3])
14
15 CXXFLAGS="$CXXFLAGS -std=gnu++11"
16
17 # Needed for unit tests and the demo app.
18 with_demo_app=yes
19 PKG_CHECK_MODULES([SDL2], [sdl2])
20
21 # This is only needed for the demo app.
22 PKG_CHECK_MODULES([SDL2_image], [SDL2_image], [], [with_demo_app=no; AC_MSG_WARN([SDL2_image not found, demo program will not be built])])
23 PKG_CHECK_MODULES([libpng], [libpng], [], [with_demo_app=no; AC_MSG_WARN([libpng not found, demo program will not be built])])
24
25 # This is only needed for microbenchmarks, so optional.
26 PKG_CHECK_MODULES([benchmark], [benchmark], [with_benchmark=yes], [with_benchmark=no; AC_MSG_WARN([Google microbenchmark framework not found, microbenchmarks will not be built])])
27
28 AC_SUBST([with_demo_app])
29 AC_SUBST([with_benchmark])
30
31 with_coverage=no
32 AC_ARG_ENABLE([coverage], [  --enable-coverage       build with information needed to compute test coverage], [with_coverage=yes])
33 AC_SUBST([with_coverage])
34
35 AC_CONFIG_FILES([Makefile movit.pc])
36 AC_OUTPUT