- Use autoconfig when <= 2.6, and cmake > 2.7
- Patch fortran Makefile
- Use CP2K's toolchain as reference: https://github.com/cp2k/cp2k/blob/master/tools/toolchain/scripts/stage3/install_libint.sh
# download
wget https://www.cp2k.org/static/downloads/libint-v2.6.0-cp2k-lmax-5.tgz --no-check-certificate
tar -xvf libint-v2.6.0-cp2k-lmax-5.tgz
cd libint-v2.6.0-cp2k-lmax-5
# config
CC=mpiicc CXX=mpiicc FC=mpiifort ./configure \
--with-cxx="mpiicc -O3 -xCORE-AVX512 -mtune=icelake-server -g1" \
--with-cxx-optflags="-O3 -xCORE-AVX512 -mtune=icelake-server -g1" \
--enable-fortran \
--with-pic
# fix
sed -i -e "s/\$(CXX) \$(CXXFLAGS)/\$(FC) \$(FCFLAGS)/g" -e "s/\$(FCLIBS) -o/\$(FCLIBS) -lstdc++ -o/" fortran/Makefile
make -j48