2021-05-24 22:38:40 +08:00
|
|
|
#***************************************************************************
|
|
|
|
# _ _ ____ _
|
|
|
|
# Project ___| | | | _ \| |
|
|
|
|
# / __| | | | |_) | |
|
|
|
|
# | (__| |_| | _ <| |___
|
|
|
|
# \___|\___/|_| \_\_____|
|
|
|
|
#
|
2023-01-02 20:51:48 +08:00
|
|
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2021-05-24 22:38:40 +08:00
|
|
|
#
|
|
|
|
# This software is licensed as described in the file COPYING, which
|
|
|
|
# you should have received as part of this distribution. The terms
|
|
|
|
# are also available at https://curl.se/docs/copyright.html.
|
|
|
|
#
|
|
|
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
# copies of the Software, and permit persons to whom the Software is
|
|
|
|
# furnished to do so, under the terms of the COPYING file.
|
|
|
|
#
|
|
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
# KIND, either express or implied.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
#
|
2021-05-24 22:38:40 +08:00
|
|
|
#***************************************************************************
|
|
|
|
|
|
|
|
AC_DEFUN([CURL_DARWIN_SYSTEMCONFIGURATION], [
|
2023-09-20 09:36:39 +08:00
|
|
|
AC_MSG_CHECKING([whether to link macOS CoreFoundation, CoreServices, and SystemConfiguration frameworks])
|
2021-05-24 22:38:40 +08:00
|
|
|
case $host_os in
|
|
|
|
darwin*)
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([[
|
2024-07-07 05:47:50 +08:00
|
|
|
#include <sys/types.h>
|
2021-05-24 22:38:40 +08:00
|
|
|
#include <TargetConditionals.h>
|
|
|
|
]],[[
|
2023-07-25 17:32:59 +08:00
|
|
|
#if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
|
2021-05-24 22:38:40 +08:00
|
|
|
return 0;
|
|
|
|
#else
|
2023-07-25 17:32:59 +08:00
|
|
|
#error Not macOS
|
2021-05-24 22:38:40 +08:00
|
|
|
#endif
|
|
|
|
]])
|
|
|
|
],[
|
|
|
|
build_for_macos="yes"
|
|
|
|
],[
|
|
|
|
build_for_macos="no"
|
|
|
|
])
|
|
|
|
if test "x$build_for_macos" != xno; then
|
|
|
|
AC_MSG_RESULT(yes)
|
2023-09-20 09:36:39 +08:00
|
|
|
LDFLAGS="$LDFLAGS -framework CoreFoundation -framework CoreServices -framework SystemConfiguration"
|
2021-05-24 22:38:40 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
esac
|
|
|
|
])
|