configure.in: Rename configure.ac to fix an 'aclocal' warning
authorSam Lantinga <slouken@libsdl.org>
Tue, 02 Apr 2019 05:31:08 -0700
changeset 1267533be90a3c475
parent 12674 e2d1f4e9c323
child 12676 994f7540d7f3
configure.in: Rename configure.ac to fix an 'aclocal' warning
configure
test/configure.ac
test/configure.in
     1.1 --- a/configure	Wed Mar 27 20:58:33 2019 +1100
     1.2 +++ b/configure	Tue Apr 02 05:31:08 2019 -0700
     1.3 @@ -25159,7 +25159,7 @@
     1.4          ;;
     1.5      *)
     1.6          as_fn_error $? "
     1.7 -*** Unsupported host:  Please add to configure.in
     1.8 +*** Unsupported host:  Please add to configure.ac
     1.9          " "$LINENO" 5
    1.10          ;;
    1.11  esac
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/test/configure.ac	Tue Apr 02 05:31:08 2019 -0700
     2.3 @@ -0,0 +1,191 @@
     2.4 +dnl Process this file with autoconf to produce a configure script.
     2.5 +AC_INIT(README)
     2.6 +
     2.7 +dnl Detect the canonical build and host environments
     2.8 +AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
     2.9 +AC_CANONICAL_HOST
    2.10 +
    2.11 +dnl Check for tools
    2.12 +
    2.13 +AC_PROG_CC
    2.14 +
    2.15 +dnl Check for compiler environment
    2.16 +
    2.17 +AC_C_CONST
    2.18 +
    2.19 +dnl We only care about this for building testnative at the moment, so these
    2.20 +dnl  values shouldn't be considered absolute truth.
    2.21 +dnl  (Haiku, for example, sets none of these.)
    2.22 +ISUNIX="false"
    2.23 +ISWINDOWS="false"
    2.24 +ISMACOSX="false"
    2.25 +
    2.26 +dnl Figure out which math library to use
    2.27 +case "$host" in
    2.28 +    *-*-cygwin* | *-*-mingw32*)
    2.29 +        ISWINDOWS="true"
    2.30 +        EXE=".exe"
    2.31 +        MATHLIB=""
    2.32 +        SYS_GL_LIBS="-lopengl32"
    2.33 +        ;;
    2.34 +    *-*-haiku*)
    2.35 +        EXE=""
    2.36 +        MATHLIB=""
    2.37 +        SYS_GL_LIBS="-lGL"
    2.38 +        ;;
    2.39 +    *-*-darwin* )
    2.40 +        ISMACOSX="true"
    2.41 +        EXE=""
    2.42 +        MATHLIB=""
    2.43 +        SYS_GL_LIBS="-Wl,-framework,OpenGL"
    2.44 +        ;;
    2.45 +    *-*-aix*)
    2.46 +        ISUNIX="true"
    2.47 +        EXE=""
    2.48 +        if test x$ac_cv_prog_gcc = xyes; then
    2.49 +            CFLAGS="-mthreads"
    2.50 +        fi
    2.51 +        SYS_GL_LIBS=""
    2.52 +        ;;
    2.53 +    *-*-mint*)
    2.54 +        EXE=""
    2.55 +        MATHLIB=""
    2.56 +        AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
    2.57 +        if test "x$OSMESA_CONFIG" = "xyes"; then
    2.58 +            OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
    2.59 +            OSMESA_LIBS=`$OSMESA_CONFIG --libs`
    2.60 +            CFLAGS="$CFLAGS $OSMESA_CFLAGS"
    2.61 +            SYS_GL_LIBS="$OSMESA_LIBS"
    2.62 +        else
    2.63 +            SYS_GL_LIBS="-lOSMesa"
    2.64 +        fi
    2.65 +        ;;
    2.66 +    *-*-qnx*)
    2.67 +        EXE=""
    2.68 +        MATHLIB=""
    2.69 +        SYS_GL_LIBS="-lGLES_CM"
    2.70 +        ;;
    2.71 +    *-*-emscripten* )
    2.72 +        dnl This should really be .js, but we need to specify extra flags when compiling to js
    2.73 +        EXE=".bc"
    2.74 +        MATHLIB=""
    2.75 +        SYS_GL_LIBS=""
    2.76 +        ;;
    2.77 +    *)
    2.78 +        dnl Oh well, call it Unix...
    2.79 +        ISUNIX="true"
    2.80 +        EXE=""
    2.81 +        MATHLIB="-lm"
    2.82 +        SYS_GL_LIBS="-lGL"
    2.83 +        ;;
    2.84 +esac
    2.85 +AC_SUBST(EXE)
    2.86 +AC_SUBST(MATHLIB)
    2.87 +AC_SUBST(ISMACOSX)
    2.88 +AC_SUBST(ISWINDOWS)
    2.89 +AC_SUBST(ISUNIX)
    2.90 +
    2.91 +dnl Check for SDL
    2.92 +SDL_VERSION=2.0.0
    2.93 +AM_PATH_SDL2($SDL_VERSION,
    2.94 +            :,
    2.95 +	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    2.96 +)
    2.97 +CFLAGS="$CFLAGS $SDL_CFLAGS"
    2.98 +LIBS="$LIBS -lSDL2_test $SDL_LIBS"
    2.99 +
   2.100 +dnl Check for X11 path, needed for OpenGL on some systems
   2.101 +AC_PATH_X
   2.102 +if test x$have_x = xyes; then
   2.103 +    if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then
   2.104 +        :
   2.105 +    else
   2.106 +        CFLAGS="$CFLAGS -I$ac_x_includes"
   2.107 +    fi
   2.108 +    if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
   2.109 +        :
   2.110 +    else
   2.111 +        if test "x$ac_x_libraries" = x; then
   2.112 +            XPATH=""
   2.113 +            XLIB="-lX11"
   2.114 +        else
   2.115 +            XPATH="-L$ac_x_libraries"
   2.116 +            XLIB="-L$ac_x_libraries -lX11"
   2.117 +        fi
   2.118 +    fi
   2.119 +fi
   2.120 +
   2.121 +dnl Check for OpenGL
   2.122 +AC_MSG_CHECKING(for OpenGL support)
   2.123 +have_opengl=no
   2.124 +AC_TRY_COMPILE([
   2.125 + #include "SDL_opengl.h"
   2.126 +],[
   2.127 +],[
   2.128 +have_opengl=yes
   2.129 +])
   2.130 +AC_MSG_RESULT($have_opengl)
   2.131 +
   2.132 +dnl Check for OpenGL ES
   2.133 +AC_MSG_CHECKING(for OpenGL ES support)
   2.134 +have_opengles=no
   2.135 +AC_TRY_COMPILE([
   2.136 + #if defined (__IPHONEOS__)
   2.137 +    #include <OpenGLES/ES1/gl.h>
   2.138 + #else
   2.139 +    #include <GLES/gl.h>
   2.140 + #endif /* __QNXNTO__ */
   2.141 +],[
   2.142 +],[
   2.143 +have_opengles=yes
   2.144 +])
   2.145 +AC_MSG_RESULT($have_opengles)
   2.146 +
   2.147 +dnl Check for OpenGL ES2
   2.148 +AC_MSG_CHECKING(for OpenGL ES2 support)
   2.149 +have_opengles2=no
   2.150 +AC_TRY_COMPILE([
   2.151 + #if defined (__IPHONEOS__)
   2.152 +    #include <OpenGLES/ES2/gl.h>
   2.153 +    #include <OpenGLES/ES2/glext.h>
   2.154 + #else
   2.155 +    #include <GLES2/gl2.h>
   2.156 +    #include <GLES2/gl2ext.h>
   2.157 + #endif
   2.158 +],[
   2.159 +],[
   2.160 +have_opengles2=yes
   2.161 +])
   2.162 +AC_MSG_RESULT($have_opengles2)
   2.163 +
   2.164 +GLLIB=""
   2.165 +GLESLIB=""
   2.166 +GLES2LIB=""
   2.167 +if test x$have_opengles = xyes; then
   2.168 +    CFLAGS="$CFLAGS -DHAVE_OPENGLES"
   2.169 +    GLESLIB="$XPATH -lGLESv1_CM"
   2.170 +fi
   2.171 +if test x$have_opengles2 = xyes; then
   2.172 +    CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
   2.173 +    #GLES2LIB="$XPATH -lGLESv2"
   2.174 +fi
   2.175 +if test x$have_opengl = xyes; then
   2.176 +    CFLAGS="$CFLAGS -DHAVE_OPENGL"
   2.177 +    GLLIB="$XPATH $SYS_GL_LIBS"
   2.178 +fi
   2.179 +
   2.180 +AC_SUBST(GLLIB)
   2.181 +AC_SUBST(GLESLIB)
   2.182 +AC_SUBST(GLES2LIB)
   2.183 +AC_SUBST(XLIB)
   2.184 +
   2.185 +dnl Check for SDL_ttf
   2.186 +AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
   2.187 +if test x$have_SDL_ttf = xyes; then
   2.188 +    CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
   2.189 +    SDL_TTF_LIB="-lSDL2_ttf"
   2.190 +fi
   2.191 +AC_SUBST(SDL_TTF_LIB)
   2.192 +
   2.193 +dnl Finally create all the generated files
   2.194 +AC_OUTPUT([Makefile])
     3.1 --- a/test/configure.in	Wed Mar 27 20:58:33 2019 +1100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,191 +0,0 @@
     3.4 -dnl Process this file with autoconf to produce a configure script.
     3.5 -AC_INIT(README)
     3.6 -
     3.7 -dnl Detect the canonical build and host environments
     3.8 -AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
     3.9 -AC_CANONICAL_HOST
    3.10 -
    3.11 -dnl Check for tools
    3.12 -
    3.13 -AC_PROG_CC
    3.14 -
    3.15 -dnl Check for compiler environment
    3.16 -
    3.17 -AC_C_CONST
    3.18 -
    3.19 -dnl We only care about this for building testnative at the moment, so these
    3.20 -dnl  values shouldn't be considered absolute truth.
    3.21 -dnl  (Haiku, for example, sets none of these.)
    3.22 -ISUNIX="false"
    3.23 -ISWINDOWS="false"
    3.24 -ISMACOSX="false"
    3.25 -
    3.26 -dnl Figure out which math library to use
    3.27 -case "$host" in
    3.28 -    *-*-cygwin* | *-*-mingw32*)
    3.29 -        ISWINDOWS="true"
    3.30 -        EXE=".exe"
    3.31 -        MATHLIB=""
    3.32 -        SYS_GL_LIBS="-lopengl32"
    3.33 -        ;;
    3.34 -    *-*-haiku*)
    3.35 -        EXE=""
    3.36 -        MATHLIB=""
    3.37 -        SYS_GL_LIBS="-lGL"
    3.38 -        ;;
    3.39 -    *-*-darwin* )
    3.40 -        ISMACOSX="true"
    3.41 -        EXE=""
    3.42 -        MATHLIB=""
    3.43 -        SYS_GL_LIBS="-Wl,-framework,OpenGL"
    3.44 -        ;;
    3.45 -    *-*-aix*)
    3.46 -        ISUNIX="true"
    3.47 -        EXE=""
    3.48 -        if test x$ac_cv_prog_gcc = xyes; then
    3.49 -            CFLAGS="-mthreads"
    3.50 -        fi
    3.51 -        SYS_GL_LIBS=""
    3.52 -        ;;
    3.53 -    *-*-mint*)
    3.54 -        EXE=""
    3.55 -        MATHLIB=""
    3.56 -        AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
    3.57 -        if test "x$OSMESA_CONFIG" = "xyes"; then
    3.58 -            OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
    3.59 -            OSMESA_LIBS=`$OSMESA_CONFIG --libs`
    3.60 -            CFLAGS="$CFLAGS $OSMESA_CFLAGS"
    3.61 -            SYS_GL_LIBS="$OSMESA_LIBS"
    3.62 -        else
    3.63 -            SYS_GL_LIBS="-lOSMesa"
    3.64 -        fi
    3.65 -        ;;
    3.66 -    *-*-qnx*)
    3.67 -        EXE=""
    3.68 -        MATHLIB=""
    3.69 -        SYS_GL_LIBS="-lGLES_CM"
    3.70 -        ;;
    3.71 -    *-*-emscripten* )
    3.72 -        dnl This should really be .js, but we need to specify extra flags when compiling to js
    3.73 -        EXE=".bc"
    3.74 -        MATHLIB=""
    3.75 -        SYS_GL_LIBS=""
    3.76 -        ;;
    3.77 -    *)
    3.78 -        dnl Oh well, call it Unix...
    3.79 -        ISUNIX="true"
    3.80 -        EXE=""
    3.81 -        MATHLIB="-lm"
    3.82 -        SYS_GL_LIBS="-lGL"
    3.83 -        ;;
    3.84 -esac
    3.85 -AC_SUBST(EXE)
    3.86 -AC_SUBST(MATHLIB)
    3.87 -AC_SUBST(ISMACOSX)
    3.88 -AC_SUBST(ISWINDOWS)
    3.89 -AC_SUBST(ISUNIX)
    3.90 -
    3.91 -dnl Check for SDL
    3.92 -SDL_VERSION=2.0.0
    3.93 -AM_PATH_SDL2($SDL_VERSION,
    3.94 -            :,
    3.95 -	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    3.96 -)
    3.97 -CFLAGS="$CFLAGS $SDL_CFLAGS"
    3.98 -LIBS="$LIBS -lSDL2_test $SDL_LIBS"
    3.99 -
   3.100 -dnl Check for X11 path, needed for OpenGL on some systems
   3.101 -AC_PATH_X
   3.102 -if test x$have_x = xyes; then
   3.103 -    if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then
   3.104 -        :
   3.105 -    else
   3.106 -        CFLAGS="$CFLAGS -I$ac_x_includes"
   3.107 -    fi
   3.108 -    if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
   3.109 -        :
   3.110 -    else
   3.111 -        if test "x$ac_x_libraries" = x; then
   3.112 -            XPATH=""
   3.113 -            XLIB="-lX11"
   3.114 -        else
   3.115 -            XPATH="-L$ac_x_libraries"
   3.116 -            XLIB="-L$ac_x_libraries -lX11"
   3.117 -        fi
   3.118 -    fi
   3.119 -fi
   3.120 -
   3.121 -dnl Check for OpenGL
   3.122 -AC_MSG_CHECKING(for OpenGL support)
   3.123 -have_opengl=no
   3.124 -AC_TRY_COMPILE([
   3.125 - #include "SDL_opengl.h"
   3.126 -],[
   3.127 -],[
   3.128 -have_opengl=yes
   3.129 -])
   3.130 -AC_MSG_RESULT($have_opengl)
   3.131 -
   3.132 -dnl Check for OpenGL ES
   3.133 -AC_MSG_CHECKING(for OpenGL ES support)
   3.134 -have_opengles=no
   3.135 -AC_TRY_COMPILE([
   3.136 - #if defined (__IPHONEOS__)
   3.137 -    #include <OpenGLES/ES1/gl.h>
   3.138 - #else
   3.139 -    #include <GLES/gl.h>
   3.140 - #endif /* __QNXNTO__ */
   3.141 -],[
   3.142 -],[
   3.143 -have_opengles=yes
   3.144 -])
   3.145 -AC_MSG_RESULT($have_opengles)
   3.146 -
   3.147 -dnl Check for OpenGL ES2
   3.148 -AC_MSG_CHECKING(for OpenGL ES2 support)
   3.149 -have_opengles2=no
   3.150 -AC_TRY_COMPILE([
   3.151 - #if defined (__IPHONEOS__)
   3.152 -    #include <OpenGLES/ES2/gl.h>
   3.153 -    #include <OpenGLES/ES2/glext.h>
   3.154 - #else
   3.155 -    #include <GLES2/gl2.h>
   3.156 -    #include <GLES2/gl2ext.h>
   3.157 - #endif
   3.158 -],[
   3.159 -],[
   3.160 -have_opengles2=yes
   3.161 -])
   3.162 -AC_MSG_RESULT($have_opengles2)
   3.163 -
   3.164 -GLLIB=""
   3.165 -GLESLIB=""
   3.166 -GLES2LIB=""
   3.167 -if test x$have_opengles = xyes; then
   3.168 -    CFLAGS="$CFLAGS -DHAVE_OPENGLES"
   3.169 -    GLESLIB="$XPATH -lGLESv1_CM"
   3.170 -fi
   3.171 -if test x$have_opengles2 = xyes; then
   3.172 -    CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
   3.173 -    #GLES2LIB="$XPATH -lGLESv2"
   3.174 -fi
   3.175 -if test x$have_opengl = xyes; then
   3.176 -    CFLAGS="$CFLAGS -DHAVE_OPENGL"
   3.177 -    GLLIB="$XPATH $SYS_GL_LIBS"
   3.178 -fi
   3.179 -
   3.180 -AC_SUBST(GLLIB)
   3.181 -AC_SUBST(GLESLIB)
   3.182 -AC_SUBST(GLES2LIB)
   3.183 -AC_SUBST(XLIB)
   3.184 -
   3.185 -dnl Check for SDL_ttf
   3.186 -AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
   3.187 -if test x$have_SDL_ttf = xyes; then
   3.188 -    CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
   3.189 -    SDL_TTF_LIB="-lSDL2_ttf"
   3.190 -fi
   3.191 -AC_SUBST(SDL_TTF_LIB)
   3.192 -
   3.193 -dnl Finally create all the generated files
   3.194 -AC_OUTPUT([Makefile])