The best thing to do is to find the build log corresponding to your release. For example for ubuntu saucy the build log of lighttpd shows
dh_auto_configure -- \
--disable-dependency-tracking \
--libdir=/usr/lib/lighttpd \
--libexecdir="/usr/lib/lighttpd" \
--with-attr \
--with-fam \
--with-gdbm \
--with-kerberos5 \
--with-ldap \
--with-lua=lua5.1 \
--with-memcache \
--with-mysql \
--with-openssl \
--with-pcre \
--with-webdav-locks \
--with-webdav-props \
CFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" CPPFLAGS="-D_FORTIFY_SOURCE=2" CXXFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" FFLAGS="-g -O2" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro"