From: Josh Grams Date: Fri, 11 Dec 2009 01:07:01 +0000 (-0500) Subject: Automatically check for the presence of nanosleep. X-Git-Tag: 0.5.6~10 X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=commitdiff_plain;h=923a1c77954f93d107b54c39da7ff63d4f5ffadd Automatically check for the presence of nanosleep. --- diff --git a/config.h.in b/config.h.in index 18bd6ab..e3379f1 100644 --- a/config.h.in +++ b/config.h.in @@ -1,4 +1,4 @@ -/* config.h.in. Generated from configure.in by autoheader. */ +/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT @@ -22,6 +22,9 @@ /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET +/* Define to 1 if you have the `nanosleep' function. */ +#undef HAVE_NANOSLEEP + /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT @@ -52,6 +55,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -70,6 +76,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/configure.ac b/configure.ac index 1441e4e..36ebf02 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AM_PATH_SDL($SDL_VERSION, ) # Checks for header files. -AC_CHECK_HEADERS([inttypes.h stddef.h stdlib.h string.h unistd.h]) +AC_CHECK_HEADERS([inttypes.h stddef.h stdlib.h string.h unistd.h time.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL @@ -35,7 +35,7 @@ AC_TYPE_UINT8_T # Checks for library functions. AC_FUNC_MALLOC -AC_CHECK_FUNCS([atexit memset sqrt strdup]) +AC_CHECK_FUNCS([atexit memset sqrt strdup nanosleep]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/main.c b/main.c index 514a089..1d4ce85 100644 --- a/main.c +++ b/main.c @@ -138,7 +138,7 @@ extern int optind, opterr, optopt; // ************************************* FUNCS -#ifdef nanosleep +#ifdef HAVE_NANOSLEEP void tiny_sleep() { struct timespec t;