OVR: Make Benson (control panel) closer to oberver
[mercenary-reloaded.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script
2 AC_INIT([mercenary-reloaded],
3         m4_esyscmd([./git-version-gen .tarball-version]),
4         [jolly@eversberg.eu])
5
6 AM_INIT_AUTOMAKE([dist-bzip2])
7
8 AC_CONFIG_MACRO_DIR([m4])
9
10 dnl kernel style compile messages
11 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
12
13 dnl checks for programs
14 AC_PROG_MAKE_SET
15 AC_PROG_CC
16 AC_PROG_CXX
17 AC_PROG_INSTALL
18 LT_INIT
19
20 dnl checks for header files
21 AC_HEADER_STDC
22
23 dnl Checks for typedefs, structures and compiler characteristics
24
25 AC_CANONICAL_HOST
26
27 AC_CHECK_LIB([m], [main])
28 AC_CHECK_LIB([pthread], [main])
29
30 build_linux=no
31 build_windows=no
32 case "${host_os}" in
33         linux*)
34                 build_linux=yes
35                 ;;
36         mingw*)
37                 build_windows=yes
38                 ;;
39         *)
40                 AC_MSG_ERROR(["OS $host_os is not suppored"])
41                 ;;
42 esac
43 AM_CONDITIONAL(WINDOWS, test "x$build_windows" == "xyes" )
44
45 # NOTE GLEW IS INCLUDED IN THIS PROJECT
46
47 AC_ARG_WITH([sdl2], [AS_HELP_STRING([--with-sdl2], [compile with SDL2 library @<:@default=check@:>@]) ], [], [with_sdl2="check"])
48 #AC_ARG_WITH([glew], [AS_HELP_STRING([--with-glew], [compile with GLEW library @<:@default=check@:>@]) ], [], [with_glew="check"])
49 AC_ARG_WITH([ovr], [AS_HELP_STRING([--with-ovr], [compile with LibOVR library @<:@default=no@:>@]) ], [], [with_ovr="check"])
50 AS_IF([test "x$with_sdl2" != xno], [PKG_CHECK_MODULES([SDL2], sdl2 >= 2.0, with_sdl2=yes, with_sdl2=no)])
51 #AS_IF([test "x$with_glew" != xno], [PKG_CHECK_MODULES([GLEW], glew >= 1.13, with_glew=yes, with_glew=no)])
52 AM_CONDITIONAL(HAVE_SDL2, test "x$with_sdl2" == "xyes" )
53 #AM_CONDITIONAL(HAVE_GLEW, test "x$with_glew" == "xyes" )
54 AM_CONDITIONAL(HAVE_OVR, test "x$with_ovr" == "xyes" )
55 AS_IF([test "x$with_sdl2" == "xyes"],[AC_MSG_NOTICE( Compiling with SDL2 support )], [AC_MSG_NOTICE( [ SDL2 not supported.
56       
57 Consider adjusting the PKG_CONFIG_PATH environment variable, if you installed software in a non-standard prefix.
58
59 ***********************************************************************
60 NOTE: This package is mandatory. The games will not compile without it!
61 ***********************************************************************
62 ] )])
63 #AS_IF([test "x$with_glew" == "xyes"],[AC_MSG_NOTICE( Compiling with GLEW support )], [AC_MSG_NOTICE( [GLEW not supported.
64 #
65 #Consider adjusting the PKG_CONFIG_PATH environment variable, if you installed software in a non-standard prefix.
66 #
67 #***********************************************************************
68 #NOTE: This package is mandatory. The games will not compile without it!
69 #***********************************************************************
70 #] )])
71 AS_IF([test "x$with_ovr" == "xyes"],[AC_MSG_NOTICE( Compiling with OVR support )], [AC_MSG_NOTICE( [OVR not supported.] )])
72
73 AC_OUTPUT(
74     include/Makefile
75     src/libcpu/Makefile
76     src/libframerate/Makefile
77     src/libvideo/Makefile
78     src/libsound/Makefile
79     src/libjoystick/Makefile
80     src/libkeyboard/Makefile
81     src/libdisk/Makefile
82     src/libsdl/Makefile
83     src/libopengl/Makefile
84     src/libglew/Makefile
85     src/libovr/Makefile
86     src/libtext/Makefile
87     src/mercenary/Makefile
88     src/Makefile
89     Makefile)
90
91