1 |
# minmax.m4 serial 1 |
# minmax.m4 serial 2 |
2 |
dnl Copyright (C) 2005 Free Software Foundation, Inc. |
dnl Copyright (C) 2005 Free Software Foundation, Inc. |
3 |
dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
4 |
dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
5 |
dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
6 |
|
|
7 |
|
AC_PREREQ(2.52) |
8 |
|
|
9 |
AC_DEFUN([gl_MINMAX], |
AC_DEFUN([gl_MINMAX], |
10 |
[ |
[ |
11 |
AC_REQUIRE([gl_PREREQ_MINMAX]) |
AC_REQUIRE([gl_PREREQ_MINMAX]) |
19 |
]) |
]) |
20 |
|
|
21 |
dnl gl_MINMAX_IN_HEADER(HEADER) |
dnl gl_MINMAX_IN_HEADER(HEADER) |
22 |
|
dnl The parameter has to be a literal header name; it cannot be macro, |
23 |
|
dnl nor a shell variable. (Because autoheader collects only AC_DEFINE |
24 |
|
dnl invocations with a literal macro name.) |
25 |
AC_DEFUN([gl_MINMAX_IN_HEADER], |
AC_DEFUN([gl_MINMAX_IN_HEADER], |
26 |
[ |
[ |
27 |
define([header],[translit([$1],[./-], |
m4_pushdef([header], AS_TR_SH([$1])) |
28 |
[___])]) |
m4_pushdef([HEADER], AS_TR_CPP([$1])) |
|
define([HEADER],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|
29 |
AC_CACHE_CHECK([whether <$1> defines MIN and MAX], |
AC_CACHE_CHECK([whether <$1> defines MIN and MAX], |
30 |
[gl_cv_minmax_in_]header, |
[gl_cv_minmax_in_]header, |
31 |
[AC_TRY_COMPILE([#include <$1> |
[AC_TRY_COMPILE([#include <$1> |
36 |
AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1, |
AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1, |
37 |
[Define to 1 if <$1> defines the MIN and MAX macros.]) |
[Define to 1 if <$1> defines the MIN and MAX macros.]) |
38 |
fi |
fi |
39 |
undefine([HEADER]) |
m4_popdef([HEADER]) |
40 |
undefine([header]) |
m4_popdef([header]) |
41 |
]) |
]) |