+AC_SUBST(MAYBE_EXAMPLES)
+
+
+case $host in
+ *solaris*)
+ AC_CHECK_HEADERS([sys/filio.h])
+ AC_CHECK_HEADERS([sys/sockio.h])
+ if test x$ENABLE_EXAMPLES = xyes; then
+ AC_CHECK_LIB([socket], [main], , [AC_MSG_ERROR([Can not find required library])])
+ AC_CHECK_LIB([nsl], [main], , [AC_MSG_ERROR([Can not find required library])])
+ fi
+ ;;
+ *)
+ ;;
+esac
+
+# check for poll.h
+dnl Check for poll.h
+AC_CHECK_HEADERS([poll.h])
+
+# check for SA_LEN
+dnl Check if sockaddr data structure includes a "sa_len"
+AC_CHECK_MEMBER([struct sockaddr.sa_len],
+ [ AC_DEFINE(HAVE_SOCKADDR_LEN,1,[Whether sockaddr struct has sa_len]) ],
+ [],
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+])
+
+# check for sockaddr_storage
+dnl Check if sockaddr structure includes a "ss_family"
+AC_CHECK_MEMBER([struct sockaddr_storage.ss_family],
+ [ AC_DEFINE(HAVE_SOCKADDR_STORAGE,1,[Whether we have sockaddr_Storage]) ],
+ [],
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+])
+
+#output
+AC_CONFIG_FILES([Makefile]
+ [include/Makefile]
+ [lib/Makefile]
+ [mount/Makefile]
+ [nfs/Makefile]
+ [nlm/Makefile]
+ [portmap/Makefile]
+ [rquota/Makefile]
+ [examples/Makefile]
+ )