Improve error message when binding http port.
[darkstat] / configure.ac
index 0977e4c..30c5f08 100644 (file)
@@ -122,7 +122,6 @@ AC_ARG_ENABLE(mad-warnings, AS_HELP_STRING([--enable-mad-warnings],
 -Winit-self \
 -Winline \
 -Winvalid-pch \
--Wlong-long \
 -Wmain \
 -Wmissing-braces \
 -Wmissing-declarations \
@@ -192,6 +191,7 @@ AC_ARG_ENABLE(mad-warnings, AS_HELP_STRING([--enable-mad-warnings],
 #-Wc++-compat
 #-Wconversion
 #-Wfatal-errors
+#-Wlong-long
 #-Wpadded
 #-Wsign-conversion
 #-Wstack-protector
@@ -242,8 +242,8 @@ AC_SEARCH_LIBS(gethostbyname, [nsl], [],
   [AC_MSG_ERROR([gethostbyname() not found])])
 AC_SEARCH_LIBS(socket, [socket], [],
   [AC_MSG_ERROR([socket() not found])])
-AC_SEARCH_LIBS(inet_aton, [resolv], [],
-  [AC_MSG_ERROR([inet_aton() not found])])
+AC_SEARCH_LIBS(hstrerror, [resolv], [],
+  [AC_MSG_ERROR([hstrerror() not found])])
 
 # Solaris need sys/filio.h for FIONBIO
 AC_CHECK_HEADERS(sys/filio.h)
@@ -322,5 +322,8 @@ AC_SEARCH_LIBS(strlcat, [bsd],
  AC_DEFINE(HAVE_STRLCAT, 1,
   [Define to 1 if you have strlcat().]))
 
+AC_CHECK_HEADERS(bsd/string.h)
+AC_CHECK_HEADERS(bsd/unistd.h)
+
 AC_CONFIG_FILES([Makefile darkstat.8])
 AC_OUTPUT