summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-06 23:19:35 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-06 23:19:35 +0000
commit4476601805b687d59ffd69e3ea05b0197c17460e (patch)
tree0ac881c41a2f867a2b2de70b6d7a47b8ff294ea2 /configure.ac
parentd338bcac632280a8742741dd840a3c5a6cf852c4 (diff)
efl: m4 is a macro-expansion language, use that.
instead of replicating common patterns all around, let's use the common patterns as m4 macros. EFL_DEPEND_PKG() will use pkg-config and add the dependency. EFL_OPTIONAL_DEPEND_PKG() will use the former, but also defines have_XYZ and does the if statement for you. SVN revision: 80402
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac96
1 files changed, 21 insertions, 75 deletions
diff --git a/configure.ac b/configure.ac
index 8b99c94..a4aafa4 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