Thermodynamics of a fluid confined to a slit pore with structured walls