diff options
author | Michal Sojka <sojkam1@fel.cvut.cz> | 2011-01-26 23:13:21 +1000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2011-01-26 23:29:03 +1000 |
commit | b4b5e9ce4dac62111ec11da6d22b7e618056801f (patch) | |
tree | e98cf0d5523f0472b580ce7c53d05b3620642770 /configure | |
parent | 74cb76a69d4fb47bb1c03f2d688807793d39ab73 (diff) |
configure: Drop global setting of IFS (without space in it).
This was originally intended to help support filenames with spaces in
them, but this actually breaks things when someone sets a command with
a space in it, (such as CC="ccache cc").
Instead, we now only set a custom IFS when acting on the
newline-separated list of files from /sbin/ldconfig.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -1,13 +1,5 @@ #! /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} @@ -343,11 +335,16 @@ elif [ $uname = "Linux" ] ; then platform=LINUX linker_resolves_library_dependencies=1 ldconfig_paths=$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p') + # Separate ldconfig_paths only on newline (not on any potential + # embedded space characters in any filenames). + OLD_IFS=$IFS + IFS="$(printf '\n')" for path in $ldconfig_paths; do if [ "$path" = "$libdir_expanded" ]; then libdir_in_ldconfig=1 fi done + IFS=$OLD_IFS else printf "Unknown.\n" cat <<EOF |