| 1 | dnl aclocal.m4 generated automatically by aclocal 1.4
|
|---|
| 2 |
|
|---|
| 3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
|---|
| 4 | dnl This file is free software; the Free Software Foundation
|
|---|
| 5 | dnl gives unlimited permission to copy and/or distribute it,
|
|---|
| 6 | dnl with or without modifications, as long as this notice is preserved.
|
|---|
| 7 |
|
|---|
| 8 | dnl This program is distributed in the hope that it will be useful,
|
|---|
| 9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|---|
| 10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|---|
| 11 | dnl PARTICULAR PURPOSE.
|
|---|
| 12 |
|
|---|
| 13 | AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
|---|
| 14 | [changequote(<<, >>)dnl
|
|---|
| 15 | dnl The name to #define.
|
|---|
| 16 | define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
|---|
| 17 | dnl The cache variable name.
|
|---|
| 18 | define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
|---|
| 19 | changequote([, ])dnl
|
|---|
| 20 | AC_MSG_CHECKING(size of $1)
|
|---|
| 21 | AC_CACHE_VAL(AC_CV_NAME,
|
|---|
| 22 | [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
|
|---|
| 23 | AC_TRY_COMPILE([#include "confdefs.h"
|
|---|
| 24 | #include <sys/types.h>
|
|---|
| 25 | $2
|
|---|
| 26 | ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
|---|
| 27 | if test x$AC_CV_NAME != x ; then break; fi
|
|---|
| 28 | done
|
|---|
| 29 | ])
|
|---|
| 30 | if test x$AC_CV_NAME = x ; then
|
|---|
| 31 | AC_MSG_ERROR([cannot determine a size for $1])
|
|---|
| 32 | fi
|
|---|
|
|---|