CFLAGS="-D_POSIX_SOURCE -D_SUSV2_SOURCE -D_BSD_EXTENSION" configure --prefix=/sys --exec-prefix=/$objtype --libdir=/$objtype/lib/ape --includedir=/sys/include/ape --datarootdir=/sys/lib --disable-shared --enable-static --without-x


jpeg, png, tiff automatically found, I presume.