]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: catch Apple in more target triplets
authorViktor Szakats <commit@vsz.me>
Thu, 29 Aug 2024 15:05:43 +0000 (17:05 +0200)
committerViktor Szakats <commit@vsz.me>
Sat, 21 Sep 2024 10:21:13 +0000 (12:21 +0200)
Before this patch, only these triplets were considered Apple:
`<cpu>-apple-darwin`

After this patch, these are also considered Apple:
`<cpu>-apple-(ios*|tvos*|visionos*|watchos*|<ETC>)`

`$host_os` (the last third of the triplet) still has a valid use
to differentiate between OS flavours, though for now this isn't
used, aligning with CMake.

Closes #14728

acinclude.m4
configure.ac
m4/curl-functions.m4
m4/curl-rustls.m4
m4/curl-sysconfig.m4

index 5476c9a8eebd7bffefa2aa456760a192d9465d3f..c1408b10e3cf7e7c68eb018b885ab99a602420cc 100644 (file)
@@ -1666,8 +1666,8 @@ dnl
 AC_DEFUN([CURL_DARWIN_CFLAGS], [
 
   tst_cflags="no"
-  case $host_os in
-    darwin*)
+  case $host in
+    *-apple-*)
       tst_cflags="yes"
       ;;
   esac
index f922c28d51c67154d428b9c72ee49db3e65b72d8..ed4618a95779cf808fffd46688b5c4cc466a1e0c 100644 (file)
@@ -592,8 +592,8 @@ CURL_CHECK_WIN32_CRYPTO
 
 CURL_DARWIN_CFLAGS
 
-case $host_os in
-  darwin*)
+case $host in
+  *-apple-*)
     CURL_SUPPORTS_BUILTIN_AVAILABLE
     ;;
 esac
@@ -1985,7 +1985,7 @@ if test x"$want_gss" = xyes; then
     LIBS="-lgss $LIBS"
   elif test -z "$GSSAPI_LIB_DIR"; then
     case $host in
-      *-*-darwin*)
+      *-apple-*)
         LIBS="-lgssapi_krb5 -lresolv $LIBS"
         ;;
       *)
@@ -2709,8 +2709,8 @@ dnl Check for the presence of AppleIDN
 dnl **********************************************************************
 
 tst_links_appleidn='no'
-case $host_os in
-  darwin*)
+case $host in
+  *-apple-*)
     AC_MSG_CHECKING([whether to build with Apple IDN])
     OPT_IDN="default"
     AC_ARG_WITH(apple-idn,
index 77aa65272b42026d59e3f2722d8fc1de3b470d0e..982fbb3fe5ecb0eddbb55007933f48025dbf35a9 100644 (file)
@@ -1473,6 +1473,11 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
   #
   if test "$curl_cv_func_getaddrinfo" = "yes"; then
     AC_MSG_CHECKING([if getaddrinfo is threadsafe])
+    case $host in
+      *-apple-*)
+        dnl Darwin 6.0 and macOS 10.2.X and newer
+        tst_tsafe_getaddrinfo="yes"
+    esac
     case $host_os in
       aix[[1234]].* | aix5.[[01]].*)
         dnl AIX 5.1 and older
@@ -1486,10 +1491,6 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
         dnl Darwin 5.0 and macOS 10.1.X and older
         tst_tsafe_getaddrinfo="no"
         ;;
-      darwin*)
-        dnl Darwin 6.0 and macOS 10.2.X and newer
-        tst_tsafe_getaddrinfo="yes"
-        ;;
       freebsd[[1234]].* | freebsd5.[[1234]]*)
         dnl FreeBSD 5.4 and older
         tst_tsafe_getaddrinfo="no"
@@ -3409,8 +3410,8 @@ AC_DEFUN([CURL_CHECK_FUNC_POLL], [
   tst_works_poll="unknown"
   tst_allow_poll="unknown"
   #
-  case $host_os in
-    darwin*|interix*)
+  case $host in
+    *-apple-*|*-*-interix*)
       dnl poll() does not work on these platforms
       dnl Interix: "does provide poll(), but the implementing developer must
       dnl have been in a bad mood, because poll() only works on the /proc
@@ -4874,8 +4875,8 @@ dnl CURL_LIBRARY_PATH variable. It keeps the LD_LIBRARY_PATH
 dnl changes contained within this macro.
 
 AC_DEFUN([CURL_RUN_IFELSE], [
-  case $host_os in
-    darwin*)
+  case $host in
+    *-apple-*)
       AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
       ;;
     *)
index 4d2aabfbc0331964e4dced8a5f9b80b568c2b8a2..fa0118ec7f31a4a2526f59d2260bbedc0dace70a 100644 (file)
@@ -34,8 +34,8 @@ if test "x$OPT_RUSTLS" != xno; then
   CLEANLDFLAGS="$LDFLAGS"
   CLEANCPPFLAGS="$CPPFLAGS"
 
-  case $host_os in
-    darwin*)
+  case $host in
+    *-apple-*)
       LDFLAGS="$LDFLAGS -framework Security"
       ;;
     *)
index 7da71346c7252a1510d9615988bd892d44250e5b..5fcd8859d37ad2b4f157ae426772ac07e0f79714 100644 (file)
@@ -24,8 +24,8 @@
 
 AC_DEFUN([CURL_DARWIN_SYSTEMCONFIGURATION], [
 AC_MSG_CHECKING([whether to link macOS CoreFoundation, CoreServices, and SystemConfiguration frameworks])
-case $host_os in
-  darwin*)
+case $host in
+  *-apple-*)
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM([[
         #include <sys/types.h>