summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac96
-rw-r--r--m4/efl.m442
-rw-r--r--m4/efl_pkg_config.m45
3 files changed, 65 insertions, 78 deletions
diff --git a/configure.ac b/configure.ac
index 8b99c941e9..a4aafa4661 100644
--- a/configure.ac
+++ b/configure.ac
@@ -431,11 +431,7 @@ AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "x${_efl_enable_tests}" = "xyes"])
431# check for crypto/tls library to use 431# check for crypto/tls library to use
432case "$build_crypto" in 432case "$build_crypto" in
433 gnutls) 433 gnutls)
434 EFL_PKG_CHECK_STRICT([gnutls >= 2.11]) 434 EFL_DEPEND_PKG([crypto], [GNUTLS], [gnutls >= 2.11])
435
436 AC_DEFINE([HAVE_GNUTLS], [1], [Have Gnutls support])
437 requirements_pc_crypto="gnutls >= 2.11 ${requirements_pc_crypto}"
438 requirements_pc_deps_crypto="gnutls >= 2.11 ${requirements_pc_deps_crypto}"
439 435
440 # libgcrypt 436 # libgcrypt
441 AC_PATH_GENERIC([libgcrypt], [], [:], 437 AC_PATH_GENERIC([libgcrypt], [], [:],
@@ -444,11 +440,7 @@ case "$build_crypto" in
444 ;; 440 ;;
445 441
446 openssl) 442 openssl)
447 EFL_PKG_CHECK_STRICT([openssl]) 443 EFL_DEPEND_PKG([crypto], [OPENSSL], [openssl])
448
449 AC_DEFINE([HAVE_OPENSSL], [1], [Have Openssl support])
450 requirements_pc_crypto="openssl ${requirements_pc_crypto}"
451 requirements_pc_deps_crypto="openssl ${requirements_pc_deps_crypto}"
452 ;; 444 ;;
453esac 445esac
454 446
@@ -1453,56 +1445,31 @@ esac
1453requirements_pc_evas="eo >= ${PACKAGE_VERSION} eet >= ${PACKAGE_VERSION} eina >= ${PACKAGE_VERSION} ${requirements_pc_evas}" 1445requirements_pc_evas="eo >= ${PACKAGE_VERSION} eet >= ${PACKAGE_VERSION} eina >= ${PACKAGE_VERSION} ${requirements_pc_evas}"
1454 1446
1455# Freetype 1447# Freetype
1456EFL_PKG_CHECK_STRICT([freetype2 >= 9.3.0]) 1448EFL_DEPEND_PKG([evas], [FREETYPE], [freetype2 >= 9.3.0])
1457requirements_pc_evas="freetype2 >= 9.3.0 ${requirements_pc_evas}"
1458requirements_pc_deps_evas="freetype2 >= 9.3.0 ${requirements_pc_deps_evas}"
1459 1449
1460## optional dependencies 1450## optional dependencies
1461 1451
1462# FontConfig 1452# FontConfig
1463have_fontconfig="no" 1453EFL_OPTIONAL_DEPEND_PKG([evas], [${want_fontconfig}],
1464if test "x${want_fontconfig}" = "xyes"; then 1454 [FONTCONFIG], [fontconfig >= 2.5.0])
1465 EFL_PKG_CHECK_STRICT([fontconfig >= 2.5.0])
1466 have_fontconfig="yes"
1467 AC_DEFINE(HAVE_FONTCONFIG, 1, [have fontconfig searching capabilities])
1468 requirements_pc_evas="fontconfig >= 2.5.0 ${requirements_pc_evas}"
1469 requirements_pc_deps_evas="fontconfig >= 2.5.0 ${requirements_pc_deps_evas}"
1470fi
1471 1455
1472# fribidi support 1456# fribidi support
1473have_fribidi="no" 1457EFL_OPTIONAL_DEPEND_PKG([evas], [${want_fribidi}],
1474if test "x${want_fribidi}" = "xyes"; then 1458 [FRIBIDI], [fribidi >= 0.19.2],
1475 EFL_PKG_CHECK_STRICT([fribidi >= 0.19.2]) 1459 [
1476 have_fribidi="yes" 1460 CPPFLAGS_SAVE="$CPPFLAGS"
1477 AC_DEFINE([HAVE_FRIBIDI], [1], [have fribidi support]) 1461 CPPFLAGS="$CPPFLAGS $FRIBIDI_CFLAGS"
1478 requirements_pc_evas="fribidi >= 0.19.2 ${requirements_pc_evas}" 1462 AC_CHECK_SIZEOF([FriBidiChar], [], [#include <fribidi/fribidi.h>])
1479 requirements_pc_deps_evas="fribidi >= 0.19.2 ${requirements_pc_deps_evas}" 1463 CPPFLAGS="$CPPFLAGS_SAVE"
1480 1464 ])
1481 CPPFLAGS_SAVE="$CPPFLAGS"
1482 CPPFLAGS="$CPPFLAGS $FRIBIDI_CFLAGS"
1483 AC_CHECK_SIZEOF([FriBidiChar], [], [#include <fribidi/fribidi.h>])
1484 CPPFLAGS="$CPPFLAGS_SAVE"
1485fi
1486 1465
1487# harfbuzz support 1466# harfbuzz support
1488have_harfbuzz="no"
1489have_harfbuzz_ft="no" 1467have_harfbuzz_ft="no"
1490if test "x${want_harfbuzz}" = "xyes"; then 1468EFL_OPTIONAL_DEPEND_PKG([evas], [${want_harfbuzz}],
1491 EFL_PKG_CHECK_STRICT([harfbuzz >= 0.9.0]) 1469 [HARFBUZZ], [harfbuzz >= 0.9.0])
1492 have_harfbuzz="yes"
1493 requirements_pc_evas="harfbuzz >= 0.9.0 ${requirements_pc_evas}"
1494 requirements_pc_deps_evas="harfbuzz >= 0.9.0 ${requirements_pc_deps_evas}"
1495fi
1496 1470
1497# Pixman 1471# Pixman
1498have_pixman="no" 1472EFL_OPTIONAL_DEPEND_PKG([evas], [${want_pixman}], [PIXMAN], [pixman-1])
1499if test "x${want_pixman}" = "xyes"; then
1500 EFL_PKG_CHECK_STRICT([pixman-1])
1501 have_pixman="yes"
1502 AC_DEFINE([HAVE_PIXMAN], [1], [have pixman for rendering])
1503 requirements_pc_evas="pixman-1 ${requirements_pc_evas}"
1504 requirements_pc_deps_evas="pixman-1 ${requirements_pc_deps_evas}"
1505fi
1506 1473
1507if test "x${have_pixman}" = "xyes" ; then 1474if test "x${have_pixman}" = "xyes" ; then
1508 if test "x${have_pixman_font}" = "xyes" ; then 1475 if test "x${have_pixman_font}" = "xyes" ; then
@@ -1980,14 +1947,8 @@ requirements_pc_ecore="eo >= ${PACKAGE_VERSION} eina >= ${PACKAGE_VERSION} ${req
1980 1947
1981# glib 1948# glib
1982 1949
1983have_glib="no" 1950EFL_OPTIONAL_DEPEND_PKG([ecore], [${want_glib}], [GLIB], [glib-2.0])
1984if test "x${want_glib}" = "xyes" ; then 1951if test "x${have_glib}" = "xno"; then
1985 EFL_PKG_CHECK_STRICT([glib-2.0])
1986 have_glib="yes"
1987 AC_DEFINE([HAVE_GLIB], [1], [Have GLib])
1988 requirements_pc_ecore="glib-2.0 ${requirements_pc_ecore}"
1989 requirements_pc_deps_ecore="glib-2.0 ${requirements_pc_deps_ecore}"
1990else
1991 want_g_main_loop="no" 1952 want_g_main_loop="no"
1992fi 1953fi
1993 1954
@@ -2155,27 +2116,12 @@ requirements_pc_deps_ecore_con="${requirements_pc_deps_crypto} ${requirements_pc
2155requirements_libs_ecore_con="${requirements_libs_crypto} ${requirements_libs_ecore_con}" 2116requirements_libs_ecore_con="${requirements_libs_crypto} ${requirements_libs_ecore_con}"
2156 2117
2157# cURL 2118# cURL
2158 2119EFL_OPTIONAL_DEPEND_PKG([ecore_con], [${want_curl}], [CURL], [libcurl])
2159have_curl="no"
2160if test "x${want_curl}" = "xyes" ; then
2161 EFL_PKG_CHECK_STRICT([libcurl])
2162 have_curl="yes"
2163 AC_DEFINE([HAVE_CURL], [1], [Downloading with CURL])
2164 requirements_pc_ecore_con="libcurl ${requirements_pc_ecore_con}"
2165 requirements_pc_deps_ecore_con="libcurl ${requirements_pc_deps_ecore_con}"
2166fi
2167 2120
2168# c-ares 2121# c-ares
2169 2122
2170have_cares="no" 2123EFL_OPTIONAL_DEPEND_PKG([ecore_con], [${want_cares}],
2171if test "x${want_cares}" = "xyes" ; then 2124 [CARES], [libcares >= 1.6.1])
2172 EFL_PKG_CHECK_STRICT([libcares >= 1.6.1])
2173 have_cares="yes"
2174 AC_DEFINE([HAVE_CARES], [1], [Build Ecore_Con_Info with c-ares support])
2175 requirements_pc_ecore_con="libcares >= 1.6.1 ${requirements_pc_ecore_con}"
2176 requirements_pc_deps_ecore_con="libcares >= 1.6.1 ${requirements_pc_deps_ecore_con}"
2177fi
2178
2179AM_CONDITIONAL([HAVE_CARES], [test "x${have_cares}" = "xyes"]) 2125AM_CONDITIONAL([HAVE_CARES], [test "x${have_cares}" = "xyes"])
2180 2126
2181if test "x${requirements_pc_deps_ecore_con}" != "x" ; then 2127if test "x${requirements_pc_deps_ecore_con}" != "x" ; then
diff --git a/m4/efl.m4 b/m4/efl.m4
new file mode 100644
index 0000000000..d4a4d1ad62
--- /dev/null
+++ b/m4/efl.m4
@@ -0,0 +1,42 @@
1dnl file to manage modules in efl
2
3dnl EFL_DEPEND_PKG(EFL, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
4dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME,
5dnl and inserts dependencies in proper variables
6AC_DEFUN([EFL_DEPEND_PKG],
7[
8m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
9m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
10m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl
11m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl
12
13 have_[]m4_defn([DOWNNAME])="no"
14
15 EFL_PKG_CHECK_STRICT([$3], [
16 AC_DEFINE([HAVE_]m4_defn([UPNAME]), [1], [Have `]m4_defn([DOWNNAME])[' pkg-config installed.])
17 requirements_pc_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_[][]m4_defn([DOWNEFL])}"
18 requirements_pc_deps_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_deps_[]m4_defn([DOWNEFL])}"
19 have_[]m4_defn([DOWNNAME])="yes"
20
21 $4
22
23 ], [$5])
24
25m4_popdef([DOWNNAME])
26m4_popdef([UPNAME])
27m4_popdef([DOWNEFL])
28m4_popdef([UPEFL])
29])
30
31dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
32AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG],
33[
34m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl
35
36 have_[]m4_defn([DOWN])="no"
37 if test "x$2" = "xyes"; then
38 EFL_DEPEND_PKG([$1], [$3], [$4], [$5], [$6])
39 fi
40
41m4_popdef([DOWN])
42])
diff --git a/m4/efl_pkg_config.m4 b/m4/efl_pkg_config.m4
index c4f3c1eb28..13a9516e90 100644
--- a/m4/efl_pkg_config.m4
+++ b/m4/efl_pkg_config.m4
@@ -4,8 +4,7 @@ dnl EFL_PKG_CHECK_STRICT(MODULE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
4dnl similar to PKG_CHECK_EXISTS() that will AC_MSG_ERROR() if not found 4dnl similar to PKG_CHECK_EXISTS() that will AC_MSG_ERROR() if not found
5AC_DEFUN([EFL_PKG_CHECK_STRICT], 5AC_DEFUN([EFL_PKG_CHECK_STRICT],
6[ 6[
7 PKG_CHECK_EXISTS([$1], 7 PKG_CHECK_EXISTS([$1], [$2],
8 [m4_if([$2], [$2], [:])], 8 [m4_ifval([$3], [$3], [AC_MSG_ERROR([pkg-config missing $1])])]
9 [m4_if([$3], [$3], [AC_MSG_ERROR([pkg-config missing $1])])]
10 ) 9 )
11]) 10])