> It might be that the FreeBSD ports build mechanism sets some environment variables or does some other things that are different from building from source.
Check your Makefile in the directory mod_perl-1.99_17/xs/APR/aprext.
$ cat ./Makefile...
dynamic ::
# End.$
you must see the 'dynamic :
on my FreeBSD 5.3 stabe, perl 5.8.5 from port, Apache 2.0.52 from source, mod_perl 1.99_17 from source
$ make..modperl_apr_perlio.c: In function `PerlIOAPR_open':modperl_apr_perlio.c:113: warning: cast to pointer from integer of different sizeRunning Mkbootstrap for APR::PerlIO ()chmod 644 Perl