From 81b31308fa8bed07787046f1f6d33f84ecdd78fc Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 8 Apr 2002 06:17:02 +0000 Subject: [PATCH] fix the _ symbol prefix detection. software rendering now works --- configure.in | 9 +++++++++ src/d_copy.S | 3 +++ src/d_polysa.S | 3 +++ src/math.S | 3 +++ src/qasm.h | 6 +++--- src/r_aclipa.S | 3 +++ src/r_draw16.S | 3 +++ src/r_drawa.S | 3 +++ src/r_edgea.S | 3 +++ src/r_scana.S | 3 +++ src/r_spr8.S | 3 +++ src/r_surf8.S | 3 +++ src/r_varsa.S | 3 +++ src/snd_mixa.S | 3 +++ src/sys_dosa.S | 3 +++ 15 files changed, 51 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 05ac887..1051021 100644 --- a/configure.in +++ b/configure.in @@ -78,6 +78,15 @@ AC_SUBST(ASFLAGS) SDL_FLAGS=`sdl-config --libs` AC_SUBST(SDL_FLAGS) +AC_MSG_CHECKING(for underscore prefix in names) +AC_TRY_LINK( + [asm(".long _bar"); + int bar;], + [], + AC_DEFINE(HAVE_SYM_PREFIX_UNDERSCORE, 1, [Define this if C symbols are prefixed with an underscore]) AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) +) + AC_CONFIG_FILES([Makefile src/Makefile src/baseq2/Makefile diff --git a/src/d_copy.S b/src/d_copy.S index dbab4b4..1fc7aa8 100644 --- a/src/d_copy.S +++ b/src/d_copy.S @@ -3,6 +3,9 @@ // x86 assembly-language screen copying code. // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" .data diff --git a/src/d_polysa.S b/src/d_polysa.S index 78bf00c..331d60c 100644 --- a/src/d_polysa.S +++ b/src/d_polysa.S @@ -3,6 +3,9 @@ // x86 assembly-language polygon model drawing code // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #include "d_ifacea.h" diff --git a/src/math.S b/src/math.S index c6aaf12..e7f1dea 100644 --- a/src/math.S +++ b/src/math.S @@ -2,6 +2,9 @@ // math.s // x86 assembly-language math routines. +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #define GLQUAKE 1 // don't include unneeded defs #include "../src/qasm.h" diff --git a/src/qasm.h b/src/qasm.h index a3ae286..a84f8a8 100644 --- a/src/qasm.h +++ b/src/qasm.h @@ -20,10 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef __ASM_I386__ #define __ASM_I386__ -#if defined ELF && !defined __OpenBSD__ -#define C(label) label -#else +#ifdef HAVE_SYM_PREFIX_UNDERSCORE #define C(label) _##label +#else +#define C(label) label #endif diff --git a/src/r_aclipa.S b/src/r_aclipa.S index d4db210..b1c406f 100644 --- a/src/r_aclipa.S +++ b/src/r_aclipa.S @@ -3,6 +3,9 @@ // x86 assembly-language Alias model transform and project code. // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #include "d_ifacea.h" diff --git a/src/r_draw16.S b/src/r_draw16.S index d4ee01c..55716db 100644 --- a/src/r_draw16.S +++ b/src/r_draw16.S @@ -4,6 +4,9 @@ // subdivision. // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #include "d_ifacea.h" diff --git a/src/r_drawa.S b/src/r_drawa.S index 0e81bac..1c58a30 100644 --- a/src/r_drawa.S +++ b/src/r_drawa.S @@ -3,6 +3,9 @@ // x86 assembly-language edge clipping and emission code // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #include "d_ifacea.h" diff --git a/src/r_edgea.S b/src/r_edgea.S index 3d896da..0c128e8 100644 --- a/src/r_edgea.S +++ b/src/r_edgea.S @@ -3,6 +3,9 @@ // x86 assembly-language edge-processing code. // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #if id386 diff --git a/src/r_scana.S b/src/r_scana.S index eb09861..7669416 100644 --- a/src/r_scana.S +++ b/src/r_scana.S @@ -3,6 +3,9 @@ // x86 assembly-language turbulent texture mapping code // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #include "d_ifacea.h" diff --git a/src/r_spr8.S b/src/r_spr8.S index 4286931..4809c54 100644 --- a/src/r_spr8.S +++ b/src/r_spr8.S @@ -3,6 +3,9 @@ // x86 assembly-language horizontal 8-bpp transparent span-drawing code. // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #if id386 diff --git a/src/r_surf8.S b/src/r_surf8.S index 8daa2f0..8d43bac 100644 --- a/src/r_surf8.S +++ b/src/r_surf8.S @@ -3,6 +3,9 @@ // x86 assembly-language 8 bpp surface block drawing code. // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #if id386 diff --git a/src/r_varsa.S b/src/r_varsa.S index 91c20ff..ee7a5ff 100644 --- a/src/r_varsa.S +++ b/src/r_varsa.S @@ -2,6 +2,9 @@ // r_varsa.s // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h" #include "d_ifacea.h" diff --git a/src/snd_mixa.S b/src/snd_mixa.S index 7128e19..6fce2c3 100644 --- a/src/snd_mixa.S +++ b/src/snd_mixa.S @@ -3,6 +3,9 @@ // x86 assembly-language sound code // +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "qasm.h" #if id386 diff --git a/src/sys_dosa.S b/src/sys_dosa.S index 755463a..f8012c6 100644 --- a/src/sys_dosa.S +++ b/src/sys_dosa.S @@ -2,6 +2,9 @@ // sys_dosa.s // x86 assembly-language DOS-dependent routines. +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "../src/qasm.h"