billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=5d169ebd7186f8889a1de57b3c2cb4d9a2c4fc6c

commit 5d169ebd7186f8889a1de57b3c2cb4d9a2c4fc6c
Author: Boris Faure <bill...@gmail.com>
Date:   Sat Feb 21 11:31:24 2015 +0100

    correctly check if ecore_con_url_head() is available
---
 configure.ac  | 23 +++++++++++++++++++++++
 src/bin/win.c |  8 ++------
 2 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b0d9d7..1d5367b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,6 +80,29 @@ PKG_CHECK_MODULES([ELDBUS],
 
 AC_CHECK_FUNCS(mkstemps)
 
+AC_MSG_CHECKING([for ecore_con_url_head])
+orig_cflags=$CFLAGS
+CFLAGS+=" $TERMINOLOGY_CFLAGS "
+AC_COMPILE_IFELSE(
+   [
+    AC_LANG_PROGRAM(
+      [[
+       #include <Ecore_Con.h>
+      ]],
+     [[
+        ecore_con_url_head(NULL);
+     ]])
+   ],
+   [
+     AC_MSG_RESULT([yes])
+     AC_DEFINE([HAVE_ECORE_CON_URL_HEAD], [1], [define to 1 if 
ecore_con_url_head is available])
+   ],
+   [
+     AC_MSG_RESULT([no])
+   ]
+)
+CFLAGS=$orig_cflags
+
 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
 
 with_max_log_level="EINA_LOG_LEVEL_ERR"
diff --git a/src/bin/win.c b/src/bin/win.c
index f6a4124..90b9c72 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -1591,11 +1591,7 @@ _popmedia_show(Term *term, const char *src, Media_Type 
type)
      }
 }
 
-/* TODO: XXX: should be s/13/14 */
-#define HAVE_ECORE_CON_URL_HTTP_HEAD \
-   ((ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 13))
-
-#if HAVE_ECORE_CON_URL_HTTP_HEAD
+#ifdef HAVE_ECORE_CON_URL_HEAD
 typedef struct _Ty_Http_Head {
      const char *handler;
      const char *src;
@@ -1685,7 +1681,7 @@ _popmedia(Term *term, const char *src)
    Media_Type type;
    Config *config = termio_config_get(term->term);
 
-#if HAVE_ECORE_CON_URL_HTTP_HEAD
+#ifdef HAVE_ECORE_CON_URL_HEAD
    Ty_Http_Head *ty_head = calloc(1, sizeof(Ty_Http_Head));
    if (!ty_head)
      return;

-- 


Reply via email to