visualtest/configure.in
author Ryan C. Gordon <icculus@icculus.org>
Fri, 12 Aug 2016 19:59:00 -0400
changeset 10266 c09f06c4e8c8
parent 7981 6d538bc1b395
permissions -rwxr-xr-x
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:
7924
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
dnl Process this file with autoconf to produce a configure script.
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
AC_INIT([sdlvisualtest], [0.01], [apoorvupreti@gmail.com])
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
dnl Detect the canonical build and host environments
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
AC_CANONICAL_HOST
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
dnl Check for tools
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
AC_PROG_CC
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
dnl Check for compiler environment
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
AC_C_CONST
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
dnl We only care about this for building testnative at the moment, so these
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
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: 7924
diff changeset
    18
dnl  (Haiku, for example, sets none of these.)
7924
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
ISUNIX="false"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
ISWINDOWS="false"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
ISMACOSX="false"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
dnl Figure out which math or extra library to use
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
case "$host" in
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
    *-*-cygwin* | *-*-mingw32*)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
        ISWINDOWS="true"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
        EXE=".exe"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
        MATHLIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
        EXTRALIB="-lshlwapi"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
        SYS_GL_LIBS="-lopengl32"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
        ;;
7981
6d538bc1b395 Renamed things named after BeOS to be named after Haiku instead.
Ryan C. Gordon <icculus@icculus.org>
parents: 7924
diff changeset
    32
    *-*-haiku*)
7924
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
        EXE=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
        MATHLIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
        EXTRALIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
        SYS_GL_LIBS="-lGL"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
        ;;
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
    *-*-darwin* )
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
        ISMACOSX="true"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
        EXE=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
        MATHLIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
        EXTRALIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
        ;;
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
    *-*-aix*)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
        ISUNIX="true"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
        EXE=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
        if test x$ac_cv_prog_gcc = xyes; then
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
            CFLAGS="-mthreads"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
        fi
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
        MATHLIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
        EXTRALIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
        SYS_GL_LIBS=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
        ;;
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
    *-*-mint*)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    56
        EXE=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    57
        MATHLIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    58
        EXTRALIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    59
        AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    60
        if test "x$OSMESA_CONFIG" = "xyes"; then
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    61
            OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    62
            OSMESA_LIBS=`$OSMESA_CONFIG --libs`
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
            CFLAGS="$CFLAGS $OSMESA_CFLAGS"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
            SYS_GL_LIBS="$OSMESA_LIBS"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
        else
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
            SYS_GL_LIBS="-lOSMesa"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
        fi
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
        ;;
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
    *-*-qnx*)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    70
        EXE=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    71
        MATHLIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    72
        EXTRALIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
        SYS_GL_LIBS="-lGLES_CM"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    74
        ;;
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    75
    *)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    76
        dnl Oh well, call it Unix...
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    77
        ISUNIX="true"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    78
        EXE=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    79
        MATHLIB="-lm"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    80
        EXTRALIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    81
        SYS_GL_LIBS="-lGL"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
        ;;
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    83
esac
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    84
AC_SUBST(EXE)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    85
AC_SUBST(MATHLIB)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    86
AC_SUBST(EXTRALIB)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    87
AC_SUBST(ISMACOSX)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    88
AC_SUBST(ISWINDOWS)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    89
AC_SUBST(ISUNIX)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    90
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
dnl Check for SDL
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    92
SDL_VERSION=2.0.0
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    93
AM_PATH_SDL2($SDL_VERSION,
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    94
            :,
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    96
)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    97
CFLAGS="$CFLAGS $SDL_CFLAGS"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    98
LIBS="$LIBS -lSDL2_test $SDL_LIBS $EXTRALIB"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    99
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
dnl Check for X11 path, needed for OpenGL on some systems
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   101
AC_PATH_X
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
if test x$have_x = xyes; then
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
    if test x$ac_x_includes = xno || test x$ac_x_includes = x; then
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
        :
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   105
    else
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   106
        CFLAGS="$CFLAGS -I$ac_x_includes"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   107
    fi
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   108
    if test x$ac_x_libraries = xno || test x$ac_x_libraries = x; then
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   109
        :
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   110
    else
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   111
        XPATH="-L$ac_x_libraries"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   112
    fi
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   113
fi
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   114
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   115
dnl Check for OpenGL
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   116
AC_MSG_CHECKING(for OpenGL support)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   117
have_opengl=no
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   118
AC_TRY_COMPILE([
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   119
 #include "SDL_opengl.h"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   120
],[
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   121
],[
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   122
have_opengl=yes
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   123
])
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   124
AC_MSG_RESULT($have_opengl)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   125
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   126
dnl Check for OpenGL ES
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   127
AC_MSG_CHECKING(for OpenGL ES support)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   128
have_opengles=no
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   129
AC_TRY_COMPILE([
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   130
 #if defined (__IPHONEOS__)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   131
    #include <OpenGLES/ES1/gl.h>
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   132
 #else
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   133
    #include <GLES/gl.h>
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   134
 #endif /* __QNXNTO__ */
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   135
],[
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   136
],[
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   137
have_opengles=yes
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   138
])
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   139
AC_MSG_RESULT($have_opengles)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   140
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   141
GLLIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   142
if test x$have_opengles = xyes; then
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   143
    CFLAGS="$CFLAGS -DHAVE_OPENGLES"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   144
    GLLIB="$XPATH -lGLESv1_CM"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   145
elif test x$have_opengl = xyes; then
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   146
    CFLAGS="$CFLAGS -DHAVE_OPENGL"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   147
    GLLIB="$XPATH $SYS_GL_LIBS"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   148
else
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   149
    GLLIB=""
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   150
fi
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   151
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   152
AC_SUBST(GLLIB)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   153
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   154
dnl Check for SDL_ttf
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   155
AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   156
if test x$have_SDL_ttf = xyes; then
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   157
    CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   158
    SDL_TTF_LIB="-lSDL2_ttf"
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   159
fi
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   160
AC_SUBST(SDL_TTF_LIB)
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   161
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   162
dnl Finally create all the generated files
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   163
dnl AC_OUTPUT([Makefile])
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   164
AC_CONFIG_HEADERS([config.h])
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   165
AC_CONFIG_FILES([Makefile])
fcb86d323770 Added Apoorv Upreti's GSoC2013 work: visual test suite.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   166
AC_OUTPUT()