summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-23 23:31:33 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-23 23:31:33 +0200
commit157f5234c463abe1b23a2f86dd182f40f99020fe (patch)
tree8428dbbb979942caa68dc181452c2354c1b7e120 /configure.ac
parent08c066cac2efdfcf569e47609e9e1b0a947ce129 (diff)
downloadxine-lib-157f5234c463abe1b23a2f86dd182f40f99020fe.tar.gz
xine-lib-157f5234c463abe1b23a2f86dd182f40f99020fe.tar.bz2
Check for MIN/MAX macro and include the header for them if found.
The MIN/MAX macro are quite often used on the source code to find the minimum or maximum value between two, instead of defining it per-unit, check if the system provides them include the right header, otherwise define them during configure run.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 79c93f448..6490374c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2177,6 +2177,10 @@ AC_CHECK_FUNC(opendir,
AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)])
fi])
+XINE_CHECK_MINMAX([], [
+ AC_DEFINE([MIN(x, y)], [(x > y) ? y : x], [Get the minimum value between two])
+ AC_DEFINE([MAX(x, y)], [(x > y) ? x : y], [Get the maximum value between two])
+ ])
dnl ---------------------------------------------
dnl cflags and debug cflags