summaryrefslogtreecommitdiff
path: root/legacy/eet/configure.ac
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-02-09 10:30:04 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-02-09 10:30:04 +0000
commit87eb14012b9236415ba6810bae0e32320859b303 (patch)
tree1abc3e0c0cfc8ba414e54b7c11fc3ca19277411f /legacy/eet/configure.ac
parentedbdd6a1ad833cadb440eeec68d416e58ff404b3 (diff)
eet: add support for GnuTLS 3.x
SVN revision: 67785
Diffstat (limited to 'legacy/eet/configure.ac')
-rw-r--r--legacy/eet/configure.ac114
1 files changed, 80 insertions, 34 deletions
diff --git a/legacy/eet/configure.ac b/legacy/eet/configure.ac
index 220e2a1cf9..30e2d381c2 100644
--- a/legacy/eet/configure.ac
+++ b/legacy/eet/configure.ac
@@ -1,4 +1,4 @@
1y##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## 1##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## 2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1]) 3m4_define([v_maj], [1])
4m4_define([v_min], [5]) 4m4_define([v_min], [5])
@@ -110,39 +110,6 @@ else
110 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format]) 110 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
111fi 111fi
112 112
113# Gnutls support
114
115AC_ARG_ENABLE([gnutls],
116 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
117 [want_gnutls=$enableval]
118)
119AC_MSG_CHECKING([whether to use Gnutls])
120AC_MSG_RESULT([${want_gnutls}])
121
122# Specific GNUTLS improvement
123
124new_gnutls_api="yes"
125AC_ARG_ENABLE(new-gnutls-api,
126 [AC_HELP_STRING(
127 [--disable-new-gnutls-api],
128 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
129 )],
130 [new_gnutls_api=$enableval]
131)
132AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
133AC_MSG_RESULT([${new_gnutls_api}])
134
135if test "x${new_gnutls_api}" = "xyes" ; then
136 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
137 [ new_gnutls_api="yes" ],
138 [ new_gnutls_api="no" ]
139 )
140
141 if test "x${new_gnutls_api}" = "xyes"; then
142 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
143 fi
144fi
145
146# Openssl support 113# Openssl support
147 114
148AC_ARG_ENABLE([openssl], 115AC_ARG_ENABLE([openssl],
@@ -267,6 +234,15 @@ AC_SUBST(EET_LIBS)
267PKG_CHECK_MODULES(EINA, [eina >= 1.1.0]) 234PKG_CHECK_MODULES(EINA, [eina >= 1.1.0])
268requirement_eet="eina >= 1.1.0 ${requirement_eet}" 235requirement_eet="eina >= 1.1.0 ${requirement_eet}"
269 236
237# Gnutls support
238
239AC_ARG_ENABLE([gnutls],
240 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
241 [want_gnutls=$enableval]
242)
243AC_MSG_CHECKING([whether to use Gnutls])
244AC_MSG_RESULT([${want_gnutls}])
245
270# Gnutls library 246# Gnutls library
271have_gnutls="no" 247have_gnutls="no"
272if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then 248if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
@@ -287,6 +263,76 @@ if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
287 fi 263 fi
288fi 264fi
289 265
266# Specific GNUTLS improvement
267
268new_gnutls_api="yes"
269AC_ARG_ENABLE(new-gnutls-api,
270 [AC_HELP_STRING(
271 [--disable-new-gnutls-api],
272 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
273 )],
274 [new_gnutls_api=$enableval]
275)
276AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
277AC_MSG_RESULT([${new_gnutls_api}])
278
279if test "x${new_gnutls_api}" = "xyes" ; then
280 tmp_CFLAGS="${CFLAGS}"
281 tmp_LIBS="${LIBS}"
282 CFLAGS="${GNUTLS_CFLAGS}"
283 LIBS="${GNUTLS_LIBS}"
284 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
285 [ new_gnutls_api="yes" ],
286 [ new_gnutls_api="no" ]
287 )
288 CFLAGS="${tmp_CFLAGS}"
289 LIBS="${tmp_LIBS}"
290
291 if test "x${new_gnutls_api}" = "xyes"; then
292 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
293 fi
294fi
295
296use_gnutls_privkey_sign_data="no"
297if test "x${want_gnutls}" = "xyes" -o "x${want_gnutls}" = "xauto"; then
298 tmp_CFLAGS="${CFLAGS}"
299 tmp_LIBS="${LIBS}"
300 CFLAGS="${GNUTLS_CFLAGS}"
301 LIBS="${GNUTLS_LIBS}"
302 AC_CHECK_LIB(gnutls, gnutls_privkey_sign_data,
303 [ use_gnutls_privkey_sign_data="yes" ],
304 [ use_gnutls_privkey_sign_data="no" ]
305 )
306 CFLAGS="${tmp_CFLAGS}"
307 LIBS="${tmp_LIBS}"
308
309 if test "x${use_gnutls_privkey_sign_data}" = "xyes"; then
310 AC_DEFINE(EET_USE_NEW_PRIVKEY_SIGN_DATA, 1, [use gnutls_privkey_sign_data])
311 fi
312fi
313AC_MSG_CHECKING([whether to use gnutls_privkey_sign_data])
314AC_MSG_RESULT([${use_gnutls_privkey_sign_data}])
315
316use_gnutls_pubkey_verify_hash="no"
317if test "x${want_gnutls}" = "xyes" -o "x${want_gnutls}" = "xauto"; then
318 tmp_CFLAGS="${CFLAGS}"
319 tmp_LIBS="${LIBS}"
320 CFLAGS="${GNUTLS_CFLAGS}"
321 LIBS="${GNUTLS_LIBS}"
322 AC_CHECK_LIB(gnutls, gnutls_pubkey_verify_hash,
323 [ use_gnutls_pubkey_verify_hash="yes" ],
324 [ use_gnutls_pubkey_verify_hash="no" ]
325 )
326 CFLAGS="${tmp_CFLAGS}"
327 LIBS="${tmp_LIBS}"
328
329 if test "x${use_gnutls_pubkey_verify_hash}" = "xyes"; then
330 AC_DEFINE(EET_USE_NEW_PUBKEY_VERIFY_HASH, 1, [use gnutls_pubkey_verify_hash])
331 fi
332fi
333AC_MSG_CHECKING([whether to use gnutls_pubkey_verify_hash])
334AC_MSG_RESULT([${use_gnutls_pubkey_verify_hash}])
335
290# Openssl library 336# Openssl library
291have_openssl="no" 337have_openssl="no"
292if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then 338if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then