+ ac_includes_default="AC_INCLUDES_DEFAULT"
+
+ AC_PROG_AWK
+ AC_PATH_PROG(NM, nm)
+ AC_CACHE_CHECK(for libc start main symbol, psi_cv_libc_main, [
+ psi_libc_main=
+ AC_TRY_LINK(PSI_INCLUDES, [(void)0;], [
+ psi_libc_main=`nm -g conftest$ac_exeext | $AWK -F ' *|@' '/^@<:@@<:@:space:@:>@@:>@+U / {print$[]3; exit}'`
+ ])
+ psi_cv_libc_main=$psi_libc_main
+ ])
+
+ AC_MSG_CHECKING(for preprocessor defaults)
+ psi_cpp_predef=`$CPP -Wp,-dM $CPPFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 - </dev/null`
+ psi_cpp_search=`$CPP -Wp,-v $CPPFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 - </dev/null 2>&1 >/dev/null \
+ | $AWK '
+ /include.*search.*start/ {
+ capture = 1
+ next
+ }
+ /@<:@Ee@:>@nd.*search/ {
+ capture = 0
+ }
+ {
+ if (capture)
+ print $1
+ }
+ ' \
+ `
+ psi_cpp_predef_count=`printf %s "$psi_cpp_predef" | wc -l`
+ psi_cpp_search_count=`printf %s "$psi_cpp_search" | wc -l`
+ AC_MSG_RESULT([$psi_cpp_predef_count predefined macros, and $psi_cpp_search_count search paths])
+ PSI_CPP_PREDEF=`printf "%s\n" "$psi_cpp_predef" | \
+ $AWK '{
+ gsub(/"/, "\\\\\"");
+ printf "\"%s\\\n\"\n", $[]0
+ }' \
+ `
+ PSI_CPP_SEARCH=`printf %s "$psi_cpp_search" | \
+ $AWK '{
+ if (i) printf ":";
+ gsub(/^@<:@@<:@:space:@:>@@:>@+/,"");
+ gsub(/@<:@@<:@:space:@:>@@:>@+$/,"");
+ printf "%s", $[]0;
+ ++i
+ }' \
+ `
+