lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

301-cross-compilation-macos.patch (3404B)


      1 --- a/build/ac-macros/macosx.m4	2016-02-09 01:24:13.181409245 -0500
      2 +++ b/build/ac-macros/macosx.m4	2016-02-09 01:25:15.873408288 -0500
      3 @@ -17,94 +17,4 @@ dnl   specific language governing permis
      4  dnl   under the License.
      5  dnl ===================================================================
      6  dnl
      7 -dnl  Mac OS X specific checks
      8  
      9 -dnl SVN_LIB_MACHO_ITERATE
     10 -dnl Check for _dyld_image_name and _dyld_image_header availability
     11 -AC_DEFUN(SVN_LIB_MACHO_ITERATE,
     12 -[
     13 -  AC_MSG_CHECKING([for Mach-O dynamic module iteration functions])
     14 -  AC_RUN_IFELSE([AC_LANG_PROGRAM([[
     15 -    #include <mach-o/dyld.h>
     16 -    #include <mach-o/loader.h>
     17 -  ]],[[
     18 -    const struct mach_header *header = _dyld_get_image_header(0);
     19 -    const char *name = _dyld_get_image_name(0);
     20 -    if (name && header) return 0;
     21 -    return 1;
     22 -  ]])],[
     23 -    AC_DEFINE([SVN_HAVE_MACHO_ITERATE], [1],
     24 -              [Is Mach-O low-level _dyld API available?])
     25 -    AC_MSG_RESULT([yes])
     26 -  ],[
     27 -    AC_MSG_RESULT([no])
     28 -  ])
     29 -])
     30 -
     31 -dnl SVN_LIB_MACOS_PLIST
     32 -dnl Assign variables for Mac OS property list support
     33 -AC_DEFUN(SVN_LIB_MACOS_PLIST,
     34 -[
     35 -  AC_MSG_CHECKING([for Mac OS property list utilities])
     36 -
     37 -  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
     38 -    #include <AvailabilityMacros.h>
     39 -    #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
     40 -     || !defined(MAC_OS_X_VERSION_10_0) \
     41 -     || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_0)
     42 -    #error ProperyList API unavailable.
     43 -    #endif
     44 -  ]],[[]])],[
     45 -    dnl ### Hack.  We should only need to pass the -framework options when
     46 -    dnl linking libsvn_subr, since it is the only library that uses Keychain.
     47 -    dnl
     48 -    dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
     49 -    dnl OS X frameworks like it does for normal libraries, so we need to
     50 -    dnl explicitly pass the option to all the users of libsvn_subr to allow
     51 -    dnl static builds to link successfully.
     52 -    dnl
     53 -    dnl This does mean that all executables we link will be linked directly
     54 -    dnl to these frameworks - even when building shared libraries - but that
     55 -    dnl shouldn't cause any problems.
     56 -
     57 -    LIBS="$LIBS -framework CoreFoundation"
     58 -    AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
     59 -              [Is Mac OS property list API available?])
     60 -    AC_MSG_RESULT([yes])
     61 -  ],[
     62 -    AC_MSG_RESULT([no])
     63 -  ])
     64 -])
     65 -
     66 -dnl SVN_LIB_MACOS_KEYCHAIN
     67 -dnl Check configure options and assign variables related to Keychain support
     68 -
     69 -AC_DEFUN(SVN_LIB_MACOS_KEYCHAIN,
     70 -[
     71 -  AC_ARG_ENABLE(keychain,
     72 -    AS_HELP_STRING([--disable-keychain],
     73 -    [Disable use of Mac OS KeyChain for auth credentials]),
     74 -    [enable_keychain=$enableval],[enable_keychain=yes])
     75 -
     76 -  AC_MSG_CHECKING([for Mac OS KeyChain Services])
     77 -
     78 -  if test "$enable_keychain" = "yes"; then
     79 -    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
     80 -      #include <AvailabilityMacros.h>
     81 -      #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
     82 -       || !defined(MAC_OS_X_VERSION_10_2) \
     83 -       || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2)
     84 -      #error KeyChain API unavailable.
     85 -      #endif
     86 -    ]],[[]])],[
     87 -      dnl ### Hack, see SVN_LIB_MACOS_PLIST
     88 -      LIBS="$LIBS -framework Security"
     89 -      LIBS="$LIBS -framework CoreServices"
     90 -      AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?])
     91 -      AC_MSG_RESULT([yes])
     92 -    ],[
     93 -      enable_keychain=no
     94 -      AC_MSG_RESULT([no])
     95 -    ])
     96 -  fi
     97 -])