3 # Written by Jim Meyering.
4 # Use Gnulib's robust chdir function.
5 # It can handle arbitrarily long directory names, which means
6 # that when it is given the name of an existing directory, it
7 # never fails with ENAMETOOLONG.
8 # Arrange to compile chdir-long.c only on systems that define PATH_MAX.
10 AC_DEFUN([gl_FUNC_CHDIR_LONG],
12 AC_LIBSOURCES([chdir-long.c, chdir-long.h])
13 AC_CACHE_CHECK([whether this system has a definition of PATH_MAX],
14 gl_have_path_max_definition,
15 [AC_EGREP_CPP([have_path_max_definition],
19 have_path_max_definition
21 gl_have_path_max_definition=yes,
22 gl_have_path_max_definition=no)])
24 if test $gl_have_path_max_definition; then
25 AC_LIBOBJ([chdir-long])
30 AC_DEFUN([gl_PREREQ_CHDIR_LONG],