It always seems to pick up the version from /usr/lib and there doesn't seem to be a ./configure parameter to override it.
./configure --prefix=$PREFIX --with-quantum-depth=8 --disable-installed --without-x --without-perl --enable-static --disable-shared --with-jpeg --with-tiff CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" --disable-openmp --disable-openmp-slow
Thanks, Rui