[SDL_Tizen] Fix svace issue and so name
[platform/upstream/SDL.git] / configure
index a41f025..77e6e37 100755 (executable)
--- a/configure
+++ b/configure
@@ -820,6 +820,7 @@ enable_dummyaudio
 enable_video_wayland
 enable_video_wayland_qt_touch
 enable_wayland_shared
+enable_video_tizen
 enable_video_mir
 enable_mir_shared
 enable_video_x11
@@ -844,6 +845,7 @@ enable_video_opengl
 enable_video_opengles
 enable_video_opengles1
 enable_video_opengles2
+enable_video_vulkan
 enable_libudev
 enable_dbus
 enable_ibus
@@ -1546,6 +1548,7 @@ Optional Features:
                           QtWayland server support for Wayland video driver
                           [[default=yes]]
   --enable-wayland-shared dynamically load Wayland support [[default=maybe]]
+  --enable-video-tizen    use tizen video driver [[default=yes]]
   --enable-video-mir      use Mir video driver [[default=yes]]
   --enable-mir-shared     dynamically load Mir support [[default=maybe]]
   --enable-video-x11      use X11 video driver [[default=yes]]
@@ -1582,6 +1585,7 @@ Optional Features:
                           include OpenGL ES 1.1 support [[default=yes]]
   --enable-video-opengles2
                           include OpenGL ES 2.0 support [[default=yes]]
+  --enable-video-vulkan   include Vulkan support [[default=yes]]
   --enable-libudev        enable libudev support [[default=yes]]
   --enable-dbus           enable D-Bus support [[default=yes]]
   --enable-ibus           enable IBus support [[default=yes]]
@@ -18767,9 +18771,9 @@ $as_echo_n "checking for Wayland support... " >&6; }
         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 wayland-cursor egl xkbcommon ; then
-                WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
-                WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+            if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon xdg-shell-client text-client tizen-extension-client; then
+                WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon xdg-shell-client text-client tizen-extension-client`
+                WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon xdg-shell-client text-client tizen-extension-client`
                 video_wayland=yes
             fi
         fi
@@ -18804,6 +18808,9 @@ fi
                     fi
                     wayland_cursor_lib=`find_lib "libwayland-cursor.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
                     xkbcommon_lib=`find_lib "libxkbcommon.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
+                    xdg_shell_client_lib=`find_lib "libxdg-shell-client.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
+                    text_client_lib=`find_lib "libtext-client.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
+                    tizen_extension_client_lib=`find_lib "libtizen-extension-client.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
                     ;;
             esac
 
@@ -18821,11 +18828,17 @@ $as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic Wa
                test x$wayland_client_lib != x && \
                test x$wayland_egl_lib != x && \
                test x$wayland_cursor_lib != x && \
+               test x$xdg_shell_client_lib != x && \
+               test x$text_client_lib != x && \
+               test x$tizen_extension_client_lib != x && \
                test x$xkbcommon_lib != x; then
                 echo "-- dynamic libwayland-client -> $wayland_client_lib"
                 echo "-- dynamic libwayland-egl -> $wayland_egl_lib"
                 echo "-- dynamic libwayland-cursor -> $wayland_cursor_lib"
                 echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
+                echo "-- dynamic libxdg_shell_client -> $xdg_shell_client_lib"
+                echo "-- dynamic libtext_client -> $xtext_client_lib"
+                echo "-- dynamic libtizen_extension_client -> $xtizen_extension_client_lib"
 
 cat >>confdefs.h <<_ACEOF
 #define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC "$wayland_client_lib"
@@ -18846,6 +18859,21 @@ cat >>confdefs.h <<_ACEOF
 #define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON "$xkbcommon_lib"
 _ACEOF
 
+
+cat >>confdefs.h <<_ACEOF
+#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XDGSHELLCLIENT "$xdg_shell_client_lib"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_TEXTCLIENT "$text_client_lib"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_TIZENEXTENSIONCLIENT "$tizen_extension_client_lib"
+_ACEOF
+
                 SUMMARY_video="${SUMMARY_video} wayland(dynamic)"
             else
                 enable_wayland_shared=no
@@ -18857,6 +18885,102 @@ _ACEOF
     fi
 }
 
+CheckTizen()
+{
+    # Check whether --enable-video-tizen was given.
+if test "${enable_video_tizen+set}" = set; then :
+  enableval=$enable_video_tizen;
+else
+  enable_video_tizen=yes
+fi
+
+
+    if test x$enable_video = xyes -a x$enable_video_tizen = xyes; then
+        # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tizen support" >&5
+$as_echo_n "checking for Tizen support... " >&6; }
+        video_tizen=no
+        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 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm ecore-ipc; then
+                TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl ecore ecore-wayland xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
+                TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl ecore ecore-wayland xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
+                video_tizen=yes
+            fi
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_tizen" >&5
+$as_echo "$video_tizen" >&6; }
+
+        if test x$video_tizen = xyes; then
+
+$as_echo "#define SDL_VIDEO_DRIVER_TIZEN 1" >>confdefs.h
+
+            SOURCES="$SOURCES $srcdir/src/video/tizen/*.c"
+            SOURCES="$SOURCES $srcdir/src/core/tizen/*.c"
+            SDLMAIN_SOURCES="$srcdir/src/main/tizen/*.c"
+
+            SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
+            SDL_LIBS="-lSDL2main $SDL_LIBS"
+
+            EXTRA_CFLAGS="$EXTRA_CFLAGS $TIZEN_CFLAGS -DTIZEN"
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $TIZEN_LIBS"
+            SUMMARY_video="${SUMMARY_video} tizen"
+            have_video=yes
+        fi
+    fi
+
+    if test x$enable_joystick = xyes; then
+        SUMMARY="${SUMMARY}SDL2 tizen joystick in:\n"
+
+$as_echo "#define SDL_JOYSTICK_TIZEN 1" >>confdefs.h
+
+        SOURCES="$SOURCES $srcdir/src/joystick/tizen/*.c"
+        have_joystick=yes
+    fi
+}
+
 CheckMir()
 {
     # Check whether --enable-video-mir was given.
@@ -21108,6 +21232,14 @@ else
   enable_video_opengles2=yes
 fi
 
+# Check whether --enable-video-vulkan was given.
+if test "${enable_video_vulkan+set}" = set; then :
+  enableval=$enable_video_vulkan;
+else
+  enable_video_vulkan=yes
+fi
+
+
 
 CheckOpenGLESX11()
 {
@@ -21425,6 +21557,45 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
     fi
 }
 
+CheckVulkanTizen()
+{
+    if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Vulkan support" >&5
+$as_echo_n "checking for Vulkan support... " >&6; }
+        video_vulkan=no
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+         #include <vulkan/vulkan.h>
+
+int
+main ()
+{
+
+          uint32_t instance_layer_count = 0;
+          vkEnumerateInstanceLayerProperties(&instance_layer_count, NULL);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+        video_vulkan=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_vulkan" >&5
+$as_echo "$video_vulkan" >&6; }
+        if test x$video_vulkan = xyes; then
+
+$as_echo "#define SDL_VIDEO_VULKAN 1" >>confdefs.h
+
+            SUMMARY_video="${SUMMARY_video} vulkan"
+        fi
+    fi
+}
+
 CheckInputEvents()
 {
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
@@ -22978,8 +23149,10 @@ case "$host" in
         CheckFusionSound
         CheckOpenGLX11
         CheckOpenGLESX11
+        CheckVulkanTizen
         CheckMir
         CheckWayland
+        CheckTizen
         CheckLibUDev
         CheckDBus
         CheckIBus
@@ -23031,23 +23204,25 @@ $as_echo "#define SDL_AUDIO_DRIVER_ANDROID 1" >>confdefs.h
           esac
         fi
         # Set up files for the joystick library
-        if test x$enable_joystick = xyes; then
-          case $ARCH in
-            linux)
+        if test x$have_joystick != xyes; then
+            if test x$enable_joystick = xyes; then
+              case $ARCH in
+                linux)
 
 $as_echo "#define SDL_JOYSTICK_LINUX 1" >>confdefs.h
 
-                SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
-                have_joystick=yes
-            ;;
-            android)
+                    SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
+                    have_joystick=yes
+                ;;
+                android)
 
 $as_echo "#define SDL_JOYSTICK_ANDROID 1" >>confdefs.h
 
-                SOURCES="$SOURCES $srcdir/src/joystick/android/*.c"
-                have_joystick=yes
-            ;;
-          esac
+                    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
@@ -23785,7 +23960,7 @@ ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-confi
 ac_config_commands="$ac_config_commands 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