- use `BSD` in addition to backwards-compatible method.
- add `BSD` to the configuration log and `buildinfo.txt` if detected.
- add `BSD` tag to `buildinfo.txt` also via `./configure`.
The `BSD` variable is supported by CMake 3.25.0 and upper.
Ref: https://cmake.org/cmake/help/latest/variable/BSD.html
Closes #15367
CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR
CMAKE_SYSTEM_NAME STREQUAL "SunOS")
set(HAVE_GETADDRINFO_THREADSAFE TRUE)
-elseif(CMAKE_SYSTEM_NAME MATCHES "BSD")
+elseif(BSD OR CMAKE_SYSTEM_NAME MATCHES "BSD")
set(HAVE_GETADDRINFO_THREADSAFE FALSE)
endif()
if(UNIX)
set(_target_flags "${_target_flags} UNIX")
endif()
+if(BSD)
+ set(_target_flags "${_target_flags} BSD")
+endif()
if(WIN32)
set(_target_flags "${_target_flags} WIN32")
endif()
*-*-*bsd*|*-*-aix*|*-*-hpux*|*-*-interix*|*-*-irix*|*-*-linux*|*-*-solaris*|*-*-sunos*|*-apple-*|*-*-cygwin*|*-*-msys*)
curl_pflags="${curl_pflags} UNIX";;
esac
+ case $host in
+ *-*-*bsd*)
+ curl_pflags="${curl_pflags} BSD";;
+ esac
fi
if test "$curl_cv_cygwin" = 'yes'; then
curl_pflags="${curl_pflags} CYGWIN"