]> git.sur5r.net Git - ngadmin/blobdiff - configure.ac
Use portable way to handle timeouts
[ngadmin] / configure.ac
index eeafab3a7ce657fbeed0e170679384b29d85a466..8e7c5a27c48455581f84ee4d6d424c99dfcd7de3 100644 (file)
@@ -86,13 +86,25 @@ AC_TYPE_SIZE_T
 
 # check for library functions
 AC_FUNC_MALLOC
-AC_CHECK_FUNCS([inet_ntoa memchr memset select socket strcasecmp strdup strtol strtoul])
+AC_CHECK_FUNCS([inet_ntoa memchr memset socket poll strcasecmp strdup strtol strtoul])
+
+AC_CHECK_FUNC([clock_gettime], [
+       AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define if you have clock_gettime])
+], [
+       AC_CHECK_LIB([rt], [clock_gettime], [
+               AC_SUBST([RT_LIBS], [-lrt])
+               AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define if you have clock_gettime])
+       ], [
+               AC_CHECK_FUNCS([gettimeofday])
+       ])
+])
 
 
 AC_CONFIG_FILES([
        Makefile
        raw/Makefile
        raw/include/Makefile
+       raw/include/nsdp/Makefile
        raw/src/Makefile
        lib/Makefile
        lib/include/Makefile
@@ -105,20 +117,25 @@ AC_CONFIG_FILES([
 
 AM_COND_IF([ENABLE_SPY], [
        AC_CONFIG_FILES([
-                       spy/Makefile
-                       spy/man/Makefile
-                       spy/src/Makefile
-               ])
+               spy/Makefile
+               spy/man/Makefile
+               spy/src/Makefile
+       ])
 ])
 
 AM_COND_IF([ENABLE_EMU], [
        AC_CONFIG_FILES([
-                       emu/Makefile
-                       emu/man/Makefile
-                       emu/src/Makefile
-               ])
+               emu/Makefile
+               emu/man/Makefile
+               emu/src/Makefile
+       ])
 ])
 
+AM_COND_IF([HAVE_DOXYGEN], [
+       AC_CONFIG_FILES([
+               lib/doxyfile
+       ])
+])
 
 AC_OUTPUT