[SDL_Tizen] Add pre-rotation environment variable
[platform/upstream/SDL.git] / configure.in
old mode 100644 (file)
new mode 100755 (executable)
index eef0f7c..ef6ff5a
@@ -1269,12 +1269,13 @@ CheckTizen()
         if  test x$PKG_CONFIG != xno && \
             test x$video_opengl_egl = xyes && \
             test x$video_opengles_v2 = xyes; then
-            if $PKG_CONFIG --exists wayland-client wayland-egl ecore ecore-wayland evas eina capi-appfw-application capi-system-system-settings ecore-input dlog; then
-                TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl ecore ecore-wayland evas eina capi-appfw-application capi-system-system-settings ecore-input dlog`
-                TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl ecore ecore-wayland evas eina capi-appfw-application capi-system-system-settings ecore-input dlog`
+            if $PKG_CONFIG --exists wayland-client wayland-egl ecore ecore-wayland eina capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm ecore-ipc tizen-remote-surface-client; then
+                TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl ecore ecore-wayland eina capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc tizen-remote-surface-client`
+                TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl ecore ecore-wayland eina capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc tizen-remote-surface-client`
                 video_tizen=yes
             fi
         fi
+
         AC_MSG_RESULT($video_tizen)
 
         if test x$video_tizen = xyes; then
@@ -1292,6 +1293,13 @@ CheckTizen()
             have_video=yes
         fi
     fi
+
+    if test x$enable_joystick = xyes; then
+        SUMMARY="${SUMMARY}SDL2 tizen joystick in:\n"
+        AC_DEFINE(SDL_JOYSTICK_TIZEN, 1, [ ])
+        SOURCES="$SOURCES $srcdir/src/joystick/tizen/*.c"
+        have_joystick=yes
+    fi
 }
 
 dnl Check for Mir
@@ -2029,6 +2037,10 @@ AC_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[defa
 AC_ARG_ENABLE(video-opengles2,
 AC_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
               , enable_video_opengles2=yes)
+AC_ARG_ENABLE(video-vulkan,
+AC_HELP_STRING([--enable-video-vulkan], [include Vulkan support [[default=yes]]]),
+              , enable_video_vulkan=yes)
+
 
 dnl Find OpenGL ES
 CheckOpenGLESX11()
@@ -2195,6 +2207,28 @@ CheckEmscriptenGLES()
     fi
 }
 
+dnl Check for Tizen Vulkan
+CheckVulkanTizen()
+{
+    if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
+        AC_MSG_CHECKING(for Vulkan support)
+        video_vulkan=no
+        AC_TRY_COMPILE([
+         #include <vulkan/vulkan.h>
+        ],[
+          uint32_t instance_layer_count = 0;
+          vkEnumerateInstanceLayerProperties(&instance_layer_count, NULL);
+        ],[
+        video_vulkan=yes
+        ])
+        AC_MSG_RESULT($video_vulkan)
+        if test x$video_vulkan = xyes; then
+            AC_DEFINE(SDL_VIDEO_VULKAN, 1, [ ])
+            SUMMARY_video="${SUMMARY_video} vulkan"
+        fi
+    fi
+}
+
 dnl See if we can use the new unified event interface in Linux 2.4
 CheckInputEvents()
 {
@@ -2937,6 +2971,7 @@ case "$host" in
         CheckFusionSound
         CheckOpenGLX11
         CheckOpenGLESX11
+        CheckVulkanTizen
         CheckMir
         CheckWayland
         CheckTizen
@@ -2983,19 +3018,21 @@ case "$host" in
           esac
         fi
         # Set up files for the joystick library
-        if test x$enable_joystick = xyes; then
-          case $ARCH in
-            linux)
-                AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
-                SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
-                have_joystick=yes
-            ;;
-            android)
-                AC_DEFINE(SDL_JOYSTICK_ANDROID, 1, [ ])
-                SOURCES="$SOURCES $srcdir/src/joystick/android/*.c"
-                have_joystick=yes
-            ;;
-          esac
+        if test x$have_joystick != xyes; then
+            if test x$enable_joystick = xyes; then
+              case $ARCH in
+                linux)
+                    AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
+                    SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
+                    have_joystick=yes
+                ;;
+                android)
+                    AC_DEFINE(SDL_JOYSTICK_ANDROID, 1, [ ])
+                    SOURCES="$SOURCES $srcdir/src/joystick/android/*.c"
+                    have_joystick=yes
+                ;;
+              esac
+            fi
         fi
         # Set up files for the haptic library
         if test x$enable_haptic = xyes; then
@@ -3605,7 +3642,7 @@ AC_CONFIG_FILES([
 ])
 AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
 
-SUMMARY="SDL2 Configure Summary:\n"
+SUMMARY="${SUMMARY}SDL2 Configure Summary:\n"
 if test x$enable_shared = xyes; then
     SUMMARY="${SUMMARY}Building Shared Libraries\n"
 fi