1 # canonicalize-lgpl.m4 serial 3
2 dnl Copyright (C) 2003, 2006 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_CANONICALIZE_LGPL],
9 dnl Do this replacement check manually because the file name is shorter
10 dnl than the function name.
11 AC_CHECK_DECLS_ONCE(canonicalize_file_name)
12 AC_CHECK_FUNCS_ONCE(canonicalize_file_name)
13 if test $ac_cv_func_canonicalize_file_name = no; then
14 AC_LIBOBJ(canonicalize-lgpl)
15 AC_DEFINE([realpath], [rpl_realpath],
16 [Define to a replacement function name for realpath().])
17 gl_PREREQ_CANONICALIZE_LGPL
21 # Prerequisites of lib/canonicalize-lgpl.c.
22 AC_DEFUN([gl_PREREQ_CANONICALIZE_LGPL],
24 AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
25 AC_CHECK_FUNCS_ONCE(getcwd readlink)