From 8d219bf3cfa973624f5802b7043e1303fa6a0e2b Mon Sep 17 00:00:00 2001 From: theoddone33 <> Date: Sun, 17 Aug 2003 22:49:56 +0000 Subject: [PATCH] The start of a hacky autoconf workaround in case we ever need it. --- zsnes/src/Makefile.check | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 zsnes/src/Makefile.check diff --git a/zsnes/src/Makefile.check b/zsnes/src/Makefile.check new file mode 100644 index 00000000..f6c46d5e --- /dev/null +++ b/zsnes/src/Makefile.check @@ -0,0 +1,33 @@ +############################################################################## +# Makes sure that a system is capable of running ZSNES, errors out with +# an informative message if it is not. +############################################################################## + +############################################################################## +# VARIABLES +############################################################################## +NASMMINVER=0.98.36 + +############################################################################## +# CHECKS +############################################################################## + +# NASM version check +NASMVER=$(word 3, $(shell nasm -v)) +ifeq ($(strip $(NASMVER)),) + $(error Could not find NASM executable. Please install NASM) +endif +ifneq ($(word 1, $(sort $(NASMMINVER) $(NASMVER))),$(NASMMINVER)) + $(error ZSNES needs at least NASM version $(NASMMINVER) to compile. You have version $(NASMVER) installed) +endif + +# OpenGL check +USE_OPENGL=true +ifeq ($(strip $(wildcard /usr/lib/libGL.so* /usr/local/lib/libGL.so*)),) + $(warning Could not find OpenGL libraries. Continuing without OpenGL support) + USE_OPENGL=false +endif +ifeq ($(strip $(wildcard /usr/include/GL/gl.h /usr/local/include/GL/gl.h)),) + $(warning Could not find OpenGL headers. Continuing without OpenGL support) + USE_OPENGL=false +endif