After encountering problems with hardware I²C as described here, I decided to try software I²C using MPLAB C18 compiler's library functions. Fortunately, the libraries do generate good-looking signal at the pins, but I'm a bit worried about the timings used by them.
The documentation and source files of the C18 compiler do not explicitly say for which bus speed and oscillator frequency the delays in functions are set, so I'm wondering if there's a better way to adjust them than diving through source files and calculating by hand the number of delays I need.