Skip to content

Instantly share code, notes, and snippets.

@tonysy
Last active July 20, 2020 12:27
Show Gist options
  • Save tonysy/bc33435dc5b2765f8a7c18c09da55407 to your computer and use it in GitHub Desktop.
Save tonysy/bc33435dc5b2765f8a7c18c09da55407 to your computer and use it in GitHub Desktop.
#!/bin/zsh
set -e
mkdir -p $HOME/local $HOME/local/zsh_tmp
cd $HOME/local/zsh_tmp
wget -O zsh.tar.gz https://sourceforge.net/projects/zsh/files/latest/download
#wget ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz
# ncurses
#tar xvzf ncurses-5.9.tar.gz
#cd ncurses-5.9
export CXXFLAGS=" -fPIC"
export CFLAGS=" -fPIC"
#./configure --prefix=$HOME/local --enable-shared
#make
#make install
#cd ..
# zsh
mkdir zsh && tar -xvf zsh.tar.gz -C zsh --strip-components 1
cd zsh
./configure --prefix=$HOME/local --enable-shared CFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses -fPIC" LDFLAGS="-L$HOME/local/lib -L$HOME/local/include/ncurses -L$HOME/local/include"
make
make install
#CPPFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses -fPIC" LDFLAGS="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib" make
#CPPFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib" make install
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment