test/configure.in
author Sam Lantinga <slouken@libsdl.org>
Tue, 09 May 2006 07:26:58 +0000
changeset 1790 828a17e05192
parent 1550 31c2b8e4885e
child 1654 0a53c90a37f9
child 1813 a7cda692b681
permissions -rw-r--r--
Date: Mon, 8 May 2006 14:19:30 -0700
From: Bob Ippolito
Subject: SDL trunk (r2346) and Mac OS X

The current state of the trunk doesn't quite compile on Mac OS X,
I've attached a series of patches that gets it to compile and kills a
few warnings.

sdl-trunk-r2346-dlcompat-warnings.diff:
The dlcompat thing is just loaded with incorrect type signatures ..
some of them have changed since 10.2 and others are just flat wrong.
This puts it in sync with the latest headers. People on 10.2 will get
the warnings instead of people with new kits.
     1 dnl Process this file with autoconf to produce a configure script.
     2 AC_INIT(README)
     3 
     4 dnl Detect the canonical build and host environments
     5 AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
     6 AC_CANONICAL_HOST
     7 
     8 dnl Check for tools
     9 
    10 AC_PROG_CC
    11 
    12 dnl Check for compiler environment
    13 
    14 AC_C_CONST
    15 
    16 dnl Figure out which math library to use
    17 case "$host" in
    18     *-*-cygwin* | *-*-mingw32*)
    19         EXE=".exe"
    20         MATHLIB=""
    21         SYS_GL_LIBS="-lopengl32"
    22         ;;
    23     *-*-beos*)
    24         EXE=""
    25         MATHLIB=""
    26         SYS_GL_LIBS="-lGL"
    27         ;;
    28     *-*-darwin* )
    29         EXE=""
    30         MATHLIB=""
    31         SYS_GL_LIBS=""
    32         ;;
    33     *-*-aix*)
    34         EXE=""
    35         if test x$ac_cv_prog_gcc = xyes; then
    36             CFLAGS="-mthreads"
    37         fi
    38         SYS_GL_LIBS=""
    39         ;;
    40     *-*-mint*)
    41         EXE=""
    42         MATHLIB=""
    43         AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
    44         if test "x$OSMESA_CONFIG" = "xyes"; then
    45             OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
    46             OSMESA_LIBS=`$OSMESA_CONFIG --libs`
    47             CFLAGS="$CFLAGS $OSMESA_CFLAGS"
    48             SYS_GL_LIBS="$OSMESA_LIBS"
    49         else
    50             SYS_GL_LIBS="-lOSMesa"
    51         fi
    52 		;;
    53     *)
    54         EXE=""
    55         MATHLIB="-lm"
    56         SYS_GL_LIBS="-lGL"
    57         ;;
    58 esac
    59 AC_SUBST(EXE)
    60 AC_SUBST(MATHLIB)
    61 
    62 dnl Check for SDL
    63 SDL_VERSION=1.2.10
    64 AM_PATH_SDL($SDL_VERSION,
    65             :,
    66 	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    67 )
    68 CFLAGS="$CFLAGS $SDL_CFLAGS"
    69 LIBS="$LIBS $SDL_LIBS"
    70 
    71 dnl Check for OpenGL
    72 AC_MSG_CHECKING(for OpenGL support)
    73 have_opengl=no
    74 AC_TRY_COMPILE([
    75  #include "SDL_opengl.h"
    76 ],[
    77 ],[
    78 have_opengl=yes
    79 ])
    80 AC_MSG_RESULT($have_opengl)
    81 if test x$have_opengl = xyes; then
    82     CFLAGS="$CFLAGS -DHAVE_OPENGL"
    83     GLLIB="$SYS_GL_LIBS"
    84 else
    85     GLLIB=""
    86 fi
    87 AC_SUBST(GLLIB)
    88 
    89 dnl Finally create all the generated files
    90 AC_OUTPUT([Makefile])