[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Something I forgot in my AC_LN_S patch
From: |
Tim Van Holder |
Subject: |
Something I forgot in my AC_LN_S patch |
Date: |
Wed, 24 Jan 2001 21:37:50 +0100 |
You may have wondered why my AC_LN_S sets ac_ln_s...
(Note: Should CONFIG_LINKS() AC_REQUIRE AC_PROG_LN_S()?)
Well, here's why:
2001-01-24 Tim Van Holder <address@hidden>
* acgeneral.m4 (AC_INIT_DEFAULTS): ac_ln_s: new variable;
default to 'ln -s'.
(_AC_OUTPUT_CONFIG_STATUS): Propagate $ac_ln_s to config.status.
(_AC_OUTPUT_LINKS): Use $ac_ln_s, not 'ln -s'.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.680
diff -u -r1.680 acgeneral.m4
--- acgeneral.m4 2001/01/24 13:41:52 1.680
+++ acgeneral.m4 2001/01/24 20:28:57
@@ -781,6 +785,11 @@
ac_tr_sh="sed y%*+%pp%;s%[[^_$ac_cr_alnum]]%_%g"
ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[[^_$ac_cr_alnum]]%_%g"
+# By default try to use symlinks for AC_CONFIG_LINKS.
+# Site files can override this with the command to use. AC_PROG_LN_S will
+# override this if called (which should be ok).
+ac_ln_s='ln -s'
+
m4_divert_pop([DEFAULTS])dnl
])# _AC_INIT_DEFAULTS
@@ -3574,6 +3606,7 @@
fi
if test -n "$ac_config_links"; then
+ echo "ac_ln_s=\"$ac_ln_s\"" >>$CONFIG_STATUS
echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi
@@ -4287,7 +4384,7 @@
esac
# Make a symlink if possible; otherwise try a hard link.
- if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+ if $ac_ln_s $ac_rel_source $ac_dest 2>/dev/null ||
ln $srcdir/$ac_source $ac_dest; then :; else
AC_MSG_ERROR([cannot link $ac_dest to $srcdir/$ac_source])
fi
- Something I forgot in my AC_LN_S patch,
Tim Van Holder <=