Created
June 21, 2015 21:55
-
-
Save codebrainz/1e6a48b8ed4a31235f33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AC_DEFUN([AX_POSIX], [ | |
AC_MSG_CHECKING([for POSIX 2008 support]) | |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([ | |
#define _POSIX_C_SOURCE 200809L | |
#include <unistd.h> | |
# if !defined(_POSIX_VERSION) || _POSIX_VERSION < 200809L | |
# error "Not POSIX 2008" | |
#endif | |
int main() { return 0; } | |
])], [ | |
AC_MSG_RESULT([yes]) | |
AC_DEFINE([_POSIX_SOURCE], [1], [defined if POSIX is available]) | |
AC_DEFINE([_POSIX_C_SOURCE], [200809L], [defined if POSIX 2008 is available]) | |
], [ | |
AC_MSG_RESULT([no]) | |
AC_MSG_ERROR([POSIX 2008 support is required]) | |
]) | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment