Commit f60b4ead180e15a43d39a91a36dd244dafbe3608
1 parent
021d7145
Search for gnutls if not found with pkg-config
Showing
3 changed files
with
73 additions
and
1 deletions
autofiles.sums
| 1 | -50057c548d9af98d7b070a8a7716352a777b1f52e7ba44719f94ede65fc27cee configure.ac | 1 | +766d1c21521da343b30d5518198e211cad1a049150ba15afb8dcaeaa2664f470 configure.ac |
| 2 | d3f9ee6f6f0846888d9a10fd3dad2e4b1258be84205426cf04d7cef02d61dad7 aclocal.m4 | 2 | d3f9ee6f6f0846888d9a10fd3dad2e4b1258be84205426cf04d7cef02d61dad7 aclocal.m4 |
| 3 | 2e4cd495837be1b8454a4d8aef541b000988634be89d9c05a9cf5de67dffef5e libqpdf/qpdf/qpdf-config.h.in | 3 | 2e4cd495837be1b8454a4d8aef541b000988634be89d9c05a9cf5de67dffef5e libqpdf/qpdf/qpdf-config.h.in |
| 4 | 5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4 | 4 | 5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4 |
configure
| @@ -17717,6 +17717,74 @@ else | @@ -17717,6 +17717,74 @@ else | ||
| 17717 | $as_echo "yes" >&6; } | 17717 | $as_echo "yes" >&6; } |
| 17718 | GNUTLS_FOUND=1 | 17718 | GNUTLS_FOUND=1 |
| 17719 | fi | 17719 | fi |
| 17720 | +if test "$GNUTLS_FOUND" = "0"; then | ||
| 17721 | + ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" | ||
| 17722 | +if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : | ||
| 17723 | + GNUTLS_FOUND=1 | ||
| 17724 | +else | ||
| 17725 | + GNUTLS_FOUND=0 | ||
| 17726 | +fi | ||
| 17727 | + | ||
| 17728 | + | ||
| 17729 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gnutls_hash_init" >&5 | ||
| 17730 | +$as_echo_n "checking for library containing gnutls_hash_init... " >&6; } | ||
| 17731 | +if ${ac_cv_search_gnutls_hash_init+:} false; then : | ||
| 17732 | + $as_echo_n "(cached) " >&6 | ||
| 17733 | +else | ||
| 17734 | + ac_func_search_save_LIBS=$LIBS | ||
| 17735 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 17736 | +/* end confdefs.h. */ | ||
| 17737 | + | ||
| 17738 | +/* Override any GCC internal prototype to avoid an error. | ||
| 17739 | + Use char because int might match the return type of a GCC | ||
| 17740 | + builtin and then its argument prototype would still apply. */ | ||
| 17741 | +#ifdef __cplusplus | ||
| 17742 | +extern "C" | ||
| 17743 | +#endif | ||
| 17744 | +char gnutls_hash_init (); | ||
| 17745 | +int | ||
| 17746 | +main () | ||
| 17747 | +{ | ||
| 17748 | +return gnutls_hash_init (); | ||
| 17749 | + ; | ||
| 17750 | + return 0; | ||
| 17751 | +} | ||
| 17752 | +_ACEOF | ||
| 17753 | +for ac_lib in '' gnutls; do | ||
| 17754 | + if test -z "$ac_lib"; then | ||
| 17755 | + ac_res="none required" | ||
| 17756 | + else | ||
| 17757 | + ac_res=-l$ac_lib | ||
| 17758 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
| 17759 | + fi | ||
| 17760 | + if ac_fn_c_try_link "$LINENO"; then : | ||
| 17761 | + ac_cv_search_gnutls_hash_init=$ac_res | ||
| 17762 | +fi | ||
| 17763 | +rm -f core conftest.err conftest.$ac_objext \ | ||
| 17764 | + conftest$ac_exeext | ||
| 17765 | + if ${ac_cv_search_gnutls_hash_init+:} false; then : | ||
| 17766 | + break | ||
| 17767 | +fi | ||
| 17768 | +done | ||
| 17769 | +if ${ac_cv_search_gnutls_hash_init+:} false; then : | ||
| 17770 | + | ||
| 17771 | +else | ||
| 17772 | + ac_cv_search_gnutls_hash_init=no | ||
| 17773 | +fi | ||
| 17774 | +rm conftest.$ac_ext | ||
| 17775 | +LIBS=$ac_func_search_save_LIBS | ||
| 17776 | +fi | ||
| 17777 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gnutls_hash_init" >&5 | ||
| 17778 | +$as_echo "$ac_cv_search_gnutls_hash_init" >&6; } | ||
| 17779 | +ac_res=$ac_cv_search_gnutls_hash_init | ||
| 17780 | +if test "$ac_res" != no; then : | ||
| 17781 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | ||
| 17782 | + GNUTLS_FOUND=1 | ||
| 17783 | +else | ||
| 17784 | + GNUTLS_FOUND=0 | ||
| 17785 | +fi | ||
| 17786 | + | ||
| 17787 | +fi | ||
| 17720 | 17788 | ||
| 17721 | IMPLICIT_GNUTLS=0 | 17789 | IMPLICIT_GNUTLS=0 |
| 17722 | USE_CRYPTO_GNUTLS=0 | 17790 | USE_CRYPTO_GNUTLS=0 |
configure.ac
| @@ -519,6 +519,10 @@ dnl gnutls is available. If the gnutls provider is explicitly | @@ -519,6 +519,10 @@ dnl gnutls is available. If the gnutls provider is explicitly | ||
| 519 | dnl disabled, do not link with gnutls even if present. | 519 | dnl disabled, do not link with gnutls even if present. |
| 520 | 520 | ||
| 521 | PKG_CHECK_MODULES([pc_gnutls], [gnutls], [GNUTLS_FOUND=1], [GNUTLS_FOUND=0]) | 521 | PKG_CHECK_MODULES([pc_gnutls], [gnutls], [GNUTLS_FOUND=1], [GNUTLS_FOUND=0]) |
| 522 | +if test "$GNUTLS_FOUND" = "0"; then | ||
| 523 | + AC_CHECK_HEADER(gnutls/gnutls.h,[GNUTLS_FOUND=1],[GNUTLS_FOUND=0]) | ||
| 524 | + AC_SEARCH_LIBS(gnutls_hash_init,gnutls,[GNUTLS_FOUND=1],[GNUTLS_FOUND=0]) | ||
| 525 | +fi | ||
| 522 | 526 | ||
| 523 | IMPLICIT_GNUTLS=0 | 527 | IMPLICIT_GNUTLS=0 |
| 524 | USE_CRYPTO_GNUTLS=0 | 528 | USE_CRYPTO_GNUTLS=0 |