about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-23T22·42-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-23T22·42-0400
commite98c029717016dfa3e5c618c9fc46da9b2142dcc (patch)
tree77a1f6aa7366091f5d2fa3307839e960dbdc07c0 /configure.ac
parentfd63c8bfcd75624e7fbba8899365095400534e01 (diff)
Handle platforms that don't support linking to a symlink
E.g. Darwin doesn't allow this.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a2512cfe9274..f920b8c10e75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,6 +120,18 @@ AC_CHECK_HEADERS([sys/mount.h], [], [],
 AC_CHECK_FUNCS([lutimes])
 
 
+# Check whether the store optimiser can optimise symlinks.
+AC_MSG_CHECKING([whether it is possible to create a link to a symlink])
+ln -s bla tmp_link
+if ln tmp_link tmp_link2 2> /dev/null; then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(CAN_LINK_SYMLINK, 1, [Whether link() works on symlinks.])
+else
+    AC_MSG_RESULT(no)
+fi
+rm -f tmp_link tmp_link2
+
+
 # Check for <locale>.
 AC_LANG_PUSH(C++)
 AC_CHECK_HEADERS([locale])