diff options
author | Daniel Drake <dan@reactivated.net> | 2010-06-25 12:01:58 -0500 |
---|---|---|
committer | Daniel Drake <dan@reactivated.net> | 2010-06-25 12:01:58 -0500 |
commit | 7211aba6e290f9805e911959b2a43a4b3ec56d4f (patch) | |
tree | a82f19cb66ea0cf4ba698ef8df49a008b399f236 /configure.ac | |
parent | b33c3cb9651459de1f3d549677cbac67a017a295 (diff) | |
download | libusbx-7211aba6e290f9805e911959b2a43a4b3ec56d4f.tar.gz |
Only include sys/time.h on appropriate platforms
This header doesn't exist on windows.
For libusb, determine at configure-time if the header is available.
For libusb.h, use gcc predefined macros to only include the header
on platforms that need it.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a4568be..3ba3028 100644 --- a/configure.ac +++ b/configure.ac @@ -127,6 +127,9 @@ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), nopointersign_cflags="-Wno-pointer-sign", nopointersign_cflags="") CFLAGS="$saved_cflags" +# headers not available on all platforms but required on others +AC_CHECK_HEADERS([sys/time.h]) + AC_SUBST([THREAD_CFLAGS]) AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration $nopointersign_cflags -Wshadow" |