ac_cxx_string_compare_string_first.m4

来自「这是国外的resip协议栈」· M4 代码 · 共 28 行

M4
28
字号
dnl @synopsis AC_CXX_STRING_COMPARE_STRING_FIRSTdnldnl If the standard library string::compare() function takes thednl string as its first argument, define FUNC_STRING_COMPARE_STRING_FIRST to 1.dnldnl @author Steven RobbinsdnlAC_DEFUN([AC_CXX_STRING_COMPARE_STRING_FIRST],[AC_CACHE_CHECK(whether std::string::compare takes a string in argument 1,ac_cv_cxx_string_compare_string_first,[AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include <string>#ifdef HAVE_NAMESPACESusing namespace std;#endif],[string x("hi"); string y("h");return x.compare(y,0,1) == 0;], ac_cv_cxx_string_compare_string_first=yes,  ac_cv_cxx_string_compare_string_first=no) AC_LANG_RESTORE])if test "$ac_cv_cxx_string_compare_string_first" = yes; then  AC_DEFINE(FUNC_STRING_COMPARE_STRING_FIRST,1,            [define if library uses std::string::compare(string,pos,n)])fi])

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?