copied run_shell_command from configure