correctly check if ecore_con_url_head() is available

This commit is contained in:
Boris Faure 2015-02-21 11:31:24 +01:00
parent 76e9ae6481
commit 5d169ebd71
2 changed files with 25 additions and 6 deletions

View File

@ -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"

View File

@ -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;