Found I had to export some variable: LTFLAGS="--tag=CC"; export LTFLAGS
Then use the following command: apxs -S CC=gcc -S CFLAGS="-O4 -fPIC -I/usr/include/libxml/libxml2" -Wl,-R/usr/apache2/2.2/lib -lapr-0 -lexpat -lxml2 -c -a -i mod_proxy_html.c But I still get: /usr/apr/1.3/build/libtool --tag=CC --mode=compile gcc -O4 -fPIC -I/usr/include/libxml/libxml2 -I/usr/apache2/2.2/include -I/usr/apr/1.3/include -I/usr/apr-util/1.3/include -c -o mod_proxy_html.lo mod_proxy_html.c && touch mod_proxy_html.slo gcc -O4 -fPIC -I/usr/include/libxml/libxml2 -I/usr/apache2/2.2/include -I/usr/apr/1.3/include -I/usr/apr-util/1.3/include -c mod_proxy_html.c -KPIC -DPIC -o .libs/mod_proxy_html.o gcc: mod_proxy_html.c: No such file or directory gcc: unrecognized option `-KPIC' gcc: no input files apxs:Error: Command failed with rc=65536 . -- This message posted from opensolaris.org