sdl.m4
changeset 1118 65f4b2dd46b7
parent 794 a5defa3b93e1
child 1550 31c2b8e4885e
equal deleted inserted replaced
1117:95b261f445b1 1118:65f4b2dd46b7
    50            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
    50            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
    51     sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
    51     sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
    52            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
    52            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
    53     if test "x$enable_sdltest" = "xyes" ; then
    53     if test "x$enable_sdltest" = "xyes" ; then
    54       ac_save_CFLAGS="$CFLAGS"
    54       ac_save_CFLAGS="$CFLAGS"
       
    55       ac_save_CXXFLAGS="$CXXFLAGS"
    55       ac_save_LIBS="$LIBS"
    56       ac_save_LIBS="$LIBS"
    56       CFLAGS="$CFLAGS $SDL_CFLAGS"
    57       CFLAGS="$CFLAGS $SDL_CFLAGS"
       
    58       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    57       LIBS="$LIBS $SDL_LIBS"
    59       LIBS="$LIBS $SDL_LIBS"
    58 dnl
    60 dnl
    59 dnl Now check if the installed SDL is sufficiently new. (Also sanity
    61 dnl Now check if the installed SDL is sufficiently new. (Also sanity
    60 dnl checks the results of sdl-config to some extent
    62 dnl checks the results of sdl-config to some extent
    61 dnl
    63 dnl
   136        if test -f conf.sdltest ; then
   138        if test -f conf.sdltest ; then
   137         :
   139         :
   138        else
   140        else
   139           echo "*** Could not run SDL test program, checking why..."
   141           echo "*** Could not run SDL test program, checking why..."
   140           CFLAGS="$CFLAGS $SDL_CFLAGS"
   142           CFLAGS="$CFLAGS $SDL_CFLAGS"
       
   143           CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
   141           LIBS="$LIBS $SDL_LIBS"
   144           LIBS="$LIBS $SDL_LIBS"
   142           AC_TRY_LINK([
   145           AC_TRY_LINK([
   143 #include <stdio.h>
   146 #include <stdio.h>
   144 #include "SDL.h"
   147 #include "SDL.h"
   145 
   148 
   160         [ echo "*** The test program failed to compile or link. See the file config.log for the"
   163         [ echo "*** The test program failed to compile or link. See the file config.log for the"
   161           echo "*** exact error that occured. This usually means SDL was incorrectly installed"
   164           echo "*** exact error that occured. This usually means SDL was incorrectly installed"
   162           echo "*** or that you have moved SDL since it was installed. In the latter case, you"
   165           echo "*** or that you have moved SDL since it was installed. In the latter case, you"
   163           echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
   166           echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
   164           CFLAGS="$ac_save_CFLAGS"
   167           CFLAGS="$ac_save_CFLAGS"
       
   168           CXXFLAGS="$ac_save_CXXFLAGS"
   165           LIBS="$ac_save_LIBS"
   169           LIBS="$ac_save_LIBS"
   166        fi
   170        fi
   167      fi
   171      fi
   168      SDL_CFLAGS=""
   172      SDL_CFLAGS=""
       
   173      SDL_CXXFLAGS=""
   169      SDL_LIBS=""
   174      SDL_LIBS=""
   170      ifelse([$3], , :, [$3])
   175      ifelse([$3], , :, [$3])
   171   fi
   176   fi
   172   AC_SUBST(SDL_CFLAGS)
   177   AC_SUBST(SDL_CFLAGS)
   173   AC_SUBST(SDL_LIBS)
   178   AC_SUBST(SDL_LIBS)