summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-04-25 00:31:31 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-04-25 00:32:13 +0900
commit7dfe2c557372bfb7b6ce775e0230d0e893325481 (patch)
tree1abc8b175379b05e0627f558f244aaa6ce297521
parent5e4d26a1aad5275555b753823b8f9c3802d601bf (diff)
downloadefl-7dfe2c557372bfb7b6ce775e0230d0e893325481.tar.gz
add --with-api=XXX (both|legacy|eo) to define which api set to enable
by default (default == both).
-rw-r--r--configure.ac31
-rw-r--r--src/lib/efl/Efl_Config.h.in9
2 files changed, 39 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f8d1d9f9c1..ce70d86fa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,36 @@ AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([1.6 dist-bzip2 -Wall color-tests])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+#### Apply configuring with legacy api's only, eo api's or both.
+
+EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
+EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
+efl_api="both"
+
+AC_ARG_WITH([api],
+ [AC_HELP_STRING([--with-api=@<:@eo/legacy/both@:>@], [Select the EFL API Model @<:@default=both@:>@])],
+ [efl_api=${withval}],
+ [efl_api="both"])
+
+case "$efl_api" in
+ eo)
+ EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
+ EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
+ ;;
+ legacy)
+ EFL_API_LEGACY_DEF=""
+ EFL_API_EO_DEF=""
+ ;;
+ both)
+ EFL_API_LEGACY_DEF=""
+ EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
+ ;;
+ *) AC_MSG_ERROR([Invalid web backend: must be eo, legacy or both]) ;;
+esac
+
+AC_SUBST(EFL_API_LEGACY_DEF)
+AC_SUBST(EFL_API_EO_DEF)
+
#### Additional options to configure
AC_ARG_WITH([profile],
@@ -3786,6 +3816,7 @@ else
fi
echo "Configuration...: ${COLOR_OTHER}profile=${build_profile} os=${osname}${COLOR_RESET}"
+echo " EFL API Set...: ${efl_api}"
echo " CPU Extensions: ${host_cpu} (${features_cpu})"
echo " System Feature: ${features_system}"
echo " Threads.......: ${efl_have_threads} (${features_thread})"
diff --git a/src/lib/efl/Efl_Config.h.in b/src/lib/efl/Efl_Config.h.in
index 30c18aef20..e76c9e5f55 100644
--- a/src/lib/efl/Efl_Config.h.in
+++ b/src/lib/efl/Efl_Config.h.in
@@ -1,6 +1,13 @@
#ifndef EFL_CONFIG_H
#define EFL_CONFIG_H
-#define XYXYXY 1
+/* Add -DEFL_API_OVERRIDE ot your CFLAGS to override the default
+ * installed api set and then fter that -DEFL_NOLEGACY_API_SUPPORT
+ * and/or -DEFL_EO_API_SUPPORT as desired
+ */
+#ifndef EFL_API_OVERRIDE
+@EFL_API_LEGACY_DEF@
+@EFL_API_EO_DEF@
+#endif
#endif