+
+if [ ${HAVE_ENDIAN} -eq 0 -a \
+ ${HAVE_SYS_ENDIAN} -eq 0 -a \
+ ${HAVE_NTOHL} -eq 0 ]; then
+ echo "FATAL: no endian conversion functions found" 1>&2
+ echo "FATAL: no endian conversion functions found" 1>&3
+ exit 1
+fi
+
+if ismanual fts FTS ${HAVE_FTS}; then
+ HAVE_FTS_COMPARE_CONST=0
+elif runtest fts FTS_COMPARE_CONST -DFTS_COMPARE_CONST; then
+ HAVE_FTS=1
+else
+ runtest fts FTS || true
+fi
+
+# --- wide character and locale support ---
+if get_locale; then
+ runtest wchar WCHAR -DUTF8_LOCALE=\"${UTF8_LOCALE}\" || true
+else
+ HAVE_WCHAR=0
+ echo "wchar: no (no UTF8_LOCALE)" 1>&2
+ echo "wchar: no (no UTF8_LOCALE)" 1>&3
+fi
+
+# --- nanosleep ---
+if [ -n "${LD_NANOSLEEP}" ]; then
+ runtest nanosleep NANOSLEEP "${LD_NANOSLEEP}" || true
+elif singletest nanosleep NANOSLEEP; then
+ :
+elif runtest nanosleep NANOSLEEP "-lrt"; then
+ LD_NANOSLEEP="-lrt"
+fi
+if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
+ echo "FATAL: nanosleep: no" 1>&2
+ echo "FATAL: nanosleep: no" 1>&3
+ exit 1
+fi
+
+if [ ${BUILD_CATMAN} -gt 0 ]; then
+ # --- recvmsg ---
+ if [ -n "${LD_RECVMSG}" ]; then
+ runtest recvmsg RECVMSG "${LD_RECVMSG}" || true
+ elif singletest recvmsg RECVMSG; then
+ :
+ elif runtest recvmsg RECVMSG "-lsocket"; then
+ LD_RECVMSG="-lsocket"
+ fi
+ if [ "${HAVE_RECVMSG}" -eq 0 ]; then
+ echo "FATAL: recvmsg: no" 1>&2
+ echo "FATAL: recvmsg: no" 1>&3
+ echo "Without recvmsg(2), you cannot BUILD_CATMAN." 1>&2
+ exit 1
+ fi
+
+ # --- cmsg ---
+ if singletest cmsg CMSG; then
+ :
+ elif runtest cmsg CMSG "-D_XPG4_2"; then
+ HAVE_CMSG_XPG42=1
+ fi
+ if [ "${HAVE_CMSG}" -eq 0 ]; then
+ echo "FATAL: cmsg: no" 1>&2
+ echo "FATAL: cmsg: no" 1>&3
+ echo "Without CMSG_FIRSTHDR(3), you cannot BUILD_CATMAN." 1>&2
+ exit 1
+ fi
+fi