diff options
author | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-12 15:14:36 +0900 |
---|---|---|
committer | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-12 15:14:36 +0900 |
commit | 993d65531741fccf26fc10fc5789a5c9fca8c5ae (patch) | |
tree | 996be9095a97ff2aac0d98963b6044d47a0ec60c /aclocal.m4 | |
parent | 65c26d26fb72cec0d43d199c72ed27513d17f4c9 (diff) | |
download | nasm-tizen_2.1.tar.gz nasm-tizen_2.1.tar.bz2 nasm-tizen_2.1.zip |
Tizen 2.1 basesubmit/tizen_2.2/20130710.072957submit/tizen_2.1/20130423.103612accepted/tizen_2.1/20130423.1515012.1b_releasetizen_2.1
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..5159c11 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,39 @@ +dnl -------------------------------------------------------------------------- +dnl PA_ADD_CFLAGS() +dnl +dnl Attempt to add the given option to CFLAGS, if it doesn't break compilation +dnl -------------------------------------------------------------------------- +AC_DEFUN(PA_ADD_CFLAGS, +[AC_MSG_CHECKING([if $CC accepts $1]) + pa_add_cflags__old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $1" + AC_TRY_LINK([#include <stdio.h>], + [printf("Hello, World!\n");], + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) + CFLAGS="$pa_add_cflags__old_cflags")]) + +dnl -------------------------------------------------------------------------- +dnl PA_WORKING_STDBOOL +dnl +dnl See if we have a working <stdbool.h> and bool support; in particular, +dnl OpenWatcom 1.8 has a broken _Bool type that we don't want to use. +dnl -------------------------------------------------------------------------- +AC_DEFUN(PA_WORKING_BOOL, +[AC_MSG_CHECKING([if $CC has a working bool type]) + AC_COMPILE_IFELSE( + [ +#ifndef __cplusplus +#include <stdbool.h> +#endif +int foo(bool x, int y) +{ + return x+y; +} + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_WORKING_BOOL, 1, + [Define to 1 if your compiler has a correct implementation of bool])], + [AC_MSG_RESULT([no])]) +]) + |