require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_MACHINE_AUTOCONF_H_)) {
    eval 'sub _MACHINE_AUTOCONF_H_ () {1;}' unless defined(&_MACHINE_AUTOCONF_H_);
    require 'machine/bus.ph';
    eval 'sub OFWMACH () {0;}' unless defined(&OFWMACH);
    eval 'sub POWER4e () {1;}' unless defined(&POWER4e);
    eval 'sub PWRSTK () {2;}' unless defined(&PWRSTK);
    eval 'sub APPL () {3;}' unless defined(&APPL);
    eval 'sub BUS_MAIN () {1;}' unless defined(&BUS_MAIN);
    eval 'sub BUS_ISABR () {2;}' unless defined(&BUS_ISABR);
    eval 'sub BUS_PCIBR () {3;}' unless defined(&BUS_PCIBR);
    eval 'sub BUS_VMEBR () {4;}' unless defined(&BUS_VMEBR);
    eval 'sub BUS_INTR_ESTABLISH {
        my($ca, $handler, $val) = @_;
	    eval q((*($ca)-> ($ca_bus->{bh_intr_establish}))(($ca), ($handler), ($val)));
    }' unless defined(&BUS_INTR_ESTABLISH);
    eval 'sub BUS_INTR_DISESTABLISH {
        my($ca) = @_;
	    eval q((*($ca)-> ($ca_bus->{bh_intr_establish}))($ca));
    }' unless defined(&BUS_INTR_DISESTABLISH);
    eval 'sub BUS_CVTADDR {
        my($ca) = @_;
	    eval q((*($ca)-> ($ca_bus->{bh_cvtaddr}))($ca));
    }' unless defined(&BUS_CVTADDR);
    eval 'sub BUS_MATCHNAME {
        my($ca, $name) = @_;
	    eval q((*($ca)-> ($ca_bus->{bh_matchname}))(($ca), ($name)));
    }' unless defined(&BUS_MATCHNAME);
}
1;
