should be defined. It was flawed on some platforms (e.g., Darwin & mingw).
Instead, rely on the build system to define it on the compiler command line.
This also reverts ajax's hand-edit to indirect_size.c. I'll fix that on the
X.org side of things later today.
EXPAT_INCLUDES = -I/usr/local/include
X11_INCLUDES = -I/usr/X11R6/include
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
- -DGLX_DIRECT_RENDERING
+ -DGLX_DIRECT_RENDERING -DHAVE_ALIAS
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC \
-ffast-math $(X11_INCLUDES)
CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
- -DGLX_DIRECT_RENDERING
+ -DGLX_DIRECT_RENDERING -DHAVE_ALIAS
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
# -*-makefile-*-
-# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
+# Configuration for linux-indirect: Builds a libGL capable of indirect
+# rendering, but *NOT* capable of direct rendering.
include $(TOP)/configs/default
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
- -DPTHREADS
+ -DPTHREADS -DHAVE_ALIAS
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
#include <GL/gl.h>
#include "indirect_size.h"
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-# define HAVE_ALIAS
-# endif
-
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define PURE __attribute__((pure))
# else
ALIAS( ColorTableParameteriv, ColorTableParameterfv )
ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
ALIAS( PointParameterivNV, PointParameterfvEXT )
-ALIAS( PointParameterfvARB, PointParameterfvEXT )
-ALIAS( PointParameteriv, PointParameterfvEXT )
-# undef HAVE_ALIAS
# undef PURE
# undef FASTCALL
# undef INTERNAL
print '#include "indirect_size.h"'
- print ''
- self.printHaveAlias()
print ''
self.printPure()
print ''
print ''
print '#define __GLX_PAD(x) (((x) + 3) & ~3)'
print ''
- self.printHaveAlias()
- print ''
print '#ifdef HAVE_ALIAS'
print '# define ALIAS2(from,to) \\'
print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\'
return
- def printHaveAlias(self):
- """Conditionally define `HAVE_ALIAS'.
-
- Conditionally defines a preprocessor macro `HAVE_ALIAS'. The
- existance of this macro can be used to determine whether or
- not GCC's alias function attribute can be used.
-
- The name is also added to the file's undef_list.
- """
-
- self.undef_list.append("HAVE_ALIAS")
- print """# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-# define HAVE_ALIAS
-# endif"""
- return
-
-
def real_function_name(element):
name = element.nsProp( "name", None )
alias = element.nsProp( "alias", None )