I assume you are manually selecting between the two devices rather than using both systems at once. Then I would suggest using a single driver with step and dir inputs switched as previously suggested but use standard logic gates to do the selecting between sources, possibly with optical or other isolators on the inputs to keep the grounds of the two boards separate if required. Power the logic and provide it's ground from the same board that powers the driver.

This way you could avoid any contact bounce on a mechanical switch and remove the need to common the logic grounds of your two boards. The enable line (if used) could also be buffered/switched/maintained during the changeover by your logic if required.