--disable-shared
solved it.
Complete steps if you want it installed in a custom folder (not system-wide):
mkdir $HOME/programs && cd $HOME/programs
git clone https://github.com/LibRaw/LibRaw.git code-libraw
cd code-libraw
git checkout xtrans-compressed
./mkdist.sh
./configure --enable-openmp --enable-lcms --disable-shared --prefix="$HOME/programs/libraw"
make -j8 install
Executable files will be in $HOME/programs/libraw
, you can delete $HOME/programs/code-libraw