mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gl: set default value to 0 for all definitions that go to gstglconfig.h
To avoid warnings like "GST_GL_HAVE_OPENGL is not defined". As we are using #if instead of #ifdef
This commit is contained in:
parent
b85cd2f215
commit
2a0f0399ae
1 changed files with 69 additions and 32 deletions
101
configure.ac
101
configure.ac
|
@ -1029,71 +1029,100 @@ GL_APIS=
|
|||
GL_CONFIG_DEFINES=
|
||||
|
||||
dnl APIs
|
||||
|
||||
GST_GL_HAVE_OPENGL=0
|
||||
GST_GL_HAVE_GLES2=0
|
||||
GST_GL_HAVE_GLES3=0
|
||||
|
||||
if test "x$USE_OPENGL" = "xyes"; then
|
||||
GL_APIS="gl $GL_APIS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_OPENGL 1"
|
||||
GST_GL_HAVE_OPENGL=1
|
||||
fi
|
||||
if test "x$USE_GLES2" = "xyes"; then
|
||||
GL_APIS="gles2 $GL_APIS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_GLES2 1"
|
||||
GST_GL_HAVE_GLES2=1
|
||||
fi
|
||||
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_OPENGL $GST_GL_HAVE_OPENGL
|
||||
#define GST_GL_HAVE_GLES2 $GST_GL_HAVE_GLES2
|
||||
#define GST_GL_HAVE_GLES3 $GST_GL_HAVE_GLES3
|
||||
"
|
||||
|
||||
dnl WINDOW's
|
||||
|
||||
GST_GL_HAVE_WINDOW_X11=0
|
||||
GST_GL_HAVE_WINDOW_COCOA=0
|
||||
GST_GL_HAVE_WINDOW_WIN32=0
|
||||
GST_GL_HAVE_WINDOW_WAYLAND=0
|
||||
GST_GL_HAVE_WINDOW_ANDROID=0
|
||||
GST_GL_HAVE_WINDOW_DISPMANX=1
|
||||
|
||||
if test "x$HAVE_WINDOW_X11" = "xyes"; then
|
||||
GL_WINDOWS="x11 $GL_WINDOWS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_WINDOW_X11 1"
|
||||
GST_GL_HAVE_WINDOW_X11=1
|
||||
fi
|
||||
if test "x$HAVE_WINDOW_COCOA" = "xyes"; then
|
||||
GL_WINDOWS="cocoa $GL_WINDOWS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_WINDOW_COCOA 1"
|
||||
GST_GL_HAVE_WINDOW_COCOA=1
|
||||
fi
|
||||
if test "x$HAVE_WINDOW_WIN32" = "xyes"; then
|
||||
GL_WINDOWS="win32 $GL_WINDOWS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_WINDOW_WIN32 1"
|
||||
GST_GL_HAVE_WINDOW_WIN32=1
|
||||
fi
|
||||
if test "x$HAVE_WINDOW_WAYLAND" = "xyes"; then
|
||||
GL_WINDOWS="wayland $GL_WINDOWS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_WINDOW_WAYLAND 1"
|
||||
GST_GL_HAVE_WINDOW_WAYLAND=1
|
||||
fi
|
||||
if test "x$HAVE_WINDOW_ANDROID" = "xyes"; then
|
||||
GL_WINDOWS="android $GL_WINDOWS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_WINDOW_ANDROID 1"
|
||||
GST_GL_HAVE_WINDOW_ANDROID=1
|
||||
fi
|
||||
if test "x$HAVE_WINDOW_DISPMANX" = "xyes"; then
|
||||
GL_WINDOWS="dispmanx $GL_WINDOWS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_WINDOW_DISPMANX 1"
|
||||
GST_GL_HAVE_WINDOW_DISPMANX=1
|
||||
fi
|
||||
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_WINDOW_X11 $GST_GL_HAVE_WINDOW_X11
|
||||
#define GST_GL_HAVE_WINDOW_COCOA $GST_GL_HAVE_WINDOW_COCOA
|
||||
#define GST_GL_HAVE_WINDOW_WIN32 $GST_GL_HAVE_WINDOW_WIN32
|
||||
#define GST_GL_HAVE_WINDOW_WAYLAND $GST_GL_HAVE_WINDOW_WAYLAND
|
||||
#define GST_GL_HAVE_WINDOW_ANDROID $GST_GL_HAVE_WINDOW_ANDROID
|
||||
#define GST_GL_HAVE_WINDOW_DISPMANX $GST_GL_HAVE_WINDOW_DISPMANX
|
||||
"
|
||||
|
||||
dnl PLATFORM's
|
||||
|
||||
GST_GL_HAVE_PLATFORM_EGL=0
|
||||
GST_GL_HAVE_PLATFORM_GLX=0
|
||||
GST_GL_HAVE_PLATFORM_WGL=0
|
||||
GST_GL_HAVE_PLATFORM_COCOA=0
|
||||
|
||||
if test "x$USE_EGL" = "xyes"; then
|
||||
GL_PLATFORMS="egl $GL_PLATFORMS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_PLATFORM_EGL 1"
|
||||
GST_GL_HAVE_PLATFORM_EGL=1
|
||||
fi
|
||||
if test "x$USE_GLX" = "xyes"; then
|
||||
GL_PLATFORMS="glx $GL_PLATFORMS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_PLATFORM_GLX 1"
|
||||
GST_GL_HAVE_PLATFORM_GLX=1
|
||||
fi
|
||||
if test "x$USE_WGL" = "xyes"; then
|
||||
GL_PLATFORMS="wgl $GL_PLATFORMS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_PLATFORM_WGL 1"
|
||||
GST_GL_HAVE_PLATFORM_WGL=1
|
||||
fi
|
||||
if test "x$USE_COCOA" = "xyes"; then
|
||||
GL_PLATFORMS="cocoa $GL_PLATFORMS"
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_PLATFORM_COCOA 1"
|
||||
GST_GL_HAVE_PLATFORM_COCOA=1
|
||||
fi
|
||||
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_PLATFORM_EGL $GST_GL_HAVE_PLATFORM_EGL
|
||||
#define GST_GL_HAVE_PLATFORM_GLX $GST_GL_HAVE_PLATFORM_GLX
|
||||
#define GST_GL_HAVE_PLATFORM_WGL $GST_GL_HAVE_PLATFORM_WGL
|
||||
#define GST_GL_HAVE_PLATFORM_COCOA $GST_GL_HAVE_PLATFORM_COCOA
|
||||
"
|
||||
|
||||
dnl Check for no platforms/window systems
|
||||
if test "x$GL_APIS" = "x"; then
|
||||
AC_MSG_WARN([Either OpenGL or OpenGL|ES is required for OpenGL support])
|
||||
|
@ -1169,30 +1198,38 @@ if test "x$USE_OPENGL" = "xyes"; then
|
|||
"
|
||||
fi
|
||||
|
||||
GST_GL_HAVE_GLEGLIMAGEOES=0
|
||||
GST_GL_HAVE_GLCHAR=0
|
||||
GST_GL_HAVE_GLSIZEIPTR=0
|
||||
GST_GL_HAVE_GLINTPTR=0
|
||||
|
||||
AC_CHECK_TYPES(GLeglImageOES, [], [], [[$GL_INCLUDES]])
|
||||
if test "x$ac_cv_type_GLeglImageOES" = "xyes"; then
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_GLEGLIMAGEOES 1"
|
||||
GST_GL_HAVE_GLEGLIMAGEOES=1
|
||||
fi
|
||||
|
||||
AC_CHECK_TYPES(GLchar, [], [], [[$GL_INCLUDES]])
|
||||
if test "x$ac_cv_type_GLchar" = "xyes"; then
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_GLCHAR 1"
|
||||
GST_GL_HAVE_GLCHAR=1
|
||||
fi
|
||||
|
||||
AC_CHECK_TYPES(GLsizeiptr, [], [], [[$GL_INCLUDES]])
|
||||
if test "x$ac_cv_type_GLsizeiptr" = "xyes"; then
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_GLSIZEIPTR 1"
|
||||
GST_GL_HAVE_GLSIZEIPTR=1
|
||||
fi
|
||||
|
||||
AC_CHECK_TYPES(GLintptr, [], [], [[$GL_INCLUDES]])
|
||||
if test "x$ac_cv_type_GLintptr" = "xyes"; then
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_GLINTPTR 1"
|
||||
GST_GL_HAVE_GLINTPTR=1
|
||||
fi
|
||||
|
||||
GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES
|
||||
#define GST_GL_HAVE_GLEGLIMAGEOES $GST_GL_HAVE_GLEGLIMAGEOES
|
||||
#define GST_GL_HAVE_GLCHAR $GST_GL_HAVE_GLCHAR
|
||||
#define GST_GL_HAVE_GLSIZEIPTR $GST_GL_HAVE_GLSIZEIPTR
|
||||
#define GST_GL_HAVE_GLINTPTR $GST_GL_HAVE_GLINTPTR
|
||||
"
|
||||
|
||||
AC_CONFIG_COMMANDS([gst-libs/gst/gl/gstglconfig.h], [
|
||||
outfile=gstglconfig.h-tmp
|
||||
cat > $outfile <<\_______EOF
|
||||
|
|
Loading…
Reference in a new issue