configure.ac: Move HAVE_LLVM definition into configure.ac
authorTom Stellard <thomas.stellard@amd.com>
Tue, 17 Apr 2012 13:24:29 +0000 (09:24 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 23 Apr 2012 12:53:47 +0000 (08:53 -0400)
Otherwise HAVE_LLVM won't be included in the $(DEFINES) variable for
Automake generated Makefiles.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
configs/autoconf.in
configure.ac

index ec3f3194e2d01c0db8edbdfd9db18ff7ba3da7de..eb6713ddf086544bb7e182c8c4363aae7fbbbb86 100644 (file)
@@ -217,9 +217,5 @@ WAYLAND_LIBS = @WAYLAND_LIBS@
 MESA_LLVM = @MESA_LLVM@
 
 LLVM_VERSION = @LLVM_VERSION@
-ifneq ($(LLVM_VERSION),)
-  HAVE_LLVM := 0x0$(subst .,0,$(LLVM_VERSION:svn=))
-  DEFINES += -DHAVE_LLVM=$(HAVE_LLVM)
-endif
 
 HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@
index 1b571b95c90e481648fa23cf2367d43ce22155b7..5400958187886c17b9a8fef901c8976f91d50649 100644 (file)
@@ -1805,7 +1805,7 @@ if test "x$enable_gallium_llvm" = xyes; then
        LLVM_BINDIR=`$LLVM_CONFIG --bindir`
        LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags`
        LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
-       DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"
+       DEFINES="${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`"
        MESA_LLVM=1
     else
        MESA_LLVM=0