mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-06-11 12:56:21 +09:00
cmake: Add detection for getopt and getopt.h
Add CMake checks for the getopt function and getopt.h header to prepare for a bundled getopt fallback on platforms that lack it (e.g. MSVC). Signed-off-by: Mingyuan Li <2560359315@qq.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -65,6 +65,8 @@ check_include_file(byteswap.h HAVE_BYTESWAP_H)
|
||||
check_include_file(glob.h HAVE_GLOB_H)
|
||||
check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H)
|
||||
check_include_file(ifaddrs.h HAVE_IFADDRS_H)
|
||||
check_include_file(getopt.h HAVE_GETOPT_H)
|
||||
check_function_exists(getopt HAVE_GETOPT)
|
||||
|
||||
if (WIN32)
|
||||
check_include_file(io.h HAVE_IO_H)
|
||||
|
||||
@@ -67,6 +67,12 @@
|
||||
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
||||
#cmakedefine HAVE_IFADDRS_H 1
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#cmakedefine HAVE_GETOPT_H 1
|
||||
|
||||
/* Define to 1 if you have the `getopt' function. */
|
||||
#cmakedefine HAVE_GETOPT 1
|
||||
|
||||
/* Define to 1 if you have the <openssl/aes.h> header file. */
|
||||
#cmakedefine HAVE_OPENSSL_AES_H 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user