This is invoked after configure has been successfully run. Usually you don't need to define this function, but sometimes you just can't quite convince configure to do the right thing, so you can put some hacks in here to fix things appropriately.
For example, again from GCC:
function hook_postconfigure { echo "s/^GCC_CFLAGS *=/&-I\$\(QNX_TARGET\)\/usr\/include /" >/tmp/fix.$$ if [ ${SYSNAME} == nto ]; then echo "s/OLDCC = cc/OLDCC = .\/xgcc -B.\/ -I \$\(QNX_TARGET\)\/usr\/include/" >>/tmp/fix.$$ echo "/^INCLUDES = /s/\$/ -I\$\(QNX_TARGET\)\/usr\/include/" >>/tmp/fix.$$ if [ ${target} == ntosh ]; then # We've set up GCC to support both big and little endian, but # we only actually support little endian right now. This will # cause the configures for the target libraries to fail, since # it will test the compiler by attempting a big endian compile # which won't link due to a missing libc & crt?.o files. # Hack things by forcing compiles/links to always be little endian sed -e "s/^CFLAGS_FOR_TARGET *=/&-ml /" <Makefile >1.$$ mv 1.$$ Makefile fi else # Only need to build libstdc++ & friends on one host rm -Rf ${target} echo "s/OLDCC = cc/OLDCC = .\/xgcc -B.\//" >>/tmp/fix.$$ fi cd gcc sed -f/tmp/fix.$$ <Makefile >1.$$ mv 1.$$ Makefile cd .. rm /tmp/fix.$$ }