# Exit on error:
set -e

wget https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-22.20.tar.gz
tar xf psmisc-22.20.tar.gz
cd psmisc-22.20

cat > config.cache << EOF
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes
EOF

./configure --prefix= \
    --cache-file=config.cache

make install
cd ..
rm -rf psmisc-22.20
rm psmisc-22.20.tar.gz

exit 0
