cmake: pre-cache HAVE_BASENAME for mingw-w64 and MSVC

`basename` is present in mingw-w64, missing from MSVC. Pre-cache
accordingly to make configure faster.

Notice that `basename` has a bug so we later disable it even with
mingw-w64:
781242ffa4/lib/curl_setup.h (L820-L825)

Closes #11974
This commit is contained in:
Viktor Szakats 2023-09-28 11:50:43 +00:00
parent 9b517c8b69
commit 14b745608b
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -33,6 +33,7 @@ if(NOT UNIX)
set(HAVE_UNISTD_H 1)
set(HAVE_INTTYPES_H 1)
set(HAVE_STRTOLL 1)
set(HAVE_BASENAME 1)
elseif(MSVC)
if(NOT MSVC_VERSION LESS 1800)
set(HAVE_INTTYPES_H 1)
@ -46,6 +47,7 @@ if(NOT UNIX)
else()
set(HAVE_SNPRINTF 0)
endif()
set(HAVE_BASENAME 0)
endif()
set(HAVE_LIBSOCKET 0)