this is dicsomfitors focus problem. commit and lets see if peolpe
[framework/uifw/ecore.git] / configure.ac
index b16905e..f4a5806 100644 (file)
@@ -3,7 +3,7 @@
 m4_define([v_maj], [1])
 m4_define([v_min], [1])
 m4_define([v_mic], [99])
-m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n' | sed 's/Unversioneddirectory/0/']))
+m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n' | sed 's/Unversioneddirectory/0/' | tr -d '\n']))
 m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
 ##--   When released, remove the dnl on the below line
 dnl m4_undefine([v_rev])
@@ -133,6 +133,7 @@ want_ecore_psl1ght="no"
 want_ecore_fb="no"
 want_ecore_directfb="no"
 want_ecore_wince="no"
+want_ecore_wayland="no"
 
 # ecore_x options (both xlib and xcb)
 want_ecore_x_composite="yes"
@@ -173,16 +174,21 @@ want_ecore_evas_directfb="no"
 want_ecore_evas_fb="no"
 want_ecore_evas_software_16_wince="no"
 want_ecore_evas_ews="yes"
+want_ecore_evas_extn="yes"
+want_ecore_evas_wayland_shm="no"
+want_ecore_evas_wayland_egl="no"
 
 # ecore_imf modules
 want_ecore_imf_xim="no"
+want_ecore_imf_scim="no"
 
 case "$host_os" in
-   mingw32ce* | cegcc*)
+   mingw32ce*)
       want_ecore_con="no"
       want_ecore_ipc="no"
       want_ecore_wince="yes"
       want_ecore_evas_software_16_wince="yes"
+      want_ecore_evas_extn="no"
       ;;
    mingw*)
       want_notify_win32="yes"
@@ -224,6 +230,7 @@ case "$host_os" in
       want_ecore_fb="yes"
       want_ecore_imf="yes"
       want_ecore_x="yes"
+      want_ecore_wayland="yes"
       want_ecore_evas_software_x11="yes"
       want_ecore_evas_opengl_x11="yes"
       want_ecore_evas_software_16_x11="yes"
@@ -234,7 +241,10 @@ case "$host_os" in
       want_ecore_evas_gl_cocoa="no"
       want_ecore_evas_directfb="yes"
       want_ecore_evas_fb="yes"
+      want_ecore_evas_wayland_shm="yes"
+      want_ecore_evas_wayland_egl="yes"
       want_ecore_imf_xim="yes"
+      want_ecore_imf_scim="yes"
       ;;
 esac
 
@@ -262,30 +272,8 @@ requirements_ecore_x=""
 requirements_ecore_win32=""
 requirements_ecore_wince=""
 requirements_ecore_imf_xim=""
-
-AC_CHECK_DECL([MAXHOSTNAMELEN],[FOUND_MAXHOSTNAMELEN=yes])
-
-if test x$FOUND_MAXHOSTNAMELEN != xyes ; then
-  AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN])
-
-  FOUND_MAXHOSTNAMELEN='not found'
-
-  AC_COMPILE_IFELSE(
-       AC_LANG_PROGRAM([#include <sys/param.h>],
-               [int h = MAXHOSTNAMELEN;]),
-       [FOUND_MAXHOSTNAMELEN='sys/param.h'
-          AC_DEFINE(NEED_SYS_PARAM_H,1,
-            [Define to 1 if you need <sys/param.h> to define MAXHOSTNAMELEN])])
-
-       AC_COMPILE_IFELSE(
-           AC_LANG_PROGRAM([#include <netdb.h>],
-                           [int h = MAXHOSTNAMELEN;]),
-           [FOUND_MAXHOSTNAMELEN='netdb.h'
-            AC_DEFINE(NEED_NETDB_H,1,
-              [Define to 1 if you need <netdb.h> to define MAXHOSTNAMELEN])])
-
-  AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN])
-fi
+requirements_ecore_imf_scim=""
+requirements_ecore_wayland=""
 
 ### Additional options to configure
 
@@ -367,10 +355,6 @@ if test "x${want_xim}" = "xyes" ; then
    AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method])
 fi
 
-# Unit tests
-
-EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
-
 ### Checks for programs
 
 m4_ifdef([AC_PROG_OBJC],
@@ -489,6 +473,21 @@ case "$host_vendor" in
       ;;
 esac
 
+
+### Checks for portability layer
+
+PKG_CHECK_MODULES([EXOTIC],
+   [exotic],
+   [enable_exotic="yes"],
+   [enable_exotic="no"])
+
+if test "x${enable_exotic}" = "xyes"; then
+    requirements_ecore="exotic ${requirements_ecore}"
+
+    AC_DEFINE([HAVE_EXOTIC], [1], [Define to 1 if you have Exotic.])
+fi
+AM_CONDITIONAL([ECORE_HAVE_EXOTIC], [test "x${enable_exotic}" = "xyes"])
+
 AC_SUBST(EFL_ECORE_BUILD)
 AC_SUBST(EFL_ECORE_CON_BUILD)
 AC_SUBST(EFL_ECORE_EVAS_BUILD)
@@ -627,6 +626,45 @@ PKG_CHECK_MODULES([DIRECTFB],
 
 # Xlib and XCB (ecore_x)
 
+AC_CHECK_DECL([MAXHOSTNAMELEN], [FOUND_MAXHOSTNAMELEN=yes])
+
+if test "x${FOUND_MAXHOSTNAMELEN}" != "xyes" ; then
+   AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN])
+   FOUND_MAXHOSTNAMELEN="not found"
+
+   AC_COMPILE_IFELSE(
+      [
+       AC_LANG_PROGRAM(
+          [[
+#include <sys/param.h>
+          ]],
+          [[
+int h = MAXHOSTNAMELEN;
+          ]])
+      ],
+      [
+       FOUND_MAXHOSTNAMELEN="sys/param.h"
+       AC_DEFINE([NEED_SYS_PARAM_H], [1], [Define to 1 if you need <sys/param.h> to define MAXHOSTNAMELEN])
+      ])
+
+   AC_COMPILE_IFELSE(
+      [
+       AC_LANG_PROGRAM(
+          [[
+#include <netdb.h>
+          ]],
+          [[
+int h = MAXHOSTNAMELEN;
+          ]])
+      ],
+      [
+       FOUND_MAXHOSTNAMELEN="netdb.h"
+       AC_DEFINE([NEED_NETDB_H], [1], [Define to 1 if you need <netdb.h> to define MAXHOSTNAMELEN])
+      ])
+
+   AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN])
+fi
+
 have_x="no"
 have_ecore_x="no"
 have_ecore_x_xlib="no"
@@ -1190,7 +1228,23 @@ esac
 
 # ecore_con
 
-AC_CHECK_HEADERS([arpa/inet.h arpa/nameser.h netinet/tcp.h net/if.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h netdb.h])
+AC_CHECK_HEADERS([sys/socket.h])
+AC_CHECK_HEADERS([net/if.h], [], [],
+[
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+])
+AC_CHECK_HEADERS([sys/un.h arpa/inet.h arpa/nameser.h netinet/tcp.h netinet/in.h ws2tcpip.h netdb.h])
 
 if test "x${ac_cv_header_netdb_h}" = "xyes" ; then
    have_addrinfo="yes"
@@ -1380,6 +1434,60 @@ if ! test "x${have_atfile_source}" = "xno" ; then
       ])
 fi
 
+SHM_OPEN_LIBS=""
+
+AC_MSG_CHECKING([whether shm_open is in libc])
+AC_LINK_IFELSE(
+   [AC_LANG_PROGRAM(
+       [[
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+       ]],
+       [[
+int fd;
+fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+shm_unlink("/");
+       ]])],
+   [
+    have_shm_open="yes"
+    AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call])
+   ],
+   [have_shm_open="no"])
+LIBS="${LIBS_save}"
+AC_MSG_RESULT([${have_shm_open}])
+
+if ! test "x${have_shm_open}" = "xyes" ; then
+   AC_MSG_CHECKING([whether shm_open is in librt])
+   LIBS_save="${LIBS}"
+   LIBS="${LIBS} -lrt"
+   AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+          [[
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+          ]],
+          [[
+int fd;
+fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+shm_unlink("/");
+          ]])],
+      [
+       have_shm_open="yes"
+       AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call])
+       SHM_OPEN_LIBS="-lrt"
+      ],
+      [have_shm_open="no"])
+   LIBS="${LIBS_save}"
+   AC_MSG_RESULT([${have_shm_open}])
+fi
+
+AC_SUBST([SHM_OPEN_LIBS])
+
+AC_MSG_CHECKING([whether shm_open is available])
+AC_MSG_RESULT([${have_shm_open}])
+
 ### Checks for optionnal feature
 AC_CHECK_FUNC([mallinfo],
    [
@@ -1547,6 +1655,22 @@ fi
 ECORE_CHECK_MODULE([imf-xim], [${want_ecore_imf}], [Imf_XIM], [${ecore_imf_xim_deps}],
    [requirements_ecore_imf_xim="ecore-imf >= 1.1.99 ecore-x >= 1.1.99 ecore-input >= 1.1.99 ${requirements_ecore_imf_xim}"])
 
+# ecore_imf_scim
+PKG_CHECK_MODULES([SCIM], [scim], [have_scim="yes"], [have_scim="no"])
+
+AM_CONDITIONAL(BUILD_ECORE_IMF_SCIM, false)
+ecore_imf_scim_deps="no"
+echo "have_ecore_x_xlib: ${have_ecore_x_xlib}"
+if test    "x${have_ecore_imf}" = "xyes" \
+        -a "x${have_scim}" =  "xyes" \
+        -a "x${have_ecore_input}" = "xyes" ; then
+   ecore_imf_scim_deps="yes"
+   AC_DEFINE(BUILD_ECORE_IMF_SCIM, 1, [Ecore Imf SCIM Support])
+fi
+
+ECORE_CHECK_MODULE([imf-scim], [${want_ecore_imf}], [Imf_SCIM], [${ecore_imf_scim_deps}],
+   [requirements_ecore_imf_scim="ecore-imf >= 1.1.0 ecore-x >= 1.1.0 ecore-input >= 1.1.0 ${requirements_ecore_imf_scim}"])
+
 ## Graphic systems
 
 # ecore_x{cb}
@@ -1622,7 +1746,7 @@ ECORE_CHECK_MODULE([wince], [${want_ecore_wince}], [WinCE], [${have_ecore_input}
 # ecore_evas
 
 ecore_evas_deps="no"
-if test "x${have_evas}" = "xyes" -a "x${have_ecore_input}" = "xyes" -a "x${have_ecore_input_evas}" = "xyes" ; then
+if test "x${have_evas}" = "xyes" && test "x${have_ecore_input}" = "xyes" && test "x${have_ecore_input_evas}" = "xyes" ; then
    ecore_evas_deps="yes"
 fi
 
@@ -1758,11 +1882,13 @@ fi
 
 # ecore_evas_software_sdl
 
-ECORE_EVAS_CHECK_MODULE([software-sdl],
-   [${want_ecore_evas_software_sdl}],
-   [Software SDL],
-   [${have_ecore_sdl}],
-   [requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"])
+have_ecore_evas_software_sdl="no"
+if test "x${have_ecore_sdl}" = "xyes"; then
+   requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"
+   have_ecore_evas_software_sdl="yes"
+   AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_SDL, 1, [Support for Software SDL Engine in Ecore_Evas])
+   requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"
+fi
 
 # ecore_evas_gl_sdl
 
@@ -1811,6 +1937,24 @@ ECORE_EVAS_CHECK_MODULE_FULL([ews], [software-buffer],
    [Ecore Evas Single Process Windowing System],
    [yes], [])
 
+# ecore_evas_extn
+
+have_extn="yes"
+if test "x${have_ecore_ipc}" = "xno" || \
+   test "x${have_ecore_evas_software_buffer}" = "xno" || \
+   test "x${have_shm_open}" = "xno" ; then
+   have_extn="no"
+fi
+
+dnl THIS IS SPECIAL - dont use normal ECORE_EVAS_CHECK_MODULE
+have_ecore_evas_extn="no"
+if test "x${want_ecore_evas_extn}" = "xyes" && \
+   test "x${have_extn}" = "xyes" && \
+   test "x${have_ecore_evas}" = "xyes"; then
+   AC_DEFINE([BUILD_ECORE_EVAS_EXTN], [1], [Support for Extn Engine in Ecore_Evas])
+   have_ecore_evas_extn="yes"
+fi
+
 # ecore_evas_psl1ght
 
 ECORE_EVAS_CHECK_MODULE([psl1ght],
@@ -1819,6 +1963,43 @@ ECORE_EVAS_CHECK_MODULE([psl1ght],
    [${have_ecore_psl1ght}],
    [requirements_ecore_evas="ecore-psl1ght >= 1.1.99 ${requirements_ecore_evas}"])
 
+### WAYLAND
+
+ecore_wayland_deps="no"
+have_wayland="no"
+if test "x${want_ecore_wayland}" = "xyes" ; then
+  PKG_CHECK_MODULES([WAYLAND], [egl wayland-egl wayland-client xkbcommon], [have_wayland="yes"], [have_wayland="no"])
+fi
+if test "x${have_ecore_input}" = "xyes" -a "x${have_wayland}" = "xyes" ; then
+  ecore_wayland_deps="yes"
+fi
+
+ECORE_CHECK_MODULE([wayland], [${want_ecore_wayland}], [Wayland], [${ecore_wayland_deps}])
+if test "x${have_ecore_wayland}" = "xyes" ; then
+  requirements_ecore_wayland="ecore-input >= 1.1.0 egl wayland-egl wayland-client xkbcommon ${requirements_ecore_wayland}"
+fi
+
+ECORE_EVAS_CHECK_MODULE_FULL([wayland-shm], [wayland-shm], 
+   [${want_ecore_evas_wayland_shm}],
+   [Wayland Shm],
+   [${have_ecore_wayland}],
+   [requirements_ecore_evas="${requirements_ecore_wayland} ${requirements_ecore_evas}"])
+
+ECORE_EVAS_CHECK_MODULE_FULL([wayland-egl], [wayland-egl egl], 
+   [${want_ecore_evas_wayland_egl}],
+   [Wayland Egl],
+   [${have_ecore_wayland}],
+   [
+      PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl], [have_wayland_egl="yes"], [have_wayland_egl="no"])
+      if test "x${have_wayland_egl}" = "xyes" ; then
+         requirements_ecore_evas="wayland-egl egl ${requirements_ecore_wayland} ${requirements_ecore_evas}"
+      fi
+   ])
+
+### Unit tests
+
+EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
+
 ### install and build examples
 
 EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
@@ -1845,6 +2026,8 @@ AC_SUBST(requirements_ecore_x)
 AC_SUBST(requirements_ecore_win32)
 AC_SUBST(requirements_ecore_wince)
 AC_SUBST(requirements_ecore_imf_xim)
+AC_SUBST(requirements_ecore_imf_scim)
+AC_SUBST(requirements_ecore_wayland)
 
 AC_CONFIG_FILES([
 Makefile
@@ -1865,6 +2048,7 @@ ecore-sdl.pc
 ecore-cocoa.pc
 ecore-psl1ght.pc
 ecore-wince.pc
+ecore-wayland.pc
 ecore.pc
 doc/ecore.dox
 doc/Makefile
@@ -1893,11 +2077,13 @@ src/lib/ecore_wince/Makefile
 src/lib/ecore_x/Makefile
 src/lib/ecore_x/xlib/Makefile
 src/lib/ecore_x/xcb/Makefile
+src/lib/ecore_wayland/Makefile
 src/examples/Makefile
 src/tests/Makefile
 src/modules/Makefile
 src/modules/immodules/Makefile
 src/modules/immodules/xim/Makefile
+src/modules/immodules/scim/Makefile
 ecore.spec
 $po_makefile_in
 ])
@@ -1956,6 +2142,7 @@ fi
 #echo "  Ecore_Config.................: $have_ecore_config (deprecated)"
 echo "  Ecore_IMF....................: $have_ecore_imf"
 echo "    XIM........................: $have_ecore_imf_xim"
+echo "    SCIM.......................: $have_ecore_imf_scim"
 echo "  Ecore_IMF_Evas...............: $have_ecore_imf_evas"
 echo "  Ecore_Input..................: $have_ecore_input"
 echo "  Ecore_Input_Evas.............: $have_ecore_input_evas"
@@ -2011,6 +2198,7 @@ fi
 echo "  Ecore_DirectFB...............: $have_ecore_directfb"
 echo "  Ecore_WinCE..................: $have_ecore_wince"
 echo "  Ecore_PSL1GHT................: $have_ecore_psl1ght"
+echo "  Ecore_Wayland................: $have_ecore_wayland"
 
 echo
 echo " Ecore Evas:"
@@ -2044,6 +2232,9 @@ if test "x${have_ecore_evas}" = "xyes" ; then
   echo "    Software 16bit DirectDraw..: $have_ecore_evas_software_16_ddraw"
   echo "    Software 16bit WinCE.......: $have_ecore_evas_software_16_wince"
   echo "    Sing.Proc. Windowing System: $have_ecore_evas_ews"
+  echo "    Wayland Shm................: $have_ecore_evas_wayland_shm"
+  echo "    Wayland Egl................: $have_ecore_evas_wayland_egl"
+  echo "    Extn (Plug/socket Extn)....: $have_ecore_evas_extn"
 fi
 echo
 echo "  Tests................: ${enable_tests}"