修改AC_MSG_CHECKING([for native Win32]) case "$host_os" in mingw|cygwin) os_win32=yes os_mac=no gio_os=gio-windows-2.0 red_target=Windows ;; darwin) os_win32=no os_mac=yes gio_os=gio-unix-2.0 red_target=Unix ;; *) os_win32=no os_mac=no gio_os=gio-unix-2.0 red_target=Unix ;; esac,使其能够判断iOS系统
时间: 2024-02-09 20:12:37 浏览: 130
要让这段代码能够判断 iOS 系统,可以在最后一个分支中添加判断条件,如下所示:
```
AC_MSG_CHECKING([for native Win32])
case "$host_os" in
mingw|cygwin)
os_win32=yes
os_mac=no
gio_os=gio-windows-2.0
red_target=Windows
;;
darwin)
os_win32=no
os_mac=yes
gio_os=gio-unix-2.0
red_target=Unix
;;
ios)
os_win32=no
os_mac=yes
gio_os=gio-unix-2.0
red_target=Unix
;;
*)
os_win32=no
os_mac=no
gio_os=gio-unix-2.0
red_target=Unix
;;
esac
```
这样,当系统类型为 iOS 时,os_win32 变量将被设置为 no,os_mac 变量将被设置为 yes,gio_os 变量将被设置为 gio-unix-2.0,red_target 变量将被设置为 Unix。
相关问题
checking whether the compiler supports GNU C++... yes checking whether g++ accepts -g... yes checking for g++ option to enable C++11 features... none needed checking dependency style of g++... gcc3 checking how to run the C preprocessor... gcc -std=gnu11 -E checking for x86_64-w64-mingw32-ranlib... no checking for ranlib... ranlib checking for x86_64-w64-mingw32-dlltool... no checking for dlltool... no checking for x86_64-w64-mingw32-ar... no checking for x86_64-w64-mingw32-lib... no checking for x86_64-w64-mingw32-link... no checking for ar... ar checking the archiver (ar) interface... ar checking dependency style of gcc -std=gnu11... gcc3 checking for x86_64-w64-mingw32-as... no checking for as... as checking whether dlltool supports --temp-prefix... yes checking whether to build a w32api package for Cygwin... no checking whether to build the Win32 libraries... yes checking whether to build the Win64 libraries... yes checking whether to build the WinARM32 libraries... no checking whether to build the WinARM64 libraries... no checking whether to use genlib... no checking whether to enable globbing... no checking whether to enable private exports... no checking whether to enable delay import libs... no checking what to provide as libmsvcrt.a... msvcrt-os checking whether to include support for Control Flow Guard... no checking whether to enable experimental features... no checking whether the compiler supports -municode... no checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for _mingw_mac.h... no
这些都是 configure 脚本在检查编译器及相关工具是否存在和支持特定的选项和功能。其中包括:
- 检查编译器是否支持 C++11 特性,检查是否需要特定的选项来启用这些特性;
- 检查 gcc 的依赖风格;
- 检查 C 预处理器的运行方式;
- 检查是否存在 x86_64-w64-mingw32-ranlib、x86_64-w64-mingw32-dlltool、x86_64-w64-mingw32-ar、x86_64-w64-mingw32-lib、x86_64-w64-mingw32-link 和 as 等工具,如果不存在,则检查是否存在对应的 ranlib、dlltool、ar 和 as 工具;
- 检查 dlltool 是否支持 --temp-prefix 选项;
- 检查是否需要为 Cygwin 构建 w32api 包;
- 检查是否需要构建 Win32、Win64、WinARM32 和 WinARM64 库;
- 检查是否需要使用 genlib 工具;
- 检查是否需要启用 globbing、private exports 和 delay import libs 等功能;
- 检查是否支持 Control Flow Guard;
- 检查编译器是否支持 -municode 选项;
- 检查是否存在 stdio.h、stdlib.h、string.h、inttypes.h、stdint.h、strings.h、sys/stat.h、sys/types.h、unistd.h 和 _mingw_mac.h 等头文件。
这些检查是为了确保编译器和工具链的完整性和正确性,以便在进行编译和链接操作时能够顺利地进行。
checking for x86_64-w64-mingw32-g++... no checking for x86_64-w64-mingw32-c++... no checking for x86_64-w64-mingw32-gpp... no checking for x86_64-w64-mingw32-aCC... no checking for x86_64-w64-mingw32-CC... no checking for x86_64-w64-mingw32-cxx... no checking for x86_64-w64-mingw32-cc++... no checking for x86_64-w64-mingw32-cl.exe... no checking for x86_64-w64-mingw32-FCC... no checking for x86_64-w64-mingw32-KCC... no checking for x86_64-w64-mingw32-RCC... no checking for x86_64-w64-mingw32-xlC_r... no checking for x86_64-w64-mingw32-xlC... no checking for x86_64-w64-mingw32-clang++... no checking for g++... g++
这段信息表示 configure 脚本正在寻找 x86_64-w64-mingw32-g++ 等交叉编译器,用于在 Linux 或其他操作系统上编译 64 位 Windows 应用程序。这些编译器都没有被找到,最终找到了 g++ 编译器。这个过程通常用于检查系统上是否安装了正确的编译器,并确定使用哪个编译器来构建软件。在这个例子中,由于没有找到合适的交叉编译器,所以使用了本地的 g++ 编译器来进行构建。
阅读全文