aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-06-04 16:51:32 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-06-04 16:51:32 -0700
commitb3076ed2693c6e32fd70a9ec78e36bc71727356e (patch)
treef5b6acb694753d9a98284c3001a8ed9fcb695a64 /configure
parent7b78eb4af6e87532795d09bd82152002ab4a74b1 (diff)
configure: Remove space from IFS (using tab as necessary)
The idea here is to more easily support filenames with spaces in them in various loops. We're about to add a loop over the paths configured by the dynamic linker. Hopefully, they wouldn't contain spaces, but one never knows so we might as well be prepared.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure b/configure
index 40538e14..07bac08b 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,13 @@
#! /bin/sh
+# Removing space from IFS makes it much easier to support filenames
+# with spaces. See http://www.dwheeler.com/essays/filenames-in-shell.html
+# for gory details.
+IFS="$(printf '\n\t')"
+
+# Since we don't have space in IFS we use tab to separate things in lists
+tab="$(printf '\t')"
+
# Set several defaults (optionally specified by the user in
# environemnt variables)
CC=${CC:-gcc}
@@ -7,7 +15,7 @@ CXX=${CXX:-g++}
CFLAGS=${CFLAGS:--O2}
CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}
LDFLAGS=${LDFLAGS:-}
-XAPIAN_CONFIG=${XAPIAN_CONFIG:-xapian-config-1.1 xapian-config}
+XAPIAN_CONFIG=${XAPIAN_CONFIG:-xapian-config-1.1${tab}xapian-config}
# We don't allow the EMACS or GZIP Makefile variables inherit values
# from the environment as we do with CC and CXX above. The reason is