* fix requirements * fix configuration on mac os x (problem with automake 1.9) and add missing values/macro for quartz support * small typo in ecore_evas_win32 api * use m4 api in m4 files SVN revision: 39471devs/devilhorns/wayland_egl
parent
a510f6a593
commit
d9d7c7d23b
36 changed files with 1025 additions and 790 deletions
File diff suppressed because it is too large
Load Diff
@ -1,99 +1,105 @@ |
||||
dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) |
||||
AC_DEFUN([ECORE_CHECK_MODULE], |
||||
[ |
||||
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl |
||||
pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl |
||||
m4_pushdef([UP], m4_toupper([[$1]]))dnl |
||||
m4_pushdef([DOWN], m4_tolower([[$1]]))dnl |
||||
|
||||
have_ecore_[]DOWN="no" |
||||
ecore_[]DOWN[]_cflags="" |
||||
ecore_[]DOWN[]_libs="" |
||||
have_ecore_[]m4_defn([DOWN])=no |
||||
ecore_[]m4_defn([DOWN])[]_cflags= |
||||
ecore_[]m4_defn([DOWN])[]_libs= |
||||
want_module=$2 |
||||
|
||||
ifelse("x$2", "xno", |
||||
[ |
||||
AC_ARG_ENABLE(ecore-[]DOWN, |
||||
AC_HELP_STRING( |
||||
[--enable-ecore-[]DOWN], |
||||
[enable the ecore_[]DOWN module. [[default=disabled]]] |
||||
), |
||||
[ want_ecore_[]DOWN=$enableval ], |
||||
[ want_ecore_[]DOWN=no ]) |
||||
], |
||||
[ |
||||
AC_ARG_ENABLE(ecore-[]DOWN, |
||||
AC_HELP_STRING( |
||||
[--disable-ecore-[]DOWN], |
||||
[disable the ecore_[]DOWN module. [[default=enabled]]] |
||||
), |
||||
[ want_ecore_[]DOWN=$enableval ], |
||||
[ want_ecore_[]DOWN=yes ]) |
||||
]) |
||||
if test "x${want_module}" = "xno" ; then |
||||
AC_ARG_ENABLE(ecore-[]m4_defn([DOWN]), |
||||
[AC_HELP_STRING( |
||||
[--enable-ecore-[]m4_defn([DOWN])], |
||||
[enable the ecore_]m4_defn([DOWN])[ module. [[default=disabled]]])], |
||||
[want_module=$enableval], |
||||
[want_module=no]) |
||||
else |
||||
AC_ARG_ENABLE(ecore-[]m4_defn([DOWN]), |
||||
[AC_HELP_STRING( |
||||
[--disable-ecore-[]m4_defn([DOWN])], |
||||
[disable the ecore_]m4_defn([DOWN])[ module. [[default=enabled]]])], |
||||
[want_module=$enableval], |
||||
[want_module=yes]) |
||||
fi |
||||
|
||||
AC_MSG_CHECKING(whether ecore_[]DOWN module is to be built) |
||||
|
||||
if test "x$want_ecore_[]DOWN" = "xyes" ; then |
||||
if test "x$3" = "x" -o "x$3" = "xyes" ; then |
||||
AC_DEFINE(BUILD_ECORE_[]UP, 1, [Build Ecore_$1 Module]) |
||||
have_ecore_[]DOWN="yes" |
||||
ecore_[]DOWN[]_libs="-lecore_[]DOWN" |
||||
AC_MSG_RESULT([yes]) |
||||
else |
||||
AC_MSG_RESULT([no (dependancy failed)]) |
||||
fi |
||||
AC_MSG_CHECKING([whether ecore_]m4_defn([DOWN])[ module is to be built]) |
||||
|
||||
if test "x${want_module}" = "xyes" ; then |
||||
if test "x$3" = "x" -o "x$3" = "xyes" ; then |
||||
AC_DEFINE([BUILD_ECORE_]m4_defn([UP]), [1], [Build Ecore_$1 Module]) |
||||
have_ecore_[]m4_defn([DOWN])="yes" |
||||
ecore_[]m4_defn([DOWN])[]_libs="-lecore_[]m4_defn([DOWN])" |
||||
AC_MSG_RESULT([yes]) |
||||
else |
||||
AC_MSG_RESULT([no (dependency failed)]) |
||||
fi |
||||
else |
||||
AC_MSG_RESULT([no]) |
||||
AC_MSG_RESULT([no]) |
||||
fi |
||||
|
||||
AM_CONDITIONAL(BUILD_ECORE_[]UP, test "x$have_ecore_[]DOWN" = "xyes") |
||||
AM_CONDITIONAL([BUILD_ECORE_]UP, [test "x$have_ecore_]DOWN[" = "xyes"]) |
||||
|
||||
if test "x$have_ecore_[]DOWN" = "xyes" ; then |
||||
ifelse([$4], , :, [$4]) |
||||
if test "x$have_ecore_[]m4_defn([DOWN])" = "xyes" ; then |
||||
m4_default([$4], [:]) |
||||
else |
||||
ifelse([$5], , :, [$5]) |
||||
m4_default([$5], [:]) |
||||
fi |
||||
|
||||
AC_SUBST(ecore_[]DOWN[]_cflags) |
||||
AC_SUBST(ecore_[]DOWN[]_libs) |
||||
AC_SUBST(ecore_[]m4_defn([DOWN])[]_cflags) |
||||
AC_SUBST(ecore_[]m4_defn([DOWN])[]_libs) |
||||
|
||||
popdef([UP]) |
||||
popdef([DOWN]) |
||||
m4_popdef([UP]) |
||||
m4_popdef([DOWN]) |
||||
]) |
||||
|
||||
dnl use: ECORE_EVAS_CHECK_MODULE(foo-bar, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
||||
AC_DEFUN([ECORE_EVAS_CHECK_MODULE], |
||||
[ |
||||
pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl |
||||
pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl |
||||
m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl |
||||
m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl |
||||
|
||||
have_ecore_evas_[]DOWN="no" |
||||
have_ecore_evas_[]m4_defn([DOWN])="no" |
||||
want_module="$2" |
||||
|
||||
AC_ARG_ENABLE(ecore-$1, |
||||
AC_HELP_STRING( |
||||
[--enable-ecore-evas-$1], |
||||
[enable $3 support in the ecore_evas module.] |
||||
), |
||||
[ want_module=$enableval ] |
||||
) |
||||
AC_MSG_CHECKING(whether ecore_evas $3 support is to be built) |
||||
AC_MSG_RESULT($want_module) |
||||
if test "x${want_module}" = "xno" ; then |
||||
AC_ARG_ENABLE(ecore-evas-$1, |
||||
[AC_HELP_STRING( |
||||
[--enable-ecore-evas-$1], |
||||
[enable $3 support in the ecore_evas module.])], |
||||
[want_module=$enableval]) |
||||
else |
||||
AC_ARG_ENABLE(ecore-evas-$1, |
||||
[AC_HELP_STRING( |
||||
[--disable-ecore-evas-$1], |
||||
[disable $3 support in the ecore_evas module.])], |
||||
[want_module=$enableval]) |
||||
fi |
||||
|
||||
AC_MSG_CHECKING([whether ecore_evas $3 support is to be built]) |
||||
AC_MSG_RESULT([${want_module}]) |
||||
|
||||
if test "x$4" = "xyes" -a \ |
||||
"x$have_ecore_evas" = "xyes" -a \ |
||||
"x$want_module" = "xyes" ; then |
||||
PKG_CHECK_MODULES(EVAS_[]UP, evas-$1, |
||||
[ |
||||
AC_DEFINE(BUILD_ECORE_EVAS_[]UP, 1, [Support for $3 Engine in Ecore_Evas]) |
||||
have_ecore_evas_[]DOWN="yes"; |
||||
] |
||||
) |
||||
PKG_CHECK_EXISTS([evas-$1], |
||||
[ |
||||
AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $3 Engine in Ecore_Evas]) |
||||
have_ecore_evas_[]m4_defn([DOWN])="yes" |
||||
]) |
||||
fi |
||||
|
||||
if test "x$have_ecore_evas_[]DOWN" = "xyes" ; then |
||||
ifelse([$5], , :, [$5]) |
||||
AC_MSG_CHECKING([whether ecore_evas $3 support is built]) |
||||
AC_MSG_RESULT([$have_ecore_evas_]m4_defn([DOWN])) |
||||
|
||||
if test "x$have_ecore_evas_[]m4_defn([DOWN])" = "xyes" ; then |
||||
m4_default([$5], [:]) |
||||
else |
||||
ifelse([$6], , :, [$6]) |
||||
m4_default([$6], [:]) |
||||
fi |
||||
|
||||
popdef([UP]) |
||||
popdef([DOWN]) |
||||
m4_popdef([UP]) |
||||
m4_popdef([DOWN]) |
||||
]) |
||||
|
@ -0,0 +1,212 @@ |
||||
dnl use: ECORE_CHECK_POLL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
||||
AC_DEFUN([ECORE_CHECK_POLL], |
||||
[ |
||||
_ecore_want_poll=$1 |
||||
_ecore_have_poll="no" |
||||
|
||||
AC_ARG_ENABLE(poll, |
||||
[AC_HELP_STRING([--disable-poll], [disable poll in the ecore_file module])], |
||||
[ |
||||
if test "x${enableval}" = "xyes" ; then |
||||
_ecore_want_poll="yes" |
||||
else |
||||
_ecore_want_poll="no" |
||||
fi |
||||
]) |
||||
|
||||
AC_MSG_CHECKING(whether polling is to be used for filemonitoring) |
||||
AC_MSG_RESULT(${_ecore_want_poll}) |
||||
|
||||
if test "x${_ecore_want_poll}" = "xyes" ; then |
||||
AC_DEFINE([HAVE_POLL], [1], [ File monitoring with polling ]) |
||||
_ecore_have_poll="yes" |
||||
fi |
||||
|
||||
if test "x${_ecore_have_poll}" = "xyes" ; then |
||||
m4_default([$2], [:]) |
||||
else |
||||
m4_default([$3], [:]) |
||||
fi |
||||
]) |
||||
|
||||
dnl use: ECORE_CHECK_INOTIFY(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
||||
AC_DEFUN([ECORE_CHECK_INOTIFY], |
||||
[ |
||||
_ecore_want_inotify=$1 |
||||
_ecore_have_inotify="no" |
||||
|
||||
dnl We need to check if the right inotify version is accessible |
||||
_ecore_want_inotify="yes" |
||||
AC_ARG_ENABLE(inotify, |
||||
[AC_HELP_STRING([--disable-inotify], [disable inotify in the ecore_file module])], |
||||
[ |
||||
if test "x${enableval}" = "xyes" ; then |
||||
_ecore_want_inotify="yes" |
||||
else |
||||
_ecore_want_inotify="no" |
||||
fi |
||||
]) |
||||
|
||||
AC_MSG_CHECKING(whether inotify is to be used for filemonitoring) |
||||
AC_MSG_RESULT($_ecore_want_inotify) |
||||
|
||||
dnl It is hard to find a good test on how to check the correct |
||||
dnl inotify version. They changed the headers a lot. |
||||
dnl in kernel 2.6.13 __NR_inotify_init was added to the defined syscalls |
||||
dnl in asm/unistd.h and IN_MOVE_SELF was added to linux/inotify.h |
||||
dnl so with this check you need a very new kernel and kernel-headers! |
||||
|
||||
if test "x${_ecore_want_inotify}" = "xyes" ; then |
||||
AC_CHECK_LIB([c], [inotify_init], |
||||
[ |
||||
AC_DEFINE(HAVE_INOTIFY, 1, [ File monitoring with Inotify ]) |
||||
AC_DEFINE(HAVE_SYS_INOTIFY, 1, [ File monitoring with Inotify - sys/inotify.h ]) |
||||
_ecore_have_inotify="yes" |
||||
], |
||||
[ |
||||
AC_TRY_COMPILE( |
||||
[ |
||||
#include <asm/unistd.h> |
||||
#include <linux/inotify.h> |
||||
], |
||||
[int a = __NR_inotify_init; int b = IN_MOVE_SELF;], |
||||
[ |
||||
AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify ]) |
||||
_ecore_have_inotify="yes" |
||||
], |
||||
[_ecore_have_inotify="no"]) |
||||
]) |
||||
fi |
||||
|
||||
if test "x$_ecore_have_inotify" = "xyes" ; then |
||||
m4_default([$2], [:]) |
||||
else |
||||
m4_default([$3], [:]) |
||||
fi |
||||
]) |
||||
|
||||
dnl use: ECORE_CHECK_CURL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
||||
AC_DEFUN([ECORE_CHECK_CURL], |
||||
[ |
||||
_ecore_want_curl=$1 |
||||
_ecore_have_curl="no" |
||||
|
||||
AC_ARG_ENABLE([curl], |
||||
[AC_HELP_STRING([--disable-curl], [disable curl support])], |
||||
[ |
||||
if test "x${enableval}" = "xyes" ; then |
||||
_ecore_want_curl="yes" |
||||
else |
||||
_ecore_want_curl="no" |
||||
fi |
||||
]) |
||||
|
||||
if test "x${_ecore_want_curl}" = "xyes" ; then |
||||
PKG_CHECK_MODULES(CURL, libcurl, |
||||
[ |
||||
AC_DEFINE(HAVE_CURL, 1, [ Downloading with CURL ]) |
||||
_ecore_have_curl="yes" |
||||
], |
||||
[_ecore_have_curl="no"]) |
||||
fi |
||||
|
||||
if test "x$_ecore_have_curl" = "xyes" ; then |
||||
m4_default([$2], [:]) |
||||
else |
||||
m4_default([$3], [:]) |
||||
fi |
||||
]) |
||||
|
||||
dnl use: ECORE_CHECK_GNUTLS(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
||||
AC_DEFUN([ECORE_CHECK_GNUTLS], |
||||
[ |
||||
_ecore_want_gnutls=$1 |
||||
_ecore_have_gnutls="no" |
||||
|
||||
AC_ARG_ENABLE([gnutls], |
||||
[AC_HELP_STRING([--disable-gnutls], [disable gnutls support])], |
||||
[ |
||||
if test "x${enableval}" = "xyes" ; then |
||||
_ecore_want_gnutls="yes" |
||||
else |
||||
_ecore_want_gnutls="no" |
||||
fi |
||||
]) |
||||
|
||||
if test "x${_ecore_want_gnutls}" = "xyes" -o "x${_ecore_want_gnutls}" = "xauto" ; then |
||||
PKG_CHECK_MODULES([TLS], [gnutls], |
||||
[ |
||||
AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS]) |
||||
_ecore_have_gnutls="yes" |
||||
], |
||||
[_ecore_have_gnutls="no"]) |
||||
# for ecore_con_ssl.c |
||||
PKG_CHECK_MODULES([TLS2], [gnutls >= 2.0.0], |
||||
[AC_DEFINE(USE_GNUTLS2, 1, [Use GnuTLS 2 or higher])], |
||||
[dummy="no"]) |
||||
fi |
||||
|
||||
if test "x$_ecore_have_gnutls" = "xyes" ; then |
||||
ifelse([$2], , :, [$2]) |
||||
else |
||||
ifelse([$3], , :, [$3]) |
||||
fi |
||||
]) |
||||
|
||||
dnl use: ECORE_CHECK_OPENSSL(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
||||
AC_DEFUN([ECORE_CHECK_OPENSSL], |
||||
[ |
||||
_ecore_want_openssl=$1 |
||||
_ecore_have_openssl="no" |
||||
|
||||
AC_ARG_ENABLE(openssl, |
||||
[AC_HELP_STRING([--disable-openssl], [disable openssl support])], |
||||
[ |
||||
if test "x${enableval}" = "xyes" ; then |
||||
_ecore_want_openssl="yes" |
||||
else |
||||
_ecore_want_openssl="no" |
||||
fi |
||||
]) |
||||
|
||||
if test "x${_ecore_want_openssl}" = "xyes" -o "x${_ecore_want_openssl}" = "xauto"; then |
||||
PKG_CHECK_MODULES([SSL], |
||||
[openssl], |
||||
[ |
||||
AC_DEFINE(USE_OPENSSL, 1, [Use OpenSSL]) |
||||
_ecore_have_openssl="yes" |
||||
], |
||||
[_ecore_have_openssl="no"]) |
||||
fi |
||||
|
||||
if test "x$_ecore_have_openssl" = "xyes" ; then |
||||
m4_default([$2], [:]) |
||||
else |
||||
m4_default([$3], [:]) |
||||
fi |
||||
]) |
||||
|
||||
dnl use: ECORE_CHECK_TSLIB(default-enabled[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
||||
AC_DEFUN([ECORE_CHECK_TSLIB], |
||||
[ |
||||
_ecore_want_tslib=$1 |
||||
_ecore_have_tslib="no" |
||||
tslib_libs="" |
||||
|
||||
if test "x${_ecore_want_tslib}" = "xyes" -o "x${_ecore_want_tslib}" = "xauto" ; then |
||||
AC_CHECK_HEADER([tslib.h], |
||||
[ |
||||
AC_CHECK_LIB([ts], [ts_open], [tslib_libs="-lts", tslib_libs="-ltslib"]) |
||||
AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code]) |
||||
_ecore_have_ts="yes" |
||||
]) |
||||
fi |
||||
|
||||
AC_SUBST(tslib_libs) |
||||
|
||||
if test "x$_ecore_have_tslib" = "xyes" ; then |
||||
m4_default([$2], [:]) |
||||
else |
||||
m4_default([$3], [:]) |
||||
fi |
||||
]) |
Loading…
Reference in new issue