Detecting output device in LaTeX
Is there a way, in a LaTeX style/class file, to detect which output device is being used (or at least which capabilities it has)? The reason is, I'm writing a class file in which I want to use some Postscript-specific packages (e.g. pstricks) if Postscript is available, but if I just write \RequirePackage{pstricks} then of course bad...