diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-02-22 14:53:07 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-03-01 11:58:43 -0800 |
commit | 602cd7f6c6744c2468fb3350eb80ac15f5b9400c (patch) | |
tree | 882528c662d42910f6c8b979b50413a9cd137759 /lib | |
parent | 87f255821b75accb0d91ac11cdf059f91bf6ecd4 (diff) | |
download | samba-602cd7f6c6744c2468fb3350eb80ac15f5b9400c.tar.gz samba-602cd7f6c6744c2468fb3350eb80ac15f5b9400c.tar.bz2 samba-602cd7f6c6744c2468fb3350eb80ac15f5b9400c.zip |
lib/replace: add AC_CHECK_VALUEOF() macro
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/replace/libreplace_macros.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/replace/libreplace_macros.m4 b/lib/replace/libreplace_macros.m4 index 42b88471db..f3753c47c2 100644 --- a/lib/replace/libreplace_macros.m4 +++ b/lib/replace/libreplace_macros.m4 @@ -330,3 +330,18 @@ fi AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1']) fi ]) + +# AC_CHECK_VALUEOF(TYPE, [INCLUDES = DEFAULT-INCLUDES]) +# --------------------------------------------------------------- +AC_DEFUN([AC_CHECK_VALUEOF], +[AS_LITERAL_IF(m4_translit([[$1]], [*], [p]), [], + [m4_fatal([$0: requires literal arguments])])]dnl +[ +_AC_CACHE_CHECK_INT([value of $1], [AS_TR_SH([ac_cv_valueof_$1])], + [(long int) ($1)], + [AC_INCLUDES_DEFAULT([$2])], + []) + +AC_DEFINE_UNQUOTED(AS_TR_CPP(valueof_$1), $AS_TR_SH([ac_cv_valueof_$1]), + [The value of `$1'.]) +])# AC_CHECK_VALUEOF |