dnl CF_CHECK_SIZEOF version: 2 updated: 2015/05/09 11:00:10
dnl ---------------
dnl Improve on AC_CHECK_SIZEOF for cases when the build-environment is
dnl deficient, e.g., if someone tries to build in busybox.  Use the second
dnl parameter as the fallback value.
dnl
dnl By the way, 2.13/2.52 differ in AC_CHECK_SIZEOF regarding the types they
dnl can detect; the former includes only stdio.h for types while the latter
dnl includes several header files.
AC_DEFUN([CF_CHECK_SIZEOF],[
AC_CHECK_SIZEOF([$1],[$2])
if test "${ac_cv_type_$1+set}" = set; then
	if test "${ac_cv_sizeof_$1+set}" != set; then
		AC_MSG_WARN(using $2 for sizeof $1)
		ac_cv_sizeof_$1=$2
	elif test "x${ac_cv_sizeof_$1}" = x0; then
		AC_MSG_WARN([sizeof $1 not found, using $2])
		ac_cv_sizeof_$1=$2
	fi
fi
])dnl
