blob: e3f7fe8924d3e51969842f3ba7b2ebfea8f0e3c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
dnl @synopsis AX_CHECK_DEFINE_PRAGMA([ACTION-IF-TRUE], [ACTION-IF-FALSE])
dnl
dnl This macro will find out if the compiler will accept #pragma inside a
dnl #define. HAVE_DEFINE_PRAGMA will be defined if this is the case, and
dnl ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
dnl
dnl @category C
dnl @author Martin Ebourne
dnl @version 2005/07/03
dnl @license AllPermissive
AC_DEFUN([AX_CHECK_DEFINE_PRAGMA], [
AC_CACHE_CHECK([for pre-processor pragma defines], [box_cv_have_define_pragma],
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#define TEST_DEFINE #pragma pack(1)
TEST_DEFINE
]])],
[box_cv_have_define_pragma=yes], [box_cv_have_define_pragma=no]
)])
if test "x$box_cv_have_define_pragma" = "xyes"; then
AC_DEFINE([HAVE_DEFINE_PRAGMA], 1, [Define to 1 if #define of pragmas works])
m4_ifvaln([$1],[$1],[:])dnl
m4_ifvaln([$2],[else $2])dnl
fi
])dnl
|