Re-add an indirection in bytevectors.
[bpt/guile.git] / m4 / canonicalize-lgpl.m4
1 # canonicalize-lgpl.m4 serial 5
2 dnl Copyright (C) 2003, 2006-2007, 2009 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.
6
7 AC_DEFUN([gl_CANONICALIZE_LGPL],
8 [
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
18 fi
19 ])
20
21 # Like gl_CANONICALIZE_LGPL, except prepare for separate compilation
22 # (no AC_LIBOBJ).
23 AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
24 [
25 AC_CHECK_DECLS_ONCE([canonicalize_file_name])
26 AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
27 gl_PREREQ_CANONICALIZE_LGPL
28 ])
29
30 # Prerequisites of lib/canonicalize-lgpl.c.
31 AC_DEFUN([gl_PREREQ_CANONICALIZE_LGPL],
32 [
33 AC_CHECK_HEADERS_ONCE([sys/param.h unistd.h])
34 AC_CHECK_FUNCS_ONCE([getcwd readlink])
35 ])