Wayland: Removed empty statement.
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT([sdlvisualtest], [0.01], [apoorvupreti@gmail.com])
4 dnl Detect the canonical build and host environments
5 AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
12 dnl Check for compiler environment
16 dnl We only care about this for building testnative at the moment, so these
17 dnl values shouldn't be considered absolute truth.
18 dnl (Haiku, for example, sets none of these.)
23 dnl Figure out which math or extra library to use
25 *-*-cygwin* | *-*-mingw32*)
30 SYS_GL_LIBS="-lopengl32"
48 if test x$ac_cv_prog_gcc = xyes; then
59 AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
60 if test "x$OSMESA_CONFIG" = "xyes"; then
61 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
62 OSMESA_LIBS=`$OSMESA_CONFIG --libs`
63 CFLAGS="$CFLAGS $OSMESA_CFLAGS"
64 SYS_GL_LIBS="$OSMESA_LIBS"
66 SYS_GL_LIBS="-lOSMesa"
73 SYS_GL_LIBS="-lGLES_CM"
76 dnl Oh well, call it Unix...
93 AM_PATH_SDL2($SDL_VERSION,
95 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
97 CFLAGS="$CFLAGS $SDL_CFLAGS"
98 LIBS="$LIBS -lSDL2_test $SDL_LIBS $EXTRALIB"
100 dnl Check for X11 path, needed for OpenGL on some systems
102 if test x$have_x = xyes; then
103 if test x$ac_x_includes = xno || test x$ac_x_includes = x; then
106 CFLAGS="$CFLAGS -I$ac_x_includes"
108 if test x$ac_x_libraries = xno || test x$ac_x_libraries = x; then
111 XPATH="-L$ac_x_libraries"
116 AC_MSG_CHECKING(for OpenGL support)
119 #include "SDL_opengl.h"
124 AC_MSG_RESULT($have_opengl)
126 dnl Check for OpenGL ES
127 AC_MSG_CHECKING(for OpenGL ES support)
130 #if defined (__IPHONEOS__)
131 #include <OpenGLES/ES1/gl.h>
134 #endif /* __QNXNTO__ */
139 AC_MSG_RESULT($have_opengles)
142 if test x$have_opengles = xyes; then
143 CFLAGS="$CFLAGS -DHAVE_OPENGLES"
144 GLLIB="$XPATH -lGLESv1_CM"
145 elif test x$have_opengl = xyes; then
146 CFLAGS="$CFLAGS -DHAVE_OPENGL"
147 GLLIB="$XPATH $SYS_GL_LIBS"
154 dnl Check for SDL_ttf
155 AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
156 if test x$have_SDL_ttf = xyes; then
157 CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
158 SDL_TTF_LIB="-lSDL2_ttf"
160 AC_SUBST(SDL_TTF_LIB)
162 dnl Finally create all the generated files
163 dnl AC_OUTPUT([Makefile])
164 AC_CONFIG_HEADERS([config.h])
165 AC_CONFIG_FILES([Makefile])