It's the way to specify where the directory for the expat library is located on your system.
You may have multiple versions installed on your system, or, for any other reason, want to point to a specific location on your system where that library is located. When compiling stuff from the command line, a lot of libraries are provided by apple, and usually, the ./configure script will take care of finding them if they are located on your path. But a lot are not provided by apple. So you need to get them on your system. If you install some libraries with fink, darwinports, or at hand, they're not on the standard locations (/usr/lib /usr/share ...) where the configure script would likely find it, and some programs need you to specify those paths anyway; for the sake of it (and because a lot of "unix" programs are not specific to mac os x, and paths differs on mac os x, freebsd, flavors of linux).
For example, if you install expat with darwinports, the path to it will be /opt/local/ (it's not the complete path to it, but the configure script will usually find out where it is once you provided the entry point. So I would specify --with-expat-dir=/opt/local/ if I were to compile what you want to compile on my system.
Usually, you can find out about compilation options by running :
./configure --help