apr-util can not build without apr being in ../apr. We know this has to be fixed before we can even consider releasing apr-util as a standalone. 0.9.2 was stillborn because of this.more weirdness. I'm trying to verify that there is some way to get Apache to build with apr & apr-util preinstalled outside of httpd. So far I've seen:* apr-util's configure dies with configure: error: cannot find install-sh or install.sh in ../apr/build ./../apr/build ...if the apr source tree isn't called "apr" exactly or doesn't share a commom parent with the apr-util source tree. OK, I can shuffle things around to get past that pretty easily. Moving on,
It can. My guess is that you have a symlink somewhere. apr-config can get confused in certain circumstances when there is a symlink so that the prefix that was originally passed to apr-config is invalid. It thinks it is not in the source nor installed directory - therefore, it assumes it is in a VPATH situation. This results in the bin/ weirdness.* apr-util's make dies with Makefile:23: /tmp/inst_apr/bin/build/rules.mk: No such file or directory make: *** No rule to make target `/tmp/inst_apr/bin/build/rules.mk'. Stop. hmmm, looks like apr-util's ./configure --help is telling a fib when it says --with-apr can point to apr's install directory. It can't, but seems to work OK if you point it at apr's source tree.
There are some recent fixes in apr that attempt to address this (but doesn't work everywhere since it relies upon 'realpath' being available).
APR_INCLUDEDIR=`$apr_config --includes | sed 's|^.*-I\([[^ ]]*apr[[^ ]]*\).*$|\1|'`* httpd's make dies when trying to generate exports.c, as Jeff reported, with gawk: /home/gregames/apache/httpd-2.0.44.pre1.no_apr/build/make_exports.awk:138 : (FILENAME=/home/gregames/apache/httpd-2.0.44.pre1.no_apr/os/unix/unixd.h FNR=141) fatal: cannot open file `/home/gregames/apache/httpd-2.0.44.pre1.no_apr/srclib/apr/include/*.h' for reading (No such file or directory) My apr install directory is /tmp/inst_apr, so it does have the characters "apr" in its name.
You have to get the above sed rule from httpd-2.0's configure.in to fire correctly. It's very fragile and very wrong, but it works in some predictable edge cases. I haven't had the time to figure out exactly what the edge case is other than that apr-0.9.2 seems to work. Perhaps it is something to do with apr being at the end of the directory name?
I want to add a --includedir option to apr-config so that we can eliminate the guessing we have right now. -- justin
