1 Fix `canonicalize_file_name' replacement handling when cross-compiling.
2 Without this patch, we end up with:
4 ./.libs/libguile-2.0.so: undefined reference to `rpl_canonicalize_file_name'
6 See <http://hydra.nixos.org/build/2765567> for details.
8 index 69b3f4c..3c4c5ee 100644
9 --- a/m4/canonicalize.m4
10 +++ b/m4/canonicalize.m4
11 @@ -16,8 +16,11 @@ AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
12 AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
13 if test $ac_cv_func_canonicalize_file_name = no; then
14 HAVE_CANONICALIZE_FILE_NAME=0
15 - elif test "$gl_cv_func_realpath_works" != yes; then
16 - REPLACE_CANONICALIZE_FILE_NAME=1
18 + case "$gl_cv_func_realpath_works" in
20 + *) REPLACE_CANONICALIZE_FILE_NAME=1 ;;
25 @@ -30,12 +33,21 @@ AC_DEFUN([gl_CANONICALIZE_LGPL],
26 HAVE_CANONICALIZE_FILE_NAME=0
27 if test $ac_cv_func_realpath = no; then
29 - elif test "$gl_cv_func_realpath_works" != yes; then
32 + case "$gl_cv_func_realpath_works" in
34 + *) REPLACE_REALPATH=1 ;;
37 - elif test "$gl_cv_func_realpath_works" != yes; then
38 - REPLACE_CANONICALIZE_FILE_NAME=1
41 + case "$gl_cv_func_realpath_works" in
45 + REPLACE_CANONICALIZE_FILE_NAME=1
53 Now, work around a second bug: fix default value when cross-compiling
56 index 69b3f4c..111ddf8 100644
57 --- a/m4/canonicalize.m4
58 +++ b/m4/canonicalize.m4
59 @@ -95,7 +95,7 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
60 [gl_cv_func_realpath_works=no],
62 # Guess yes on glibc systems.
63 - *-gnu*) gl_cv_func_realpath_works="guessing yes" ;;
64 + *gnu*) gl_cv_func_realpath_works="guessing yes" ;;
65 # If we don't know, assume the worst.
66 *) gl_cv_func_realpath_works="guessing no" ;;