test/configure.in
author Ryan C. Gordon <icculus@icculus.org>
Fri, 12 Aug 2016 19:59:00 -0400
changeset 10266 c09f06c4e8c8
parent 9278 8900afb78a19
permissions -rw-r--r--
emscripten: send fake mouse events for touches, like other targets do. (This really should be handled at the higher level and not in the individual targets, but this fixes the immediate bug.)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     1
dnl Process this file with autoconf to produce a configure script.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     2
AC_INIT(README)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     3
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1387
diff changeset
     4
dnl Detect the canonical build and host environments
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
     5
AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1387
diff changeset
     6
AC_CANONICAL_HOST
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     7
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     8
dnl Check for tools
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     9
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    10
AC_PROG_CC
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    11
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    12
dnl Check for compiler environment
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    13
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    14
AC_C_CONST
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    15
6390
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    16
dnl We only care about this for building testnative at the moment, so these
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    17
dnl  values shouldn't be considered absolute truth.
7981
6d538bc1b395 Renamed things named after BeOS to be named after Haiku instead.
Ryan C. Gordon <icculus@icculus.org>
parents: 7828
diff changeset
    18
dnl  (Haiku, for example, sets none of these.)
6390
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    19
ISUNIX="false"
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    20
ISWINDOWS="false"
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    21
ISMACOSX="false"
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    22
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    23
dnl Figure out which math library to use
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1387
diff changeset
    24
case "$host" in
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    25
    *-*-cygwin* | *-*-mingw32*)
6390
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    26
        ISWINDOWS="true"
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    27
        EXE=".exe"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    28
        MATHLIB=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    29
        SYS_GL_LIBS="-lopengl32"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    30
        ;;
7981
6d538bc1b395 Renamed things named after BeOS to be named after Haiku instead.
Ryan C. Gordon <icculus@icculus.org>
parents: 7828
diff changeset
    31
    *-*-haiku*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    32
        EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    33
        MATHLIB=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    34
        SYS_GL_LIBS="-lGL"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    35
        ;;
991
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    36
    *-*-darwin* )
6390
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    37
        ISMACOSX="true"
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    38
        EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    39
        MATHLIB=""
3623
9a73fecd9181 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
Ryan C. Gordon <icculus@icculus.org>
parents: 3622
diff changeset
    40
        SYS_GL_LIBS="-Wl,-framework,OpenGL"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    41
        ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    42
    *-*-aix*)
6390
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    43
        ISUNIX="true"
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    44
        EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    45
        if test x$ac_cv_prog_gcc = xyes; then
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    46
            CFLAGS="-mthreads"
978
3b1ba22f5a28 Add support for OpenGL on Atari using OSMesa, the offscreen rendering driver from Mesa
Patrice Mandin <patmandin@gmail.com>
parents: 796
diff changeset
    47
        fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    48
        SYS_GL_LIBS=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    49
        ;;
991
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    50
    *-*-mint*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    51
        EXE=""
991
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    52
        MATHLIB=""
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    53
        AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    54
        if test "x$OSMESA_CONFIG" = "xyes"; then
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    55
            OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    56
            OSMESA_LIBS=`$OSMESA_CONFIG --libs`
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    57
            CFLAGS="$CFLAGS $OSMESA_CFLAGS"
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    58
            SYS_GL_LIBS="$OSMESA_LIBS"
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    59
        else
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    60
            SYS_GL_LIBS="-lOSMesa"
12b13601a544 Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
Patrice Mandin <patmandin@gmail.com>
parents: 981
diff changeset
    61
        fi
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    62
        ;;
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    63
    *-*-qnx*)
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    64
        EXE=""
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    65
        MATHLIB=""
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    66
        SYS_GL_LIBS="-lGLES_CM"
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    67
        ;;
9278
8900afb78a19 Initial merge of Emscripten port!
Ryan C. Gordon <icculus@icculus.org>
parents: 8021
diff changeset
    68
    *-*-emscripten* )
8900afb78a19 Initial merge of Emscripten port!
Ryan C. Gordon <icculus@icculus.org>
parents: 8021
diff changeset
    69
        dnl This should really be .js, but we need to specify extra flags when compiling to js
8900afb78a19 Initial merge of Emscripten port!
Ryan C. Gordon <icculus@icculus.org>
parents: 8021
diff changeset
    70
        EXE=".bc"
8900afb78a19 Initial merge of Emscripten port!
Ryan C. Gordon <icculus@icculus.org>
parents: 8021
diff changeset
    71
        MATHLIB=""
8900afb78a19 Initial merge of Emscripten port!
Ryan C. Gordon <icculus@icculus.org>
parents: 8021
diff changeset
    72
        SYS_GL_LIBS=""
8900afb78a19 Initial merge of Emscripten port!
Ryan C. Gordon <icculus@icculus.org>
parents: 8021
diff changeset
    73
        ;;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    74
    *)
6390
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    75
        dnl Oh well, call it Unix...
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    76
        ISUNIX="true"
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    77
        EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    78
        MATHLIB="-lm"
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    79
        SYS_GL_LIBS="-lGL"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    80
        ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    81
esac
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    82
AC_SUBST(EXE)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    83
AC_SUBST(MATHLIB)
6390
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    84
AC_SUBST(ISMACOSX)
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    85
AC_SUBST(ISWINDOWS)
3047baa4a5e0 Nasty attempt to fix building of testnative across various platforms.
Ryan C. Gordon <icculus@icculus.org>
parents: 6272
diff changeset
    86
AC_SUBST(ISUNIX)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    87
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    88
dnl Check for SDL
6250
cce0ddcf6747 Updated to SDL 2.0, and SDL 2.0 can now be installed coexisting with SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 6188
diff changeset
    89
SDL_VERSION=2.0.0
6272
f3dbef2cc0f2 Switched the SDL 2 autoconf macro to AM_PATH_SDL2
Sam Lantinga <slouken@libsdl.org>
parents: 6250
diff changeset
    90
AM_PATH_SDL2($SDL_VERSION,
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    91
            :,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    92
	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    93
)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    94
CFLAGS="$CFLAGS $SDL_CFLAGS"
7828
1451063c8ecd Fixed building using MinGW
Sam Lantinga <slouken@libsdl.org>
parents: 7794
diff changeset
    95
LIBS="$LIBS -lSDL2_test $SDL_LIBS"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    96
2138
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    97
dnl Check for X11 path, needed for OpenGL on some systems
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    98
AC_PATH_X
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    99
if test x$have_x = xyes; then
7794
7995e0920bf9 Fixes testgles and testgl
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7704
diff changeset
   100
    if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then
2138
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   101
        :
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   102
    else
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   103
        CFLAGS="$CFLAGS -I$ac_x_includes"
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   104
    fi
7703
982abfefd19d Fixes test building
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7495
diff changeset
   105
    if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
2138
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   106
        :
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   107
    else
7704
3182291fc65f [Linux] Test config script: Add the X11 library search path if it is not empty
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7703
diff changeset
   108
        if test "x$ac_x_libraries" = x; then
7794
7995e0920bf9 Fixes testgles and testgl
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7704
diff changeset
   109
            XPATH=""
7704
3182291fc65f [Linux] Test config script: Add the X11 library search path if it is not empty
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7703
diff changeset
   110
            XLIB="-lX11"
3182291fc65f [Linux] Test config script: Add the X11 library search path if it is not empty
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7703
diff changeset
   111
        else
7794
7995e0920bf9 Fixes testgles and testgl
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7704
diff changeset
   112
            XPATH="-L$ac_x_libraries"
7704
3182291fc65f [Linux] Test config script: Add the X11 library search path if it is not empty
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7703
diff changeset
   113
            XLIB="-L$ac_x_libraries -lX11"
3182291fc65f [Linux] Test config script: Add the X11 library search path if it is not empty
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7703
diff changeset
   114
        fi
2138
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   115
    fi
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   116
fi
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
   117
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   118
dnl Check for OpenGL
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   119
AC_MSG_CHECKING(for OpenGL support)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   120
have_opengl=no
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   121
AC_TRY_COMPILE([
292
eadc0746dfaf Added SDL_LockRect() and SDL_UnlockRect()
Sam Lantinga <slouken@libsdl.org>
parents: 214
diff changeset
   122
 #include "SDL_opengl.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   123
],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   124
],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   125
have_opengl=yes
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   126
])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   127
AC_MSG_RESULT($have_opengl)
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   128
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   129
dnl Check for OpenGL ES
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   130
AC_MSG_CHECKING(for OpenGL ES support)
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   131
have_opengles=no
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   132
AC_TRY_COMPILE([
6188
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   133
 #if defined (__IPHONEOS__)
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   134
    #include <OpenGLES/ES1/gl.h>
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   135
 #else
6188
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   136
    #include <GLES/gl.h>
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   137
 #endif /* __QNXNTO__ */
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   138
],[
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   139
],[
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   140
have_opengles=yes
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   141
])
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   142
AC_MSG_RESULT($have_opengles)
3090
37f9304df6a9 Fixed OpenGL library linking issue
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
   143
8014
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   144
dnl Check for OpenGL ES2
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   145
AC_MSG_CHECKING(for OpenGL ES2 support)
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   146
have_opengles2=no
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   147
AC_TRY_COMPILE([
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   148
 #if defined (__IPHONEOS__)
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   149
    #include <OpenGLES/ES2/gl.h>
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   150
    #include <OpenGLES/ES2/glext.h>
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   151
 #else
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   152
    #include <GLES2/gl2.h>
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   153
    #include <GLES2/gl2ext.h>
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   154
 #endif
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   155
],[
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   156
],[
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   157
have_opengles2=yes
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   158
])
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   159
AC_MSG_RESULT($have_opengles2)
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   160
6188
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   161
GLLIB=""
7794
7995e0920bf9 Fixes testgles and testgl
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7704
diff changeset
   162
GLESLIB=""
8014
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   163
GLES2LIB=""
6188
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   164
if test x$have_opengles = xyes; then
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   165
    CFLAGS="$CFLAGS -DHAVE_OPENGLES"
7794
7995e0920bf9 Fixes testgles and testgl
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7704
diff changeset
   166
    GLESLIB="$XPATH -lGLESv1_CM"
7995e0920bf9 Fixes testgles and testgl
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7704
diff changeset
   167
fi
8014
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   168
if test x$have_opengles2 = xyes; then
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   169
    CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
8021
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents: 8014
diff changeset
   170
    #GLES2LIB="$XPATH -lGLESv2"
8014
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   171
fi
7794
7995e0920bf9 Fixes testgles and testgl
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7704
diff changeset
   172
if test x$have_opengl = xyes; then
3090
37f9304df6a9 Fixed OpenGL library linking issue
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
   173
    CFLAGS="$CFLAGS -DHAVE_OPENGL"
37f9304df6a9 Fixed OpenGL library linking issue
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
   174
    GLLIB="$XPATH $SYS_GL_LIBS"
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   175
fi
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   176
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
   177
AC_SUBST(GLLIB)
7794
7995e0920bf9 Fixes testgles and testgl
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7704
diff changeset
   178
AC_SUBST(GLESLIB)
8014
0a4b6dec7de5 Adds testgles2
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7981
diff changeset
   179
AC_SUBST(GLES2LIB)
7495
c4ba5e5c2765 Fixed bug 1973 - test/Makefile.in fails on Mac OS X with X11 enabled...
Sam Lantinga <slouken@libsdl.org>
parents: 6785
diff changeset
   180
AC_SUBST(XLIB)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   181
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3090
diff changeset
   182
dnl Check for SDL_ttf
6598
81d643a61b54 Fixed check for SDL_ttf with SDL 2.0
Sam Lantinga <slouken@libsdl.org>
parents: 6390
diff changeset
   183
AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3090
diff changeset
   184
if test x$have_SDL_ttf = xyes; then
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3090
diff changeset
   185
    CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
6598
81d643a61b54 Fixed check for SDL_ttf with SDL 2.0
Sam Lantinga <slouken@libsdl.org>
parents: 6390
diff changeset
   186
    SDL_TTF_LIB="-lSDL2_ttf"
3280
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3090
diff changeset
   187
fi
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3090
diff changeset
   188
AC_SUBST(SDL_TTF_LIB)
00cace2d9080 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents: 3090
diff changeset
   189
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
   190
dnl Finally create all the generated files
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   191
AC_OUTPUT([Makefile])