| Revision 2327,
916 bytes
checked in by jamesog, 4 years ago
(diff) |
|
Update autoconf to silence warnings on autoconf >= 2.62
- AC_SUBST now only works with one variable per call
- When using AC_CACHE the variable must contain the string '_cv_', thus prefix all cache variables with box_cv_
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | dnl @synopsis AX_CHECK_DEFINE_PRAGMA([ACTION-IF-TRUE], [ACTION-IF-FALSE]) |
|---|
| 2 | dnl |
|---|
| 3 | dnl This macro will find out if the compiler will accept #pragma inside a |
|---|
| 4 | dnl #define. HAVE_DEFINE_PRAGMA will be defined if this is the case, and |
|---|
| 5 | dnl ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate |
|---|
| 6 | dnl |
|---|
| 7 | dnl @category C |
|---|
| 8 | dnl @author Martin Ebourne |
|---|
| 9 | dnl @version 2005/07/03 |
|---|
| 10 | dnl @license AllPermissive |
|---|
| 11 | |
|---|
| 12 | AC_DEFUN([AX_CHECK_DEFINE_PRAGMA], [ |
|---|
| 13 | AC_CACHE_CHECK([for pre-processor pragma defines], [box_cv_have_define_pragma], |
|---|
| 14 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
|---|
| 15 | #define TEST_DEFINE #pragma pack(1) |
|---|
| 16 | TEST_DEFINE |
|---|
| 17 | ]])], |
|---|
| 18 | [box_cv_have_define_pragma=yes], [box_cv_have_define_pragma=no] |
|---|
| 19 | )]) |
|---|
| 20 | if test "x$box_cv_have_define_pragma" = "xyes"; then |
|---|
| 21 | AC_DEFINE([HAVE_DEFINE_PRAGMA], 1, [Define to 1 if #define of pragmas works]) |
|---|
| 22 | m4_ifvaln([$1],[$1],[:])dnl |
|---|
| 23 | m4_ifvaln([$2],[else $2])dnl |
|---|
| 24 | fi |
|---|
| 25 | ])dnl |
|---|
Note: See
TracBrowser
for help on using the repository browser.