Infrared spectroscopy under extreme conditions