I've owned a 1998 Z-3 (the 2.8) and a 2000 Boxster (not S). Assuming you like the styling equally, I would recommend the BMW. The primary reason is maintenance costs. An oil change on the Porsche (not at the dealer but at a German specialty mechanic) is about $100, but the recommended interval is 7500 miles with synthetic oil, so that's not too out of line. However, it seemed like every little thing that went wrong with the Boxster cost me $1500. My car had 50,000 miles on it and I replaced the alternator, a coolant reservoir, and had to replace the transmission mounts. All of this work was expensive and surprising for a car that was not driven hard and didn't have too many miles on it.
In my opinion, the Boxster (like the S2000), required that you drive it like you stole it. You really had to keep your foot in it to have any fun. It is true though, that it handled like a dream and the engine sounded wonderful above 5000 rpm.
BMW engines are the shit, though. My Z3 had only about 190 horses (vs. 217 on the Boxster), but all that power was available from launch. I do most of my driving in town, so it was much more fun for me to drive the Z3. I also had no mechanical/maintenance issues with the Z3 (it did have only 25,000 miles on it though).
That said, I think the Z4 looks like snoopy and I wouldn't want to drive it, but the 3.0 has about 225 horses and excellent torque acceleration.
Tough decision.