* modules/canonicalize-tests (configure.ac): Define HAVE_SYMLINK.
(Makefile.am): Pass it through TESTS_ENVIRONMENT.
* modules/canonicalize-lgpl-tests (configure.ac, Makefile.am):
Likewise.
* tests/test-canonicalize.sh: Also skip test if 'ln -s' works, but
target does not support symlinks.
* tests/test-canonicalize-lgpl.sh: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-31 Eric Blake <ebb9@byu.net>
+ canonicalize: allow cross-testing from cygwin to mingw
+ * modules/canonicalize-tests (configure.ac): Define HAVE_SYMLINK.
+ (Makefile.am): Pass it through TESTS_ENVIRONMENT.
+ * modules/canonicalize-lgpl-tests (configure.ac, Makefile.am):
+ Likewise.
+ * tests/test-canonicalize.sh: Also skip test if 'ln -s' works, but
+ target does not support symlinks.
+ * tests/test-canonicalize-lgpl.sh: Likewise.
+
chown: avoid compilation warning on mingw
* m4/chown.m4 (gl_FUNC_CHOWN): Recognize missing chown.
* lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Always return failure on
Depends-on:
configure.ac:
+AC_CHECK_FUNCS_ONCE([symlink])
+HAVE_SYMLINK=$ac_cv_func_symlink
+AC_SUBST([HAVE_SYMLINK])
Makefile.am:
TESTS += test-canonicalize-lgpl.sh
-TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@'
+TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' HAVE_SYMLINK='$(HAVE_SYMLINK)'
check_PROGRAMS += test-canonicalize-lgpl
test_canonicalize_lgpl_LDADD = $(LDADD)
Depends-on:
configure.ac:
+AC_CHECK_FUNCS_ONCE([symlink])
+HAVE_SYMLINK=$ac_cv_func_symlink
+AC_SUBST([HAVE_SYMLINK])
Makefile.am:
TESTS += test-canonicalize.sh
-TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@'
+TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' HAVE_SYMLINK='$(HAVE_SYMLINK)'
check_PROGRAMS += test-canonicalize
test_canonicalize_LDADD = $(LDADD) @LIBINTL@
tmpfiles="$tmpfiles t-can-lgpl.tmp ise"
mkdir t-can-lgpl.tmp
-ln -s t-can-lgpl.tmp/ket ise \
+test "x$HAVE_SYMLINK" = xyes \
+ && ln -s t-can-lgpl.tmp/ket ise \
|| { echo "Skipping test: symbolic links not supported on this filesystem"
rm -fr $tmpfiles
exit 77
tmpfiles="$tmpfiles t-can.tmp ise"
mkdir t-can.tmp
-ln -s t-can.tmp/ket ise \
+test "x$HAVE_SYMLINK" = xyes \
+ && ln -s t-can.tmp/ket ise \
|| { echo "Skipping test: symbolic links not supported on this filesystem"
rm -fr $tmpfiles
exit 77