/* This program is a horrible hack to make the libglide3 library ** symlinked to the proper library for voodoo 3 or 5 */ #include #include #include #include char *oldpath = GLIDELIB; int main(int argc, char **argv) { struct device **devicelist; struct pciDevice *videodev; devicelist = probeDevices(CLASS_VIDEO, BUS_PCI, PROBE_ALL); if (!devicelist || !devicelist[0]) exit(0); videodev = (struct pciDevice *)devicelist[0]; switch (videodev->vendorId) { case 0x121a: switch (videodev->deviceId) { case 0x0003: case 0x0004: case 0x0005: unlink(oldpath); symlink("glide3/libglide3-v3.so",oldpath); break; case 0x0009: unlink(oldpath); symlink("glide3/libglide3-v5.so",oldpath); break; default: break; } break; default: break; } exit(0); }