set -x set -eu set -o pipefail export PATH=/usr/local/c"$which_python"/bin:"$PATH" base_dir="/usr/local/c$which_python" include_dir="$base_dir/include" if ! [ -d "$base_dir" ] then echo "$base_dir does not exist" 1>&2 exit 1 fi if ! [ -d "$include_dir" ] then echo "$include_dir does not exist" 1>&2 exit 1 fi export CFLAGS="-I$include_dir" export LDFLAGS="-L$base_dir/lib -Wl,-rpath -Wl,$base_dir/lib" ./configure \ --prefix=/usr/local/c"$which_python" \ --with-pcre=internal \ && make