2 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
10 dnl Prerequisites of lib/pathmax.h.
11 AC_CHECK_HEADERS_ONCE([sys/param.h])
14 # Expands to a piece of C program that defines PATH_MAX in the same way as
15 # "pathmax.h" will do.
16 AC_DEFUN([gl_PATHMAX_SNIPPET], [[
17 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
22 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
23 # include <sys/param.h>
25 #if !defined PATH_MAX && defined MAXPATHLEN
26 # define PATH_MAX MAXPATHLEN
30 # define PATH_MAX 1024
32 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
38 # Prerequisites of gl_PATHMAX_SNIPPET.
39 AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ],
41 AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h])