1*1424dfb3Schristos#serial 16
2*1424dfb3Schristos
3*1424dfb3Schristos# Use Gnulib's robust chdir function.
4*1424dfb3Schristos# It can handle arbitrarily long directory names, which means
5*1424dfb3Schristos# that when it is given the name of an existing directory, it
6*1424dfb3Schristos# never fails with ENAMETOOLONG.
7*1424dfb3Schristos# Arrange to compile chdir-long.c only on systems that define PATH_MAX.
8*1424dfb3Schristos
9*1424dfb3Schristosdnl Copyright (C) 2004-2007, 2009-2020 Free Software Foundation, Inc.
10*1424dfb3Schristosdnl This file is free software; the Free Software Foundation
11*1424dfb3Schristosdnl gives unlimited permission to copy and/or distribute it,
12*1424dfb3Schristosdnl with or without modifications, as long as this notice is preserved.
13*1424dfb3Schristos
14*1424dfb3Schristos# Written by Jim Meyering.
15*1424dfb3Schristos
16*1424dfb3SchristosAC_DEFUN([gl_FUNC_CHDIR_LONG],
17*1424dfb3Schristos[
18*1424dfb3Schristos  AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
19*1424dfb3Schristos  AC_CACHE_CHECK([whether this system has an arbitrary file name length limit],
20*1424dfb3Schristos    [gl_cv_have_arbitrary_file_name_length_limit],
21*1424dfb3Schristos    [AC_EGREP_CPP([have_arbitrary_file_name_length_limit],
22*1424dfb3Schristos                  gl_PATHMAX_SNIPPET[
23*1424dfb3Schristos#ifdef PATH_MAX
24*1424dfb3Schristoshave_arbitrary_file_name_length_limit
25*1424dfb3Schristos#endif],
26*1424dfb3Schristos    [gl_cv_have_arbitrary_file_name_length_limit=yes],
27*1424dfb3Schristos    [gl_cv_have_arbitrary_file_name_length_limit=no])])
28*1424dfb3Schristos])
29*1424dfb3Schristos
30*1424dfb3SchristosAC_DEFUN([gl_PREREQ_CHDIR_LONG], [:])
31