Skip to content

Commit

Permalink
improved detection of static for zsh
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Apr 25, 2012
1 parent 9300e70 commit 18235de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zsh/shell/functions
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ zsh_prefetch()
zsh_postconfigure()
{
# Enable pcre & regex to be loaded
if [[ ${static_flag:-0} == 0 ]]
if [[ ${static_flag:-0} == 1 || "$LDFLAGS" =~ "static" ]]
then
sed -ri "/zsh\/(pcre|regex)/ { s/link=no/link=dynamic/ ; s/auto=yes/auto=no/ }" config.modules
else
sed -ri "/zsh\/(pcre|regex)/ { s/link=no/link=static/ ; s/auto=yes/auto=no/ }" config.modules
else
sed -ri "/zsh\/(pcre|regex)/ { s/link=no/link=dynamic/ ; s/auto=yes/auto=no/ }" config.modules
fi
grep -E "zsh\/(pcre|regex)" config.modules | __sm.log.debug package -
}
Expand Down

0 comments on commit 18235de

Please sign in to comment.