sdl2.m4
changeset 7492 98de3e4f1c36
parent 7251 8c5e575a1315
child 10382 9befd0acb9ef
     1.1 --- a/sdl2.m4	Sun Jul 21 00:57:31 2013 -0400
     1.2 +++ b/sdl2.m4	Sun Jul 21 11:52:16 2013 -0700
     1.3 @@ -31,42 +31,42 @@
     1.4      sdl_pc=no
     1.5      if test x$sdl_exec_prefix != x ; then
     1.6        sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
     1.7 -      if test x${SDL_CONFIG+set} != xset ; then
     1.8 -        SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config
     1.9 +      if test x${SDL2_CONFIG+set} != xset ; then
    1.10 +        SDL2_CONFIG=$sdl_exec_prefix/bin/sdl2-config
    1.11        fi
    1.12      fi
    1.13      if test x$sdl_prefix != x ; then
    1.14        sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
    1.15 -      if test x${SDL_CONFIG+set} != xset ; then
    1.16 -        SDL_CONFIG=$sdl_prefix/bin/sdl2-config
    1.17 +      if test x${SDL2_CONFIG+set} != xset ; then
    1.18 +        SDL2_CONFIG=$sdl_prefix/bin/sdl2-config
    1.19        fi
    1.20      fi
    1.21    fi
    1.22  
    1.23    if test "x$sdl_pc" = xyes ; then
    1.24      no_sdl=""
    1.25 -    SDL_CONFIG="pkg-config sdl2"
    1.26 +    SDL2_CONFIG="pkg-config sdl2"
    1.27    else
    1.28      as_save_PATH="$PATH"
    1.29      if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then
    1.30        PATH="$prefix/bin:$prefix/usr/bin:$PATH"
    1.31      fi
    1.32 -    AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH])
    1.33 +    AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
    1.34      PATH="$as_save_PATH"
    1.35      AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
    1.36      no_sdl=""
    1.37  
    1.38 -    if test "$SDL_CONFIG" = "no" ; then
    1.39 +    if test "$SDL2_CONFIG" = "no" ; then
    1.40        no_sdl=yes
    1.41      else
    1.42 -      SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
    1.43 -      SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
    1.44 +      SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
    1.45 +      SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
    1.46  
    1.47 -      sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
    1.48 +      sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
    1.49               sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
    1.50 -      sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
    1.51 +      sdl_minor_version=`$SDL2_CONFIG $sdl_config_args --version | \
    1.52               sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
    1.53 -      sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
    1.54 +      sdl_micro_version=`$SDL2_CONFIG $sdl_config_args --version | \
    1.55               sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
    1.56        if test "x$enable_sdltest" = "xyes" ; then
    1.57          ac_save_CFLAGS="$CFLAGS"
    1.58 @@ -130,7 +130,7 @@
    1.59        printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
    1.60        printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro);
    1.61        printf("*** best to upgrade to the required version.\n");
    1.62 -      printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n");
    1.63 +      printf("*** If sdl2-config was wrong, set the environment variable SDL2_CONFIG\n");
    1.64        printf("*** to point to the correct copy of sdl2-config, and remove the file\n");
    1.65        printf("*** config.cache before re-running configure\n");
    1.66        return 1;
    1.67 @@ -152,10 +152,10 @@
    1.68    if test "x$no_sdl" = x ; then
    1.69       ifelse([$2], , :, [$2])
    1.70    else
    1.71 -     if test "$SDL_CONFIG" = "no" ; then
    1.72 +     if test "$SDL2_CONFIG" = "no" ; then
    1.73         echo "*** The sdl2-config script installed by SDL could not be found"
    1.74         echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
    1.75 -       echo "*** your path, or set the SDL_CONFIG environment variable to the"
    1.76 +       echo "*** your path, or set the SDL2_CONFIG environment variable to the"
    1.77         echo "*** full path to sdl2-config."
    1.78       else
    1.79         if test -f conf.sdltest ; then
    1.80 @@ -186,7 +186,7 @@
    1.81          [ echo "*** The test program failed to compile or link. See the file config.log for the"
    1.82            echo "*** exact error that occured. This usually means SDL was incorrectly installed"
    1.83            echo "*** or that you have moved SDL since it was installed. In the latter case, you"
    1.84 -          echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" ])
    1.85 +          echo "*** may want to edit the sdl2-config script: $SDL2_CONFIG" ])
    1.86            CFLAGS="$ac_save_CFLAGS"
    1.87            CXXFLAGS="$ac_save_CXXFLAGS"
    1.88            LIBS="$ac_save_LIBS"