test/configure.in
author Sam Lantinga <slouken@libsdl.org>
Sun, 08 Jan 2012 02:23:37 -0500
changeset 6188 e82023802002
parent 3623 9a73fecd9181
child 6250 cce0ddcf6747
permissions -rw-r--r--
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.
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
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    16
dnl Figure out which math library to use
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1387
diff changeset
    17
case "$host" in
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    18
    *-*-cygwin* | *-*-mingw32*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    19
        EXE=".exe"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    20
        MATHLIB=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    21
        SYS_GL_LIBS="-lopengl32"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    22
        ;;
3292
245a7d79577c Fixed bug #615
Sam Lantinga <slouken@libsdl.org>
parents: 3280
diff changeset
    23
    *-*-beos* | *-*-haiku*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    24
        EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    25
        MATHLIB=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    26
        SYS_GL_LIBS="-lGL"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    27
        ;;
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
    28
    *-*-darwin* )
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    29
        EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    30
        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
    31
        SYS_GL_LIBS="-Wl,-framework,OpenGL"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    32
        ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    33
    *-*-aix*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    34
        EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    35
        if test x$ac_cv_prog_gcc = xyes; then
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    36
            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
    37
        fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    38
        SYS_GL_LIBS=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    39
        ;;
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
    40
    *-*-mint*)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    41
        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
    42
        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
    43
        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
    44
        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
    45
            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
    46
            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
    47
            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
    48
            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
    49
        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
    50
            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
    51
        fi
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    52
        ;;
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    53
    *-*-qnx*)
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    54
        EXE=""
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    55
        MATHLIB=""
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    56
        SYS_GL_LIBS="-lGLES_CM"
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
    57
        ;;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    58
    *)
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    59
        EXE=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    60
        MATHLIB="-lm"
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    61
        SYS_GL_LIBS="-lGL"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    62
        ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    63
esac
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
    64
AC_SUBST(EXE)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    65
AC_SUBST(MATHLIB)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    66
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    67
dnl Check for SDL
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1813
diff changeset
    68
SDL_VERSION=1.3.0
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    69
AM_PATH_SDL($SDL_VERSION,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    70
            :,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    71
	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    72
)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    73
CFLAGS="$CFLAGS $SDL_CFLAGS"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    74
LIBS="$LIBS $SDL_LIBS"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    75
2138
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    76
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
    77
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
    78
if test x$have_x = xyes; then
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    79
    if test x$ac_x_includes = xno || test x$ac_x_includes = x; then
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    80
        :
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    81
    else
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    82
        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
    83
    fi
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    84
    if test x$ac_x_libraries = xno || test x$ac_x_libraries = x; then
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    85
        :
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    86
    else
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    87
        XPATH="-L$ac_x_libraries"
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    88
    fi
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    89
fi
9af6717e676a Merged change from 1.2 to add X11 path for OpenGL detection
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
    90
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    91
dnl Check for OpenGL
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    92
AC_MSG_CHECKING(for OpenGL support)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    93
have_opengl=no
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    94
AC_TRY_COMPILE([
292
eadc0746dfaf Added SDL_LockRect() and SDL_UnlockRect()
Sam Lantinga <slouken@libsdl.org>
parents: 214
diff changeset
    95
 #include "SDL_opengl.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    96
],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    97
],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    98
have_opengl=yes
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    99
])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   100
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
   101
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   102
dnl Check for OpenGL ES
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   103
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
   104
have_opengles=no
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   105
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
   106
 #if defined (__IPHONEOS__)
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   107
    #include <OpenGLES/ES1/gl.h>
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   108
 #else
6188
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   109
    #include <GLES/gl.h>
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   110
 #endif /* __QNXNTO__ */
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   111
],[
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   112
],[
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   113
have_opengles=yes
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   114
])
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   115
AC_MSG_RESULT($have_opengles)
3090
37f9304df6a9 Fixed OpenGL library linking issue
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
   116
6188
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   117
GLLIB=""
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   118
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
   119
    CFLAGS="$CFLAGS -DHAVE_OPENGLES"
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   120
    GLLIB="$XPATH -lGLESv1_CM"
e82023802002 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Sam Lantinga <slouken@libsdl.org>
parents: 3623
diff changeset
   121
elif test x$have_opengl = xyes; then
3090
37f9304df6a9 Fixed OpenGL library linking issue
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
   122
    CFLAGS="$CFLAGS -DHAVE_OPENGL"
37f9304df6a9 Fixed OpenGL library linking issue
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
   123
    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
   124
else
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   125
    GLLIB=""
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   126
fi
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 2138
diff changeset
   127
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
   128
AC_SUBST(GLLIB)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   129
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
   130
dnl Check for SDL_ttf
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
   131
AC_MSG_CHECKING(for SDL_ttf)
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
   132
have_SDL_ttf=no
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
   133
AC_TRY_COMPILE([
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
   134
 #include "SDL_ttf.h"
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
   135
],[
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
   136
],[
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
   137
have_SDL_ttf=yes
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
   138
])
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
   139
AC_MSG_RESULT($have_SDL_ttf)
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
   140
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
   141
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
   142
    CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
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
   143
    SDL_TTF_LIB="-lSDL_ttf"
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
   144
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
   145
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
   146
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
   147
1380
d94b080ff6ce Completely removed dependency on automake
Sam Lantinga <slouken@libsdl.org>
parents: 1367
diff changeset
   148
dnl Finally create all the generated files
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   149
AC_OUTPUT([Makefile])