I ended up realizing that that building httpd is way harder than it seems. I think this is partly due the dependencies (respectively apr and apr-util) are installed from cydia without much care, as the packages really miss a lot. Above all, apr should create /build-1 containing some useful files for higher level applications, yet this folder is missing. Unfortunately, trying to build on-the-go doesn't work with apr (as kqueue.c raises a lot of problems about poll_* functions missing operands. Usually this happened if I didn't had headers, but there isn't such error now and I fear a bit to just comment out the part that does not compile. Apr-util is, if possible, messier as it rely on that folder where apr should have left libtool and some .mk file to help configuration. It apparently could go until make is called, but then, when libtool calls ar, this last one receive wrong arguments (but then why libtool doesn't complain too?).
I tried crosscompiling on Mac, but the binaries I create seems to be x86_64 (from lipo) and arm (from configure). I can't force the C compiler as any respectable configure do tests and wants to run programs, which is not possible if they're ARM on Intel.
All the sites that I tried about crosscompiling for iphone from mac either are old (SDK 2.0) or/and doesn't work as cross-gcc fails building, let alonte compile.
These are the settings I used:
export CFLAGS="$CPPFLAGS -arch armv6 -pipe -no-cpp-precomp -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"
export CPP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/c++ $CPPFLAGS"
export LDFLAGS="-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib -Wl,-dylib_install_name,@executable_path/$LIBNAME"
# On apr-1.4.5
./configure LD=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld --host=arm-apple-darwin --with-devrandom=/dev/random --enable-threads --prefix=/usr
make && make install DESTDIR=/tmp/crossbuild
but, as I said, there's already a problem here as built libs and binaries are x86_64 and not arm.
So I ask again how to setup a cross toolchain on Mac. Thanks in advance