summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-06 00:11:14 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-06 00:11:14 +0000
commit48120ec0c8c4d8767f7ea872d0de8a6d88ab8c1d (patch)
tree8731c82a6c02c16609c701481cbe9d376fb363f2 /configure.ac
parent511d8e86728be555a4a57e470c4f6c90b5bb8bca (diff)
efl: both eet and ecore_con now share --with-crypto and defines.
* rename USE_GNUTLS and USE_OPENSSL to HAVE_GNUTLS and HAVE_OPENSSL in ecore_con, to match other modules such as Eet. * define requirements_pc_crypto, requirements_pc_deps_crypto and requirements_libs_crypto so modules can use that. * move to a common check section. SVN revision: 80288
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac143
1 files changed, 52 insertions, 91 deletions
diff --git a/configure.ac b/configure.ac
index 28034f2..49ac157 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,22 @@ esac
74 74
75# TODO: add some build "profile" (server, full, etc...) 75# TODO: add some build "profile" (server, full, etc...)
76 76
77AC_ARG_WITH([crypto],
78 [AC_HELP_STRING([--with-crypto=CRYPTO],
79 [use the predefined build crypto, one of:
80 openssl, gnutls or none.
81 @<:@default=openssl@:>@])],
82 [build_crypto=${withval}],
83 [build_crypto=openssl])
84
85case "${build_crypto}" in
86 openssl|gnutls|none)
87 ;;
88 *)
89 AC_MSG_ERROR([Unknown build crypto option: --with-crypto=${build_crypto}])
90 ;;
91esac
92
77AC_ARG_ENABLE([coverage], 93AC_ARG_ENABLE([coverage],
78 [AC_HELP_STRING([--enable-coverage], [enable unit testing coverage. @<:@default=disabled@:>@])], 94 [AC_HELP_STRING([--enable-coverage], [enable unit testing coverage. @<:@default=disabled@:>@])],
79 [ 95 [
@@ -88,6 +104,10 @@ AC_ARG_ENABLE([coverage],
88 104
89#### Default values 105#### Default values
90 106
107requirements_pc_crypto=""
108requirements_pc_deps_crypto=""
109requirements_libs_crypto=""
110
91requirements_libs_evil="" 111requirements_libs_evil=""
92requirements_libs_eina="" 112requirements_libs_eina=""
93requirements_libs_eo="" 113requirements_libs_eo=""
@@ -408,6 +428,30 @@ PKG_CHECK_MODULES([CHECK],
408AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "x${_efl_enable_tests}" = "xyes"]) 428AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "x${_efl_enable_tests}" = "xyes"])
409 429
410 430
431# check for crypto/tls library to use
432case "$build_crypto" in
433 gnutls)
434 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 2.11])
435 AC_DEFINE([HAVE_GNUTLS], [1], [Have Gnutls support])
436 requirements_pc_crypto="gnutls >= 2.11 ${requirements_pc_crypto}"
437 requirements_pc_deps_crypto="gnutls >= 2.11 ${requirements_pc_deps_crypto}"
438
439 # libgcrypt
440 AC_PATH_GENERIC([libgcrypt], [], [:],
441 [AC_MSG_ERROR([libgcrypt required but not found])])
442 requirements_libs_crypto="${LIBGCRYPT_LIBS} ${requirements_libs_crypto}"
443 ;;
444
445 openssl)
446 PKG_CHECK_EXISTS([openssl],
447 [
448 AC_DEFINE([HAVE_OPENSSL], [1], [Have Openssl support])
449 requirements_pc_crypto="openssl ${requirements_pc_crypto}"
450 requirements_pc_deps_crypto="openssl ${requirements_pc_deps_crypto}"
451 ])
452 ;;
453esac
454
411#### Checks for header files 455#### Checks for header files
412 456
413# Common Checks (keep names sorted for ease of use): 457# Common Checks (keep names sorted for ease of use):
@@ -905,22 +949,6 @@ AC_MSG_NOTICE([Eet checks])
905 949
906### Additional options to configure 950### Additional options to configure
907 951
908AC_ARG_WITH([crypto],
909 [AC_HELP_STRING([--with-crypto=CRYPTO],
910 [use the predefined build crypto, one of:
911 openssl, gnutls or none.
912 @<:@default=openssl@:>@])],
913 [build_crypto=${withval}],
914 [build_crypto=openssl])
915
916case "${build_crypto}" in
917 openssl|gnutls|none)
918 ;;
919 *)
920 AC_MSG_ERROR([Unknown build crypto option: --with-crypto=${build_crypto}])
921 ;;
922esac
923
924### Checks for programs 952### Checks for programs
925 953
926### Checks for libraries 954### Checks for libraries
@@ -937,28 +965,9 @@ esac
937 965
938## Secure layer 966## Secure layer
939 967
940case "$build_crypto" in 968requirements_pc_eet="${requirements_pc_crypto} ${requirements_pc_eet}"
941 gnutls) 969requirements_pc_deps_eet="${requirements_pc_deps_crypto} ${requirements_pc_deps_eet}"
942 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 2.11]) 970requirements_libs_eet="${requirements_libs_crypto} ${requirements_libs_eet}"
943 AC_DEFINE([HAVE_GNUTLS], [1], [Have Gnutls support])
944 requirements_pc_eet="gnutls >= 2.11 ${requirements_pc_eet}"
945 requirements_pc_deps_eet="gnutls >= 2.11 ${requirements_pc_deps_eet}"
946
947 # libgcrypt
948 AC_PATH_GENERIC([libgcrypt], [], [:],
949 [AC_MSG_ERROR([libgcrypt required but not found])])
950 requirements_libs_eet="${LIBGCRYPT_LIBS} ${requirements_libs_eet}"
951 ;;
952
953 openssl)
954 PKG_CHECK_EXISTS([openssl],
955 [
956 AC_DEFINE([HAVE_OPENSSL], [1], [Have Openssl support])
957 requirements_pc_eet="openssl ${requirements_pc_eet}"
958 requirements_pc_deps_eet="openssl ${requirements_pc_deps_eet}"
959 ])
960 ;;
961esac
962 971
963# Cryptography support 972# Cryptography support
964if test "$build_crypto" != "none" ; then 973if test "$build_crypto" != "none" ; then
@@ -2161,21 +2170,6 @@ AC_ARG_ENABLE([curl],
2161 ], 2170 ],
2162 [want_curl="yes"]) 2171 [want_curl="yes"])
2163 2172
2164AC_ARG_WITH([tls],
2165 [AC_HELP_STRING([--with-tls=TLS],
2166 [select Transport Layer Security, one of: gnutls, openssl, none.
2167 @<:@default=gnutls@:>@])],
2168 [with_tls=${withval}],
2169 [with_tls="gnutls"])
2170
2171case "${with_tls}" in
2172 gnutls|openssl|none)
2173 ;;
2174 *)
2175 AC_MSG_ERROR([Unknown Transport Layer Security --with-tls=${with_tls}])
2176 ;;
2177esac
2178
2179AC_ARG_ENABLE([local-sockets], 2173AC_ARG_ENABLE([local-sockets],
2180 [AC_HELP_STRING([--disable-local-sockets], [disable local sockets.])], 2174 [AC_HELP_STRING([--disable-local-sockets], [disable local sockets.])],
2181 [ 2175 [
@@ -2203,7 +2197,6 @@ AC_ARG_ENABLE([abstract-sockets],
2203 2197
2204case "$host_os" in 2198case "$host_os" in
2205 mingw32ce*) 2199 mingw32ce*)
2206 with_tls="none"
2207 want_curl="no" 2200 want_curl="no"
2208 want_cares="no" 2201 want_cares="no"
2209 want_ecore_con_local_sockets="no" 2202 want_ecore_con_local_sockets="no"
@@ -2237,11 +2230,6 @@ fi
2237 2230
2238### Checks for programs 2231### Checks for programs
2239 2232
2240have_gnutls="no"
2241if test "x${with_tls}" = "xgnutls" ; then
2242 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
2243fi
2244
2245### Checks for libraries 2233### Checks for libraries
2246 2234
2247# Evil library for compilation on Windows 2235# Evil library for compilation on Windows
@@ -2255,32 +2243,9 @@ esac
2255 2243
2256requirements_pc_ecore_con="ecore >= ${PACKAGE_VERSION} eet >= ${PACKAGE_VERSION} eo >= ${PACKAGE_VERSION} eina >= ${PACKAGE_VERSION} ${requirements_pc_ecore_con}" 2244requirements_pc_ecore_con="ecore >= ${PACKAGE_VERSION} eet >= ${PACKAGE_VERSION} eo >= ${PACKAGE_VERSION} eina >= ${PACKAGE_VERSION} ${requirements_pc_ecore_con}"
2257 2245
2258# gnuTLS 2246requirements_pc_ecore_con="${requirements_pc_crypto} ${requirements_pc_ecore_con}"
2259 2247requirements_pc_deps_ecore_con="${requirements_pc_deps_crypto} ${requirements_pc_deps_ecore_con}"
2260if test "x${have_gnutls}" = "xyes" ; then 2248requirements_libs_ecore_con="${requirements_libs_crypto} ${requirements_libs_ecore_con}"
2261 PKG_CHECK_EXISTS([gnutls >= 2.11],
2262 [
2263 have_gnutls="yes"
2264 AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS])
2265 requirements_pc_ecore_con="gnutls >= 2.11 ${requirements_pc_ecore_con}"
2266 requirements_pc_deps_ecore_con="gnutls >= 2.11 ${requirements_pc_deps_ecore_con}"
2267 ],
2268 [have_gnutls="no"])
2269fi
2270
2271# openssl
2272
2273have_openssl="no"
2274if test "x${with_tls}" = "xopenssl" ; then
2275 PKG_CHECK_EXISTS([openssl],
2276 [
2277 have_openssl="yes"
2278 AC_DEFINE([USE_OPENSSL], [1], [Use OpenSSL])
2279 requirements_pc_ecore_con="openssl ${requirements_pc_ecore_con}"
2280 requirements_pc_deps_ecore_con="openssl ${requirements_pc_deps_ecore_con}"
2281 ],
2282 [have_openssl="no"])
2283fi
2284 2249
2285# cURL 2250# cURL
2286 2251
@@ -4241,11 +4206,7 @@ echo " Gathering timer allocation.: $want_ecore_timer_dump"
4241echo 4206echo
4242 4207
4243echo "Ecore_Con:" 4208echo "Ecore_Con:"
4244if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then 4209echo " TLS........................: $with_crypto"
4245echo " TLS........................: $with_tls"
4246else
4247echo " TLS........................: no"
4248fi
4249echo " IPv6.......................: $have_ipv6" 4210echo " IPv6.......................: $have_ipv6"
4250echo " CURL.......................: $have_curl" 4211echo " CURL.......................: $have_curl"
4251echo " Local Sockets..............: $want_ecore_con_local_sockets" 4212echo " Local Sockets..............: $want_ecore_con_local_sockets"
@@ -4262,7 +4223,7 @@ fi
4262echo 4223echo
4263 4224
4264echo "Ecore_Ipc:" 4225echo "Ecore_Ipc:"
4265echo " TLS........................: $with_tls" 4226echo " TLS........................: $with_crypto"
4266echo 4227echo
4267 4228
4268echo "Ecore_File:" 4229echo "Ecore_File:"