contrib: gnutls: Drop mac keychain lookup patch
[vlc.git] / contrib / src / gnutls / gnutls-pkgconfig-osx.patch
1 diff -ru gnutls/libdane/gnutls-dane.pc.in gnutls-fixed/libdane/gnutls-dane.pc.in
2 --- gnutls/libdane/gnutls-dane.pc.in    2015-03-23 08:19:23.000000000 +0100
3 +++ gnutls-fixed/libdane/gnutls-dane.pc.in      2016-06-04 14:25:53.000000000 +0200
4 @@ -18,7 +18,7 @@
5  Description: DANE security library for the GNU system
6  URL: http://www.gnu.org/software/gnutls/
7  Version: @VERSION@
8 -Libs: -L${libdir} -lgnutls-dane
9 +Libs: -L${libdir} -lgnutls-dane @INTL_MACOSX_LIBS@
10  Libs.private: @UNBOUND_LIBS@
11  Requires.private: gnutls
12  Cflags: -I${includedir}
13 diff -ru gnutls/m4/intlmacosx.m4 gnutls-fixed/m4/intlmacosx.m4
14 --- gnutls/m4/intlmacosx.m4     2015-03-23 19:23:36.000000000 +0100
15 +++ gnutls-fixed/m4/intlmacosx.m4       2016-06-04 14:25:53.000000000 +0200
16 @@ -43,9 +43,25 @@
17      AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
18        [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
19    fi
20 +  AC_CACHE_CHECK([for SecTrustCopyAnchorCertificates],
21 +    [SecTrustCopyAnchorCertificates],
22 +    [gt_save_LIBS="$LIBS"
23 +     LIBS="$LIBS -Wl,-framework -Wl,Security"
24 +     AC_TRY_LINK([#include <Security/SecTrust.h>],
25 +       [SecTrustCopyAnchorCertificates(NULL)],
26 +       [gt_cv_func_SecTrustCopyAnchorCertificates=yes],
27 +       [gt_cv_func_SecTrustCopyAnchorCertificates=no])
28 +     LIBS="$gt_save_LIBS"])
29 +  if test $gt_cv_func_SecTrustCopyAnchorCertificates = yes; then
30 +    AC_DEFINE([HAVE_SecTrustCopyAnchorCertificates], [1],
31 +      [Define to 1 if you have the MacOS X function SecTrustCopyAnchorCertificates in the Security framework.])
32 +  fi
33    INTL_MACOSX_LIBS=
34    if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
35 -    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
36 +    INTL_MACOSX_LIBS+="-Wl,-framework -Wl,CoreFoundation "
37 +  fi
38 +  if test $gt_cv_func_SecTrustCopyAnchorCertificates = yes; then
39 +    INTL_MACOSX_LIBS+="-Wl,-framework -Wl,Security "
40    fi
41    AC_SUBST([INTL_MACOSX_LIBS])
42  ])