use fprintf for messages
[framework/uifw/evas.git] / configure.ac
index e586fed..7fe7447 100644 (file)
@@ -1,7 +1,7 @@
 # get rid of that stupid cache mechanism
 rm -f config.cache
 
-AC_INIT([evas], [0.9.9.061], [enlightenment-devel@lists.sourceforge.net])
+AC_INIT([evas], [0.9.9.062], [enlightenment-devel@lists.sourceforge.net])
 AC_PREREQ([2.52])
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_MACRO_DIR([m4])
@@ -9,16 +9,9 @@ AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 AC_ISC_POSIX
 
-AM_INIT_AUTOMAKE(1.6 dist-bzip2)
-AM_CONFIG_HEADER(config.h)
-
-AC_PROG_CXX
-AC_PROG_CC
-AM_PROG_CC_STDC
-AC_HEADER_STDC
-AC_C_BIGENDIAN
-AC_C_CONST
-AC_C___ATTRIBUTE__
+AM_INIT_AUTOMAKE([1.6 dist-bzip2])
+AM_CONFIG_HEADER([config.h])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_LIBTOOL_WIN32_DLL
 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
@@ -31,7 +24,10 @@ SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
 AC_SUBST(version_info)
 
-release="ver-pre-svn-02"
+
+### Needed information
+
+release="ver-pre-svn-04"
 case "$host_os" in
    mingw32ce* | cegcc*)
       MODULE_ARCH="$host_os-$host_cpu"
@@ -45,11 +41,17 @@ AC_SUBST(release_info)
 AC_SUBST(MODULE_ARCH)
 AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
 
+# weird debian etch bug where pthread_barrier doesn't work without adding
+# this.
+CFLAGS="${CFLAGS=} -D_GNU_SOURCE"
+AC_SUBST(CFLAGS)
+
 want_fontconfig="auto"
 want_fribidi="auto"
+want_evas_cserve="yes"
 
 want_evas_engine_buffer="yes"
-want_evas_engine_software_x11="no"
+want_evas_engine_software_xlib="no"
 want_evas_engine_xrender_x11="no"
 want_evas_engine_gl_x11="no"
 want_evas_engine_cairo_x11="no"
@@ -98,180 +100,224 @@ case "$host_os" in
       want_evas_image_loader_svg="no"
       ;;
    darwin*)
-      want_evas_engine_software_x11="auto"
+      want_evas_engine_software_xlib="auto"
       want_evas_engine_quartz="auto"
       ;;
    *)
-      want_evas_engine_software_x11="auto"
+      want_evas_engine_software_xlib="auto"
       want_evas_engine_xrender_x11="auto"
       want_evas_engine_software_16_x11="auto"
       ;;
 esac
 
-LT_PROG_RC
-AC_FUNC_ALLOCA
+requirement_evas=""
 
+
+### Additional options to configure
+
+# when used, that option makes configure script fails when
+# a requirement is selected, but not met.
+use_strict="no"
+AC_ARG_ENABLE([strict],
+   AC_HELP_STRING([--enable-strict], [enable strict checking mode. @<:@default==disabled@:>@]),
+   [use_strict="yes"],
+   [use_strict="no"])
+
+# Simple X11 build/link
+AC_ARG_ENABLE([simple-x11],
+   AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking]),
+   [
+    if test "x${enableval}" = "xyes" ; then
+       want_evas_simple_x11="yes"
+    else
+       want_evas_simple_x11="no"
+    fi
+   ])
+
+
+### Checks for programs
+
+AC_PROG_CXX
+AC_PROG_CC
+
+# pkg-config
 PKG_PROG_PKG_CONFIG
 
-dnl wierd debian etch bug where pthread_barrier doesn't work without adding
-dnl this.
-CFLAGS="${CFLAGS=} -D_GNU_SOURCE"
-AC_SUBST(CFLAGS)
+# Check whether pkg-config supports Requires.private
+if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
+   pkgconfig_requires_private="Requires.private"
+else
+   pkgconfig_requires_private="Requires"
+fi
+AC_SUBST(pkgconfig_requires_private)
+
+# doxygen program for documentation building
+EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
+
+
+### Checks for libraries
+
+# Evil library for compilation on Windows CE
 
-WIN32_CPPFLAGS=""
-WIN32_CFLAGS=""
-lt_enable_auto_import=""
 case "$host_os" in
-        mingw*|cegcc*)
-               PKG_CHECK_MODULES(EVIL, evil)
-               AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
-               dnl needed for correct definition of EAPI
-               AC_DEFINE(EFL_EVAS_BUILD, 1, [Define to mention that evas is built])
-                if test "$host_os" = "cegcc" ; then
-                        WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
-                        WIN32_CFLAGS="-mwin32"
-                       lt_enable_auto_import="-Wl,--enable-auto-import"
-                fi
-                if test "$host_os" = "mingw32ce" ; then
-                        WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
-                fi
-                ;;
+   mingw* | cegcc*)
+      PKG_CHECK_MODULES([EVIL], [evil])
+      AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
+      requirement_evas="evil ${requirement_evas}"
+   ;;
 esac
-AC_SUBST(WIN32_CPPFLAGS)
-AC_SUBST(WIN32_CFLAGS)
-AC_SUBST(lt_enable_auto_import)
 
+## strong dependencies
 
-dnl when used, that option makes configure script fails when
-dnl a requirement is selected, but not met.
-AC_ARG_ENABLE(strict,
-  AC_HELP_STRING(
-    [--enable-strict],
-    [enable strict checking mode. [[default==disabled]]]),
-  [use_strict="yes"],
-  [use_strict="no"]
-)
+# Eina
+PKG_CHECK_MODULES([EINA], [eina-0])
 
-#######################################
-## CACHE SERVER (CSERVE / CS)
-want_evas_cserve="yes"
-AC_MSG_CHECKING(whether to build shared cache server and support)
-AC_ARG_ENABLE(evas-cserve,
-  AC_HELP_STRING(
-    [--disable-evas-cserve],
-    [disable shared cache server support. [[default=enabled]]]
-  ),
-  [ want_evas_cserve="$enableval" ]
-)
-AC_MSG_RESULT($want_evas_cserve)
+# Freetype
+PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 9.3.0])
 
-if test "x${want_evas_cserve}" = "xyes" ; then
-   AC_MSG_CHECKING([whether shm_open() is present])
-   LIBS_save=${LIBS}
-   LIBS="$LIBS -lrt"
-   AC_LINK_IFELSE(
-      [AC_LANG_PROGRAM(
-         [[
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-         ]],
-         [[
-int fd;
-fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
-shm_unlink("/");
-         ]])],
-      [want_evas_cserve="yes"],
-      [want_evas_cserve="no"])
-   LIBS=${LIBS_save}
-   AC_MSG_RESULT([$want_evas_cserve])
-fi
+requirement_evas="freetype2 eina-0 ${requirement_evas}"
 
-AM_CONDITIONAL(EVAS_CSERVE, test "x$want_evas_cserve" = "xyes")
-if test "x$want_evas_cserve" = "xyes"; then
-  AC_DEFINE(EVAS_CSERVE, 1, [Shared caceh server.])
-fi
+## optional dependencies
+
+# FontConfig
+have_fontconfig="no"
+AC_ARG_ENABLE([fontconfig],
+   AC_HELP_STRING([--disable-fontconfig],
+      [disable fontconfig for finding fonts. @<:@default=enabled@:>@]),
+   [
+    if test "x${enableval}" = "xyes" ; then
+       want_fontconfig="yes"
+    else
+       want_fontconfig="no"
+    fi
+   ])
 
-##################################################################
-#fribidi support - OPTIONAL!
 
+if test "x${want_fontconfig}" = "xyes" -o "x${want_fontconfig}" = "xauto" ; then
+   PKG_CHECK_MODULES([FONTCONFIG],
+      [fontconfig],
+      [
+       have_fontconfig="yes"
+       AC_DEFINE(HAVE_FONTCONFIG, 1, [have fontconfig searching capabilities])
+       requirement_evas="fontconfig ${requirement_evas}"
+      ],
+      [
+       if test "x${want_fontconfig}" = "xyes" -a "x${use_strict}" = "xyes" ; then
+          AC_MSG_ERROR([Fontconfig not found (strict dependencies checking)])
+       fi
+      ])
+fi
+
+# fribidi support
 have_fribidi="no"
-AC_ARG_ENABLE(fribidi,
-  AC_HELP_STRING(
-    [--disable-fribidi],
-    [disable bidirectional text support. [[default=enabled]]]
-  ),
-  [ want_fribidi=$enableval ]
-)
+AC_ARG_ENABLE([fribidi],
+   AC_HELP_STRING([--disable-fribidi],
+      [disable bidirectional text support. @<:@default=enabled@:>@]),
+   [
+    if test "x${enableval}" = "xyes" ; then
+       want_fribidi="yes"
+    else
+       want_fribidi="no"
+    fi
+   ])
 
-if test "x$want_fribidi" = "xyes" -o "x$want_fribidi" = "xauto" ; then
-  # Check if really available
-  PKG_CHECK_MODULES(FRIBIDI, fribidi,
-    [
-      have_fribidi="yes"
-      AC_DEFINE(HAVE_FRIBIDI, 1, [have fribidi support])
-    ],
-    [
-      if test "x$want_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then
-        AC_MSG_ERROR([Fribidi not found (strict dependencies checking)])
-      fi
-    ])
+if test "x${want_fribidi}" = "xyes" -o "x${want_fribidi}" = "xauto" ; then
+   PKG_CHECK_MODULES([FRIBIDI],
+      [fribidi],
+      [
+       have_fribidi="yes"
+       AC_DEFINE(HAVE_FRIBIDI, 1, [have fribidi support])
+       requirement_evas="fribidi ${requirement_evas}"
+      ],
+      [
+       if test "x$want_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then
+          AC_MSG_ERROR([Fribidi not found (strict dependencies checking)])
+       fi
+      ])
 fi
-if test "x$have_fribidi" = "xno"; then
+
+if test "x${have_fribidi}" = "xno"; then
   HAS_BIDI=0
 fi
-#####################################################################
-# Check evas strong dependencie
 
-PKG_CHECK_MODULES([EINA], [eina-0])
+### Checks for header files
+AC_HEADER_STDC
 
-PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 9.3.0])
+# fnmatch.h
+AC_CHECK_HEADER([fnmatch.h],
+   [dummy="yes"],
+   [AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file. MinGW users: see the INSTALL file])])
 
-#######################################
-## Simple X11 build/link
 
-AC_ARG_ENABLE(simple-x11,
-  AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking]),
-  [ want_evas_simple_x11=$enableval ]
-)
+### Checks for types
 
-#######################################
-## FontConfig
 
-have_fontconfig="no"
-AC_ARG_ENABLE(fontconfig,
-  AC_HELP_STRING(
-    [--disable-fontconfig],
-    [disable fontconfig for finding fonts. [[default=enabled]]]
-  ),
-  [ want_fontconfig=$enableval ]
-)
+### Checks for structures
 
-if test "x$want_fontconfig" = "xyes" -o "x$want_fontconfig" = "xauto" ; then
-  # Check if really available
-  PKG_CHECK_MODULES(FONTCONFIG, fontconfig,
-    [
-      have_fontconfig="yes"
-      AC_DEFINE(HAVE_FONTCONFIG, 1, [have fontconfig searching capabilities])
-    ],
-    [
-      if test "x$want_fontconfig" = "xyes" -a "x$use_strict" = "xyes" ; then
-        AC_MSG_ERROR([Fontconfig not found (strict dependencies checking)])
-      fi
-    ])
-fi
 
-###############
-## dlopen
+### Checks for compiler characteristics
+AC_C_CONST
+AC_C_BIGENDIAN
+AC_C___ATTRIBUTE__
+AM_PROG_CC_STDC
+
+WIN32_CPPFLAGS=""
+case "$host_os" in
+   mingw32ce* | cegcc*)
+      WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
+      ;;
+   mingw*)
+      WIN32_CPPFLAGS="-D_WIN32_WINNT=0x0500"
+      ;;
+esac
+AC_SUBST(WIN32_CPPFLAGS)
+
+WIN32_CFLAGS=""
+case "${host_os}" in
+   cegcc*)
+      WIN32_CFLAGS="-mwin32"
+   ;;
+esac
+AC_SUBST(WIN32_CFLAGS)
+
+
+### Checks for linker characteristics
+lt_enable_auto_import=""
+case "${host_os}" in
+   mingw* | cegcc*)
+      AC_DEFINE(EFL_EVAS_BUILD, 1, [Define to mention that evas is built])
+      lt_enable_auto_import="-Wl,--enable-auto-import"
+   ;;
+esac
+AC_SUBST(lt_enable_auto_import)
+
+
+### Checks for library functions
+
+# alloca
+AC_FUNC_ALLOCA
 
+# fnmatch
+AC_CHECK_FUNCS([fnmatch], [res="yes"], [res="no"])
+if test "x$res" = "xno"; then
+   AC_SEARCH_LIBS([fnmatch],
+      [fnmatch evil iberty],
+      [res="yes"],
+      [res="no"])
+   if test "x$res" = "xno"; then
+      AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty, nor libevil])
+   fi
+fi
+
+# dlopen
 dlopen_libs=""
 case "$host_os" in
   mingw32ce* | cegcc*)
-dnl managed by evil
+# managed by evil
     AC_DEFINE(HAVE_DLADDR)
   ;;
   mingw*)
-dnl nothing on mingw platform
+# nothing on mingw platform
   ;;
   *)
     AC_CHECK_FUNCS(dlopen, res=yes, res=no)
@@ -289,27 +335,118 @@ dnl nothing on mingw platform
 esac
 AC_SUBST(dlopen_libs)
 
-AC_CHECK_HEADER([fnmatch.h],
-   [dummy="yes"],
-   [AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file. MinGW users: see the INSTALL file])])
+# (shm_open (for cache server)
+AC_ARG_ENABLE([evas-cserve],
+   AC_HELP_STRING([--disable-evas-cserve],
+      [disable shared cache server support. @<:@default=enabled@:>@]),
+   [
+    if test "x${enableval}" = "xyes" ; then
+       want_evas_cserve="yes"
+    else
+       want_evas_cserve="no"
+    fi
+   ])
+AC_MSG_CHECKING(whether to build shared cache server and support)
+AC_MSG_RESULT(${want_evas_cserve})
 
-AC_CHECK_FUNCS([fnmatch], [res="yes"], [res="no"])
-if test "x$res" = "xno"; then
-   AC_SEARCH_LIBS([fnmatch],
-      [fnmatch evil iberty],
-      [res="yes"],
-      [res="no"])
-   if test "x$res" = "xno"; then
-      AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty, nor libevil])
-   fi
+if test "x${want_evas_cserve}" = "xyes" ; then
+   AC_MSG_CHECKING([whether shm_open() is present])
+   LIBS_save=${LIBS}
+   LIBS="${LIBS} -lrt"
+   AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+         ]],
+         [[
+int fd;
+fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+shm_unlink("/");
+         ]])],
+      [want_evas_cserve="yes"],
+      [want_evas_cserve="no"])
+   LIBS=${LIBS_save}
+   AC_MSG_RESULT([${want_evas_cserve}])
+fi
+
+if test "x${want_evas_cserve}" = "xyes" ; then
+  AC_DEFINE(EVAS_CSERVE, 1, [Shared caceh server.])
 fi
 
+AM_CONDITIONAL([EVAS_CSERVE], [test "x${want_evas_cserve}" = "xyes"])
+
+
+
+#######################################
+## GL force flavor gles
+gl_flavor_gles="no"
+AC_MSG_CHECKING(whether to build GLES flavor of GL)
+AC_ARG_ENABLE(gl-flavor-gles,
+  AC_HELP_STRING([--enable-gl-flavor-gles], [enable gles falvor of gl instead of standard]),
+  [
+      if test "x$enableval" = "xyes" ; then
+        AC_MSG_RESULT(yes)
+        gl_flavor_gles="yes"
+      else
+        AC_MSG_RESULT(no)
+        gl_flavor_gles="no"
+      fi
+  ], [
+      AC_MSG_RESULT(no)
+      gl_flavor_gles="no"
+  ]
+)
+
+#######################################
+## GLES variety sgx
+gles_variety_sgx="no"
+AC_MSG_CHECKING(whether to build GLES variety for SGX)
+AC_ARG_ENABLE(gles-variety-sgx,
+  AC_HELP_STRING([--enable-gles-variety-sgx], [GLES variety SGX 3D unit]),
+  [
+      if test "x$enableval" = "xyes" ; then
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
+        gles_variety_sgx="yes"
+      else
+        AC_MSG_RESULT(no)
+        gles_variety_sgx="no"
+      fi
+  ], [
+      AC_MSG_RESULT(no)
+      gles_variety_sgx="no"
+  ]
+)
+
+#######################################
+## GLES variety s3c6410
+gles_variety_s3c6410="no"
+AC_MSG_CHECKING(whether to build GLES variety for s3c6410)
+AC_ARG_ENABLE(gles-variety-s3c6410,
+  AC_HELP_STRING([--enable-gles-variety-s3c6410], [GLES variety s3c6410 3D unit]),
+  [
+      if test "x$enableval" = "xyes" ; then
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(GLES_VARIETY_S3C6410, 1, [Samsung S3c6410 GLES2 support])
+        gles_variety_s3c6410="yes"
+      else
+        AC_MSG_RESULT(no)
+        gles_variety_s3c6410="no"
+      fi
+  ], [
+      AC_MSG_RESULT(no)
+      gles_variety_s3c6410="no"
+  ]
+)
+
 #####################################################################
 ## Engines
 
 EVAS_CHECK_ENGINE([buffer], [${want_evas_engine_buffer}], [no], [Buffer])
 
-EVAS_CHECK_ENGINE([software-x11], [${want_evas_engine_software_x11}], [yes], [Software X11])
+EVAS_CHECK_ENGINE([software-xlib], [${want_evas_engine_software_xlib}], [yes], [Software Xlib])
 
 EVAS_CHECK_ENGINE([xrender-x11], [${want_evas_engine_xrender_x11}], [yes], [XRender X11])
 
@@ -360,15 +497,11 @@ have_evas_engine_gl_common="no"
 if test "x$have_evas_engine_gl_x11" = "xyes" -o "x$have_evas_engine_gl_glew" = "xyes"; then
    AC_DEFINE(BUILD_ENGINE_GL_COMMON, 1, [Generic OpenGL Rendering Support])
    have_evas_engine_gl_common="yes"
-   evas_engine_gl_common_libs="-lglu32"
-fi
-
-if test "x$have_evas_engine_gl_x11" = "xyes" ; then
-   evas_engine_gl_common_libs="-lGL -lGLU -lpthread"
+   evas_engine_gl_common_libs=""
 fi
 
 if test "x$have_evas_engine_gl_glew" = "xyes" ; then
-   evas_engine_gl_common_libs="-lglu32"
+   evas_engine_gl_common_libs=""
 fi
 AC_SUBST([evas_engine_gl_common_libs])
 
@@ -402,6 +535,38 @@ if test "x${have_static_software_generic}" = "xyes"; then
    AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, [1], [Build software generic engine as part of libevas])
 fi
 
+# if software_xlib or software_xcb are available, define everything needed for X11
+have_evas_engine_software_x11="no"
+if test "x$have_evas_engine_software_xlib" = "xstatic" -o "x$have_evas_engine_software_xcb" = "xstatic" ; then
+   have_evas_engine_software_x11="static"
+else
+   if test "x$have_evas_engine_software_xlib" = "xyes" -o "x$have_evas_engine_software_xcb" = "xyes" ; then
+      have_evas_engine_software_x11="yes"
+   fi
+fi
+
+if test "x$have_evas_engine_software_xlib" = "xstatic" ; then
+   have_evas_engine_software_xlib="yes"
+fi
+
+if test "x$have_evas_engine_software_xcb" = "xstatic" ; then
+   have_evas_engine_software_xcb="yes"
+fi
+
+if test "x$have_evas_engine_software_x11" = "xyes" -o "x$have_evas_engine_software_x11" = "xstatic" ; then
+   AC_DEFINE(BUILD_ENGINE_SOFTWARE_X11, [1], [Build software X11 engines])
+fi
+
+if test "x$have_evas_engine_software_x11" = "xstatic" ; then
+   AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_X11, [1], [Build software X11 engines as part of libevas])
+fi
+
+AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xyes" -o "x${have_evas_engine_software_x11}" = "xstatic"])
+AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xstatic"])
+
+AC_SUBST(have_evas_engine_software_xlib)
+AC_SUBST(have_evas_engine_software_xcb)
+
 # if software 16 x11 is enabled - build software_16 (the generic 16bit
 # engine). later enable it fb_16 or other "16" bit engines are enabled.
 have_evas_engine_software_16="no"
@@ -777,7 +942,6 @@ AC_ARG_ENABLE(cpu-neon,
 
 #######################################
 ## C
-build_cpu_c="no"
 build_cpu_c="yes"
 AC_MSG_CHECKING(whether to build c code)
 AC_ARG_ENABLE(cpu-c,
@@ -822,51 +986,9 @@ fi
 
 #######################################
 ## Nearest sampling scaler
-scaler_sample="no"
-scaler_sample="yes"
-AC_MSG_CHECKING(whether to build sampling scaler)
-AC_ARG_ENABLE(scale-sample,
-  AC_HELP_STRING([--enable-scale-sample], [enable sampling scaler code]),
-  [
-      if test "x$enableval" = "xyes" ; then
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(BUILD_SCALE_SAMPLE, 1, [Sampling Scaler Support])
-        scaler_sample="yes"
-      else
-        AC_MSG_RESULT(no)
-        scaler_sample="no"
-      fi
-  ], [
-      AC_MSG_RESULT($scaler_sample)
-      if test "x$scaler_sample" = "xyes" ; then
-        AC_DEFINE(BUILD_SCALE_SAMPLE, 1, [Sampling Scaler Support])
-      fi
-  ]
-)
-
-#######################################
+EVAS_CHECK_SCALER([scale-sample], [sampling scaler], [scaler_sample="yes"], [scaler_sample="no"])
 ## Smooth super and sub sampling scaler
-scaler_smooth="no"
-scaler_smooth="yes"
-AC_MSG_CHECKING(whether to build smooth scaler)
-AC_ARG_ENABLE(scale-smooth,
-  AC_HELP_STRING([--enable-scale-smooth], [enable smooth scaler code]),
-  [
-      if test "x$enableval" = "xyes" ; then
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(BUILD_SCALE_SMOOTH, 1, [Smooth Scaler Support])
-        scaler_smooth="yes"
-      else
-        AC_MSG_RESULT(no)
-        scaler_smooth="no"
-      fi
-  ], [
-      AC_MSG_RESULT($scaler_smooth)
-      if test "x$scaler_smooth" = "xyes" ; then
-        AC_DEFINE(BUILD_SCALE_SMOOTH, 1, [Smooth Scaler Support])
-      fi
-  ]
-)
+EVAS_CHECK_SCALER([scale-smooth], [smooth scaler], [scaler_smooth="yes"], [scaler_smooth="no"])
 
 #######################################
 ## YUV -> ARGB converter
@@ -897,72 +1019,11 @@ AC_ARG_ENABLE(convert-yuv,
 
 #######################################
 ## Small dither mask instead of big one (lower quality)
-conv_small_dither="no"
-AC_MSG_CHECKING(whether to build small dither mask code)
-AC_ARG_ENABLE(small-dither-mask,
-  AC_HELP_STRING([--enable-small-dither-mask], [enable small dither mask code]),
-  [
-      if test "x$enableval" = "xyes" ; then
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(BUILD_SMALL_DITHER_MASK, 1, [Small Dither Mask Support])
-        conv_small_dither="yes"
-      else
-        AC_MSG_RESULT(no)
-        conv_small_dither="no"
-      fi
-  ], [
-      AC_MSG_RESULT($conv_small_dither)
-      if test "x$conv_small_dither" = "xyes" ; then
-        AC_DEFINE(BUILD_SMALL_DITHER_MASK, 1, [Small Dither Mask Support])
-      fi
-  ]
-)
-
-#######################################
+EVAS_CHECK_DITHER([small-dither-mask], [small dither mask], [conv_small_dither="yes"], [conv_small_dither="no"])
 ## Alternate Line dither mask instead of big one (lower quality - but fastest)
-conv_line_dither="no"
-AC_MSG_CHECKING(whether to build line dither mask code)
-AC_ARG_ENABLE(line-dither-mask,
-  AC_HELP_STRING([--enable-line-dither-mask], [enable line dither mask code]),
-  [
-      if test "x$enableval" = "xyes" ; then
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(BUILD_LINE_DITHER_MASK, 1, [Line Dither Mask Support])
-        conv_line_dither="yes"
-      else
-        AC_MSG_RESULT(no)
-        conv_line_dither="no"
-      fi
-  ], [
-      AC_MSG_RESULT($conv_line_dither)
-      if test "x$conv_line_dither" = "xyes" ; then
-        AC_DEFINE(BUILD_LINE_DITHER_MASK, 1, [Line Dither Mask Support])
-      fi
-  ]
-)
-
-#######################################
+EVAS_CHECK_DITHER([line-dither-mask], [line dither mask], [conv_line_dither="yes"], [conv_line_dither="no"])
 ## No dither mask at all for 16bpp
-conv_no_dither="no"
-AC_MSG_CHECKING(whether to build without dither mask for 16bpp)
-AC_ARG_ENABLE(no-dither-mask,
-  AC_HELP_STRING([--enable-no-dither-mask], [enable conversion to 16bpp without dither mask]),
-  [
-      if test "x$enableval" = "xyes" ; then
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(BUILD_NO_DITHER_MASK, 1, [No Dither Mask Support])
-        conv_no_dither="yes"
-      else
-        AC_MSG_RESULT(no)
-        conv_no_dither="no"
-      fi
-  ], [
-      AC_MSG_RESULT($conv_no_dither)
-      if test "x$conv_no_dither" = "xyes" ; then
-        AC_DEFINE(BUILD_NO_DITHER_MASK, 1, [No Dither Mask Support])
-      fi
-  ]
-)
+EVAS_CHECK_DITHER([no-dither-mask], [conversion to 16bpp without dither mask], [conv_no_dither="yes"], [conv_no_dither="no"])
 
 #######################################
 ## Convert to 8bpp RGB 332
@@ -1085,6 +1146,27 @@ EVAS_CONVERT_ROT(32, RGB, 270)
 ## Convert to 32bpp RGB with rotation of 90
 EVAS_CONVERT_ROT(32, RGB, 90)
 
+#######################################
+## Convert to 8bpp grayscale, 64-palette
+conv_8_grayscale_64="yes"
+AC_MSG_CHECKING(whether to build 8bpp grayscale 64-palette converter code)
+AC_ARG_ENABLE(convert-8-grayscale-64,
+  AC_HELP_STRING([--disable-convert-8-grayscale-64], [disable 8bpp grayscale 64-palette converter code]),
+  [
+     if test "$enableval" = "xyes"; then
+       AC_DEFINE(BUILD_CONVERT_8_GRAYSCALE_64, 1, [8bpp Grayscale 64-palette Converter Support])
+       conv_8_grayscale_64="yes"
+     else
+       conv_8_grayscale_64="no"
+     fi
+  ], [
+     if test "x$conv_8_grayscale_64" = "xyes"; then
+       AC_DEFINE(BUILD_CONVERT_8_GRAYSCALE_64, 1, [32bpp Grayscale 64-palette Converter Support])
+     fi
+  ]
+)
+AC_MSG_RESULT($conv_8_grayscale_64)
+
 ## valgrind
 want_valgrind="no"
 have_valgrind="no"
@@ -1101,6 +1183,7 @@ if test x$want_valgrind = "xyes"; then
     [
       AC_DEFINE(HAVE_VALGRIND, 1, [Valgrind support])
       have_valgrind=yes
+      requirement_evas="valgrind ${requirement_evas}"
     ],
     [
       if test "x$want_valgrind" = "xyes" -a "x$use_strict" = "xyes" ; then
@@ -1110,13 +1193,13 @@ if test x$want_valgrind = "xyes"; then
   )
 fi
 
-EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
 #####################################################################
 ## Fill in flags
 
 AC_SUBST(altivec_cflags)
 AC_SUBST(pthread_cflags)
 AC_SUBST(pthread_libs)
+AC_SUBST(requirement_evas)
 
 
 #####################################################################
@@ -1132,7 +1215,6 @@ evas-quartz.pc
 evas-software-buffer.pc
 evas-software-x11.pc
 evas-software-16-x11.pc
-evas-software-xcb.pc
 evas-xrender-x11.pc
 evas-xrender-xcb.pc
 evas-software-gdi.pc
@@ -1224,37 +1306,37 @@ echo
 echo "Configuration Options Summary:"
 echo
 echo "Engines:"
-echo "  Software Memory Buffer.....: $have_evas_engine_buffer $have_static_evas_engine_buffer"
-echo "  Software X11...............: $have_evas_engine_software_x11  $have_static_evas_engine_software_x11 (XCB: $have_evas_engine_software_xcb)"
-echo "  XRender X11................: $have_evas_engine_xrender_x11 $have_static_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
-echo "  OpenGL X11.................: $have_evas_engine_gl_x11 $have_static_evas_engine_gl_x11"
-#echo "  Cairo X11..................: $have_evas_engine_cairo_x11 $have_static_evas_engine_cairo_x11"
-echo "  Software GDI...............: $have_evas_engine_software_gdi $have_static_evas_engine_gdi"
-echo "  Software DirectDraw........: $have_evas_engine_software_ddraw $have_static_evas_engine_ddraw"
-echo "  Direct3d...................: $have_evas_engine_direct3d $have_static_evas_engine_direct3d"
-echo "  Quartz.....................: $have_evas_engine_quartz $have_static_evas_engine_quartz"
-echo "  OpenGL Glew................: $have_evas_engine_gl_glew $have_static_evas_engine_gl_glew"
-echo "  Software SDL...............: $have_evas_engine_software_sdl $have_static_evas_engine_software_sdl (primitive: $sdl_primitive)"
-echo "  Software Framebuffer.......: $have_evas_engine_fb $have_static_evas_engine_fb"
-echo "  DirectFB...................: $have_evas_engine_directfb $have_static_evas_engine_directfb"
-#echo "  Software Qtopia............: $have_evas_engine_software_qtopia $have_static_evas_engine_software_qtopia"
-echo "  Software 16bit ............: $have_evas_engine_software_16 $have_static_evas_engine_software_16"
-echo "  Software 16bit X11.........: $have_evas_engine_software_16_x11 $have_static_evas_engine_software_16_x11"
-echo "  Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw $have_static_evas_engine_ddraw"
-echo "  Software 16bit WinCE.......: $have_evas_engine_software_16_wince $have_static_evas_engine_wince"
-echo "  Software 16bit SDL.........: $have_evas_engine_software_sdl $have_static_evas_engine_software_sdl (primitive: $sdl_primitive)"
+echo "  Software Memory Buffer.....: $have_evas_engine_buffer"
+echo "  Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)"
+echo "  XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
+echo "  OpenGL X11.................: $have_evas_engine_gl_x11 (GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
+#echo "  Cairo X11..................: $have_evas_engine_cairo_x11"
+echo "  Software GDI...............: $have_evas_engine_software_gdi"
+echo "  Software DirectDraw........: $have_evas_engine_software_ddraw"
+echo "  Direct3d...................: $have_evas_engine_direct3d"
+echo "  Quartz.....................: $have_evas_engine_quartz"
+echo "  OpenGL Glew................: $have_evas_engine_gl_glew"
+echo "  Software SDL...............: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
+echo "  Software Framebuffer.......: $have_evas_engine_fb"
+echo "  DirectFB...................: $have_evas_engine_directfb"
+#echo "  Software Qtopia............: $have_evas_engine_software_qtopia"
+echo "  Software 16bit ............: $have_evas_engine_software_16"
+echo "  Software 16bit X11.........: $have_evas_engine_software_16_x11"
+echo "  Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw"
+echo "  Software 16bit WinCE.......: $have_evas_engine_software_16_wince"
+echo "  Software 16bit SDL.........: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
 # FIXME: opengl engine needs to be fixed and tested lots for all drivers
 echo
 echo "Image Loaders:"
-echo "  EDB.....................: $have_evas_image_loader_edb $have_static_evas_image_loader_edb"
-echo "  EET.....................: $have_evas_image_loader_eet $have_static_evas_image_loader_eet"
-echo "  GIF.....................: $have_evas_image_loader_gif $have_static_evas_image_loader_gif"
-echo "  JPEG....................: $have_evas_image_loader_jpeg $have_static_evas_image_loader_jpeg"
-echo "  PMAPS...................: $have_evas_image_loader_pmaps $have_static_evas_image_loader_pmaps"
-echo "  PNG.....................: $have_evas_image_loader_png $have_static_evas_image_loader_png"
-echo "  SVG.....................: $have_evas_image_loader_svg $have_static_evas_image_loader_svg"
-echo "  TIFF....................: $have_evas_image_loader_tiff $have_static_evas_image_loader_tiff"
-echo "  XPM.....................: $have_evas_image_loader_xpm $have_static_evas_image_loader_xpm"
+echo "  EDB.....................: $have_evas_image_loader_edb"
+echo "  EET.....................: $have_evas_image_loader_eet"
+echo "  GIF.....................: $have_evas_image_loader_gif"
+echo "  JPEG....................: $have_evas_image_loader_jpeg (region: $have_jpeg_region)"
+echo "  PMAPS...................: $have_evas_image_loader_pmaps"
+echo "  PNG.....................: $have_evas_image_loader_png"
+echo "  SVG.....................: $have_evas_image_loader_svg"
+echo "  TIFF....................: $have_evas_image_loader_tiff"
+echo "  XPM.....................: $have_evas_image_loader_xpm"
 # FIXME: need to add modular image loader system
 # FIXME: add more image loader modules
 echo
@@ -1274,6 +1356,7 @@ echo "  SSE.....................: $build_cpu_sse"
 echo "  ALTIVEC.................: $build_cpu_altivec"
 echo "  NEON....................: $build_cpu_neon"
 echo "  Thread Support..........: $build_pthreads"
+echo
 echo "Features:"
 echo "  MAGIC_DEBUG.............: $want_evas_magic_debug"
 echo "  Cache Server............: $want_evas_cserve"
@@ -1300,6 +1383,7 @@ echo "  8bpp RGB 222............: $conv_8_rgb_222"
 echo "  8bpp RGB 221............: $conv_8_rgb_221"
 echo "  8bpp RGB 121............: $conv_8_rgb_121"
 echo "  8bpp RGB 111............: $conv_8_rgb_111"
+echo "  8bpp Grayscale 64-pal...: $conv_8_grayscale_64"
 # FIXME: add grayscale and B&W support
 echo "  16bpp RGB 565...........: $conv_16_rgb_565"
 echo "  16bpp BGR 565...........: $conv_16_bgr_565"
@@ -1336,3 +1420,10 @@ echo "Now type 'make' ('gmake' on some systems) to compile $PACKAGE,"
 echo "and then afterwards as root (or the user who will install this), type"
 echo "'make install'. Change users with 'su' or 'sudo' appropriately."
 echo
+if test "x${have_static_module}" = "xyes" ; then
+echo -e "\0033\01331;31mWarning\0033\01331;0m: You are trying to link statically one or more modules to Evas."
+echo "         You must know what you are doing, or else you will have a lot of problems."
+echo "         And Kenny will be killed."
+echo "         Think about that."
+echo
+fi