SDL-mirror/test/configure.ac

201 lines
4.4 KiB
Text
Raw Normal View History

dnl Process this file with autoconf to produce a configure script.
AC_INIT(README)
dnl Detect the canonical build and host environments
AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
AC_CANONICAL_HOST
dnl Check for tools
AC_PROG_CC
dnl Check for compiler environment
AC_C_CONST
dnl We only care about this for building testnative at the moment, so these
dnl values shouldn't be considered absolute truth.
Renamed things named after BeOS to be named after Haiku instead. --HG-- rename : src/audio/baudio/SDL_beaudio.cc => src/audio/haiku/SDL_haikuaudio.cc rename : src/audio/baudio/SDL_beaudio.h => src/audio/haiku/SDL_haikuaudio.h rename : src/filesystem/beos/SDL_sysfilesystem.cc => src/filesystem/haiku/SDL_sysfilesystem.cc rename : src/joystick/beos/SDL_bejoystick.cc => src/joystick/haiku/SDL_haikujoystick.cc rename : src/loadso/beos/SDL_sysloadso.c => src/loadso/haiku/SDL_sysloadso.c rename : src/main/beos/SDL_BApp.h => src/main/haiku/SDL_BApp.h rename : src/main/beos/SDL_BeApp.cc => src/main/haiku/SDL_BeApp.cc rename : src/main/beos/SDL_BeApp.h => src/main/haiku/SDL_BeApp.h rename : src/power/beos/SDL_syspower.c => src/power/haiku/SDL_syspower.c rename : src/timer/beos/SDL_systimer.c => src/timer/haiku/SDL_systimer.c rename : src/video/bwindow/SDL_BWin.h => src/video/haiku/SDL_BWin.h rename : src/video/bwindow/SDL_bclipboard.cc => src/video/haiku/SDL_bclipboard.cc rename : src/video/bwindow/SDL_bclipboard.h => src/video/haiku/SDL_bclipboard.h rename : src/video/bwindow/SDL_bevents.cc => src/video/haiku/SDL_bevents.cc rename : src/video/bwindow/SDL_bevents.h => src/video/haiku/SDL_bevents.h rename : src/video/bwindow/SDL_bframebuffer.cc => src/video/haiku/SDL_bframebuffer.cc rename : src/video/bwindow/SDL_bframebuffer.h => src/video/haiku/SDL_bframebuffer.h rename : src/video/bwindow/SDL_bkeyboard.cc => src/video/haiku/SDL_bkeyboard.cc rename : src/video/bwindow/SDL_bkeyboard.h => src/video/haiku/SDL_bkeyboard.h rename : src/video/bwindow/SDL_bmodes.cc => src/video/haiku/SDL_bmodes.cc rename : src/video/bwindow/SDL_bmodes.h => src/video/haiku/SDL_bmodes.h rename : src/video/bwindow/SDL_bopengl.cc => src/video/haiku/SDL_bopengl.cc rename : src/video/bwindow/SDL_bopengl.h => src/video/haiku/SDL_bopengl.h rename : src/video/bwindow/SDL_bvideo.cc => src/video/haiku/SDL_bvideo.cc rename : src/video/bwindow/SDL_bvideo.h => src/video/haiku/SDL_bvideo.h rename : src/video/bwindow/SDL_bwindow.cc => src/video/haiku/SDL_bwindow.cc rename : src/video/bwindow/SDL_bwindow.h => src/video/haiku/SDL_bwindow.h extra : rebase_source : afd5a42647878e283dbee3a666cef2214f0e7941
2013-11-14 11:51:24 -05:00
dnl (Haiku, for example, sets none of these.)
ISUNIX="false"
ISWINDOWS="false"
ISMACOSX="false"
dnl Figure out which math library to use
case "$host" in
*-*-cygwin* | *-*-mingw32*)
ISWINDOWS="true"
EXE=".exe"
MATHLIB=""
SYS_GL_LIBS="-lopengl32"
;;
Renamed things named after BeOS to be named after Haiku instead. --HG-- rename : src/audio/baudio/SDL_beaudio.cc => src/audio/haiku/SDL_haikuaudio.cc rename : src/audio/baudio/SDL_beaudio.h => src/audio/haiku/SDL_haikuaudio.h rename : src/filesystem/beos/SDL_sysfilesystem.cc => src/filesystem/haiku/SDL_sysfilesystem.cc rename : src/joystick/beos/SDL_bejoystick.cc => src/joystick/haiku/SDL_haikujoystick.cc rename : src/loadso/beos/SDL_sysloadso.c => src/loadso/haiku/SDL_sysloadso.c rename : src/main/beos/SDL_BApp.h => src/main/haiku/SDL_BApp.h rename : src/main/beos/SDL_BeApp.cc => src/main/haiku/SDL_BeApp.cc rename : src/main/beos/SDL_BeApp.h => src/main/haiku/SDL_BeApp.h rename : src/power/beos/SDL_syspower.c => src/power/haiku/SDL_syspower.c rename : src/timer/beos/SDL_systimer.c => src/timer/haiku/SDL_systimer.c rename : src/video/bwindow/SDL_BWin.h => src/video/haiku/SDL_BWin.h rename : src/video/bwindow/SDL_bclipboard.cc => src/video/haiku/SDL_bclipboard.cc rename : src/video/bwindow/SDL_bclipboard.h => src/video/haiku/SDL_bclipboard.h rename : src/video/bwindow/SDL_bevents.cc => src/video/haiku/SDL_bevents.cc rename : src/video/bwindow/SDL_bevents.h => src/video/haiku/SDL_bevents.h rename : src/video/bwindow/SDL_bframebuffer.cc => src/video/haiku/SDL_bframebuffer.cc rename : src/video/bwindow/SDL_bframebuffer.h => src/video/haiku/SDL_bframebuffer.h rename : src/video/bwindow/SDL_bkeyboard.cc => src/video/haiku/SDL_bkeyboard.cc rename : src/video/bwindow/SDL_bkeyboard.h => src/video/haiku/SDL_bkeyboard.h rename : src/video/bwindow/SDL_bmodes.cc => src/video/haiku/SDL_bmodes.cc rename : src/video/bwindow/SDL_bmodes.h => src/video/haiku/SDL_bmodes.h rename : src/video/bwindow/SDL_bopengl.cc => src/video/haiku/SDL_bopengl.cc rename : src/video/bwindow/SDL_bopengl.h => src/video/haiku/SDL_bopengl.h rename : src/video/bwindow/SDL_bvideo.cc => src/video/haiku/SDL_bvideo.cc rename : src/video/bwindow/SDL_bvideo.h => src/video/haiku/SDL_bvideo.h rename : src/video/bwindow/SDL_bwindow.cc => src/video/haiku/SDL_bwindow.cc rename : src/video/bwindow/SDL_bwindow.h => src/video/haiku/SDL_bwindow.h extra : rebase_source : afd5a42647878e283dbee3a666cef2214f0e7941
2013-11-14 11:51:24 -05:00
*-*-haiku*)
EXE=""
MATHLIB=""
SYS_GL_LIBS="-lGL"
;;
*-*-darwin* )
ISMACOSX="true"
EXE=""
MATHLIB=""
SYS_GL_LIBS="-Wl,-framework,OpenGL"
;;
*-*-aix*)
ISUNIX="true"
EXE=""
if test x$ac_cv_prog_gcc = xyes; then
CFLAGS="-mthreads"
fi
SYS_GL_LIBS=""
;;
*-*-mint*)
EXE=""
MATHLIB=""
AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
if test "x$OSMESA_CONFIG" = "xyes"; then
OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
OSMESA_LIBS=`$OSMESA_CONFIG --libs`
CFLAGS="$CFLAGS $OSMESA_CFLAGS"
SYS_GL_LIBS="$OSMESA_LIBS"
else
SYS_GL_LIBS="-lOSMesa"
fi
;;
*-*-qnx*)
EXE=""
MATHLIB=""
SYS_GL_LIBS="-lGLES_CM"
;;
*-*-emscripten* )
dnl This should really be .js, but we need to specify extra flags when compiling to js
EXE=".bc"
MATHLIB=""
SYS_GL_LIBS=""
;;
*)
dnl Oh well, call it Unix...
ISUNIX="true"
EXE=""
MATHLIB="-lm"
SYS_GL_LIBS="-lGL"
;;
esac
AC_SUBST(EXE)
AC_SUBST(MATHLIB)
AC_SUBST(ISMACOSX)
AC_SUBST(ISWINDOWS)
AC_SUBST(ISUNIX)
dnl Check for SDL
SDL_VERSION=2.0.0
AM_PATH_SDL2($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS -lSDL2_test $SDL_LIBS"
dnl Check for X11 path, needed for OpenGL on some systems
AC_PATH_X
if test x$have_x = xyes; then
2013-10-09 11:30:01 -03:00
if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then
:
else
CFLAGS="$CFLAGS -I$ac_x_includes"
fi
2013-08-28 10:41:25 -03:00
if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
:
else
if test "x$ac_x_libraries" = x; then
2013-10-09 11:30:01 -03:00
XPATH=""
XLIB="-lX11"
else
2013-10-09 11:30:01 -03:00
XPATH="-L$ac_x_libraries"
XLIB="-L$ac_x_libraries -lX11"
fi
fi
fi
dnl Check for OpenGL
AC_MSG_CHECKING(for OpenGL support)
have_opengl=no
AC_TRY_COMPILE([
#include "SDL_opengl.h"
],[
],[
have_opengl=yes
])
AC_MSG_RESULT($have_opengl)
dnl Check for OpenGL ES
AC_MSG_CHECKING(for OpenGL ES support)
have_opengles=no
AC_TRY_COMPILE([
Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11 Scott Percival 2011-07-03 06:41:51 PDT This submission is aimed at making life easier for OpenGL ES capable devices running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not running Android). SDL's Pandora support already has the neccesary GLES-to-X11 glue code, however it's all ghetto'd off in Makefile.pandora and not very flexible. The patch: - adds an awesome --enable-video-opengles option to configure - re-modifies the opengles and opengles2 SDL_renderers to use function pointers - no idea why this was removed? - for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or libGLESv2 at runtime - links in libEGL.so at runtime - the old code made an assumption that eglFunctions could be pulled from the active GLES library, PowerVR for one doesn't let you do that with their libGLESv2 - allows you to pick which of GLES v1 or v2 to load via SDL_GL_CONTEXT_MAJOR_VERSION So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well, everything that isn't those two, such as a Pandora, iOS or Android device. The Pandora specific code should be kept intact (fingers crossed), and nothing painfully drastic has been added to the SDL_renderers. The library loading sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's propensity to let developers get away with murder and PowerVR's alternative of punishing every missed step. The test apps work okay with GLES or GLES2 as the renderer. For some reason alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out a new set of X11 GLES drivers, so I'll try and investigate once I upgrade those. Also, this patch adds things to configure.in, include/SDL_config.h.in and test/configure.in. I didn't know what the policy was re. committing generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry. I think that's about everything, let me know if there's anything I've overlooked.
2012-01-08 02:23:37 -05:00
#if defined (__IPHONEOS__)
#include <OpenGLES/ES1/gl.h>
#else
Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11 Scott Percival 2011-07-03 06:41:51 PDT This submission is aimed at making life easier for OpenGL ES capable devices running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not running Android). SDL's Pandora support already has the neccesary GLES-to-X11 glue code, however it's all ghetto'd off in Makefile.pandora and not very flexible. The patch: - adds an awesome --enable-video-opengles option to configure - re-modifies the opengles and opengles2 SDL_renderers to use function pointers - no idea why this was removed? - for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or libGLESv2 at runtime - links in libEGL.so at runtime - the old code made an assumption that eglFunctions could be pulled from the active GLES library, PowerVR for one doesn't let you do that with their libGLESv2 - allows you to pick which of GLES v1 or v2 to load via SDL_GL_CONTEXT_MAJOR_VERSION So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well, everything that isn't those two, such as a Pandora, iOS or Android device. The Pandora specific code should be kept intact (fingers crossed), and nothing painfully drastic has been added to the SDL_renderers. The library loading sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's propensity to let developers get away with murder and PowerVR's alternative of punishing every missed step. The test apps work okay with GLES or GLES2 as the renderer. For some reason alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out a new set of X11 GLES drivers, so I'll try and investigate once I upgrade those. Also, this patch adds things to configure.in, include/SDL_config.h.in and test/configure.in. I didn't know what the policy was re. committing generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry. I think that's about everything, let me know if there's anything I've overlooked.
2012-01-08 02:23:37 -05:00
#include <GLES/gl.h>
#endif /* __QNXNTO__ */
],[
],[
have_opengles=yes
])
AC_MSG_RESULT($have_opengles)
dnl Check for OpenGL ES2
AC_MSG_CHECKING(for OpenGL ES2 support)
have_opengles2=no
AC_TRY_COMPILE([
#if defined (__IPHONEOS__)
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif
],[
],[
have_opengles2=yes
])
AC_MSG_RESULT($have_opengles2)
Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11 Scott Percival 2011-07-03 06:41:51 PDT This submission is aimed at making life easier for OpenGL ES capable devices running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not running Android). SDL's Pandora support already has the neccesary GLES-to-X11 glue code, however it's all ghetto'd off in Makefile.pandora and not very flexible. The patch: - adds an awesome --enable-video-opengles option to configure - re-modifies the opengles and opengles2 SDL_renderers to use function pointers - no idea why this was removed? - for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or libGLESv2 at runtime - links in libEGL.so at runtime - the old code made an assumption that eglFunctions could be pulled from the active GLES library, PowerVR for one doesn't let you do that with their libGLESv2 - allows you to pick which of GLES v1 or v2 to load via SDL_GL_CONTEXT_MAJOR_VERSION So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well, everything that isn't those two, such as a Pandora, iOS or Android device. The Pandora specific code should be kept intact (fingers crossed), and nothing painfully drastic has been added to the SDL_renderers. The library loading sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's propensity to let developers get away with murder and PowerVR's alternative of punishing every missed step. The test apps work okay with GLES or GLES2 as the renderer. For some reason alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out a new set of X11 GLES drivers, so I'll try and investigate once I upgrade those. Also, this patch adds things to configure.in, include/SDL_config.h.in and test/configure.in. I didn't know what the policy was re. committing generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry. I think that's about everything, let me know if there's anything I've overlooked.
2012-01-08 02:23:37 -05:00
GLLIB=""
2013-10-09 11:30:01 -03:00
GLESLIB=""
GLES2LIB=""
OPENGLES1_TARGETS="UNUSED"
OPENGLES2_TARGETS="UNUSED"
OPENGL_TARGETS="UNUSED"
Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11 Scott Percival 2011-07-03 06:41:51 PDT This submission is aimed at making life easier for OpenGL ES capable devices running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not running Android). SDL's Pandora support already has the neccesary GLES-to-X11 glue code, however it's all ghetto'd off in Makefile.pandora and not very flexible. The patch: - adds an awesome --enable-video-opengles option to configure - re-modifies the opengles and opengles2 SDL_renderers to use function pointers - no idea why this was removed? - for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or libGLESv2 at runtime - links in libEGL.so at runtime - the old code made an assumption that eglFunctions could be pulled from the active GLES library, PowerVR for one doesn't let you do that with their libGLESv2 - allows you to pick which of GLES v1 or v2 to load via SDL_GL_CONTEXT_MAJOR_VERSION So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well, everything that isn't those two, such as a Pandora, iOS or Android device. The Pandora specific code should be kept intact (fingers crossed), and nothing painfully drastic has been added to the SDL_renderers. The library loading sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's propensity to let developers get away with murder and PowerVR's alternative of punishing every missed step. The test apps work okay with GLES or GLES2 as the renderer. For some reason alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out a new set of X11 GLES drivers, so I'll try and investigate once I upgrade those. Also, this patch adds things to configure.in, include/SDL_config.h.in and test/configure.in. I didn't know what the policy was re. committing generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry. I think that's about everything, let me know if there's anything I've overlooked.
2012-01-08 02:23:37 -05:00
if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
2013-10-09 11:30:01 -03:00
GLESLIB="$XPATH -lGLESv1_CM"
OPENGLES1_TARGETS="TARGETS"
2013-10-09 11:30:01 -03:00
fi
if test x$have_opengles2 = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
2013-11-22 13:24:53 -03:00
#GLES2LIB="$XPATH -lGLESv2"
OPENGLES2_TARGETS="TARGETS"
fi
2013-10-09 11:30:01 -03:00
if test x$have_opengl = xyes; then
Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11 Scott Percival 2011-07-03 06:41:51 PDT This submission is aimed at making life easier for OpenGL ES capable devices running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not running Android). SDL's Pandora support already has the neccesary GLES-to-X11 glue code, however it's all ghetto'd off in Makefile.pandora and not very flexible. The patch: - adds an awesome --enable-video-opengles option to configure - re-modifies the opengles and opengles2 SDL_renderers to use function pointers - no idea why this was removed? - for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or libGLESv2 at runtime - links in libEGL.so at runtime - the old code made an assumption that eglFunctions could be pulled from the active GLES library, PowerVR for one doesn't let you do that with their libGLESv2 - allows you to pick which of GLES v1 or v2 to load via SDL_GL_CONTEXT_MAJOR_VERSION So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well, everything that isn't those two, such as a Pandora, iOS or Android device. The Pandora specific code should be kept intact (fingers crossed), and nothing painfully drastic has been added to the SDL_renderers. The library loading sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's propensity to let developers get away with murder and PowerVR's alternative of punishing every missed step. The test apps work okay with GLES or GLES2 as the renderer. For some reason alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out a new set of X11 GLES drivers, so I'll try and investigate once I upgrade those. Also, this patch adds things to configure.in, include/SDL_config.h.in and test/configure.in. I didn't know what the policy was re. committing generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry. I think that's about everything, let me know if there's anything I've overlooked.
2012-01-08 02:23:37 -05:00
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"
OPENGL_TARGETS="TARGETS"
fi
AC_SUBST(OPENGLES1_TARGETS)
AC_SUBST(OPENGLES2_TARGETS)
AC_SUBST(OPENGL_TARGETS)
AC_SUBST(GLLIB)
2013-10-09 11:30:01 -03:00
AC_SUBST(GLESLIB)
AC_SUBST(GLES2LIB)
AC_SUBST(XLIB)
dnl Check for SDL_ttf
2012-10-23 15:28:27 -07:00
AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
if test x$have_SDL_ttf = xyes; then
CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
2012-10-23 15:28:27 -07:00
SDL_TTF_LIB="-lSDL2_ttf"
fi
AC_SUBST(SDL_TTF_LIB)
dnl Finally create all the generated files
AC_OUTPUT([Makefile])