summaryrefslogtreecommitdiff
path: root/legacy/ecore/m4/efl_path_max.m4
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2010-01-04 19:20:15 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2010-01-04 19:20:15 +0000
commita60083c90ef44fad1b16ccf697e4c69dc83ebdf3 (patch)
treedc0ebc33a817928cd7f3f97cb59a7bca0e08ae12 /legacy/ecore/m4/efl_path_max.m4
parent5c70219de3f1359223a59e754f8dd03989989f72 (diff)
PATH_MAX checks, by Lutin.
SVN revision: 44887
Diffstat (limited to 'legacy/ecore/m4/efl_path_max.m4')
-rw-r--r--legacy/ecore/m4/efl_path_max.m433
1 files changed, 33 insertions, 0 deletions
diff --git a/legacy/ecore/m4/efl_path_max.m4 b/legacy/ecore/m4/efl_path_max.m4
new file mode 100644
index 0000000000..2c9b60afe7
--- /dev/null
+++ b/legacy/ecore/m4/efl_path_max.m4
@@ -0,0 +1,33 @@
1dnl Check for PATH_MAX in limits.h, and define a default value if not found
2dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
3
4dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
5dnl
6dnl If PATH_MAX is not defined in <limits.h>, defines it
7dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
8dnl to using 4096
9
10AC_DEFUN([EFL_CHECK_PATH_MAX],
11[
12
13default_max=m4_default([$1], "4096")
14AC_LANG_PUSH([C])
15
16AC_MSG_CHECKING([for PATH_MAX in limit.h])
17AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM([[#include <limits.h>]],
19 [[int i = PATH_MAX]])
20 ],
21 AC_MSG_RESULT([yes]),
22 [
23 AC_DEFINE_UNQUOTED([PATH_MAX],
24 [${default_max}],
25 [default value since PATH_MAX is not defined])
26 AC_MSG_RESULT([no: using ${default_max}])
27 ]
28)
29
30AC_LANG_POP([C])
31
32])
33dnl end of efl_path_max.m4