aboutsummaryrefslogtreecommitdiff
path: root/mesalib/configure.ac
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-05 07:36:16 +0100
committermarha <marha@users.sourceforge.net>2012-11-05 07:36:16 +0100
commit1cc98f5a48924d750fbef7ea6b05a1ba49c28589 (patch)
tree24c2eebc8ef3536e89b355b099d844083646d190 /mesalib/configure.ac
parent67c290de36ddc1caae94c0892157ac16b90e4f99 (diff)
downloadvcxsrv-1cc98f5a48924d750fbef7ea6b05a1ba49c28589.tar.gz
vcxsrv-1cc98f5a48924d750fbef7ea6b05a1ba49c28589.tar.bz2
vcxsrv-1cc98f5a48924d750fbef7ea6b05a1ba49c28589.zip
xserver mesa xkbcomp git update 5 nov 2012
xserver: a194630f7f7b287cb4ea4a459df0745f4c0d4c1a mesa: ccbfe3dde94cd50a4e6468cfeabf95c79c9d8072 xkbcomp: a68c5b7b29eb1433b1be73b50c4248e10eab8e64
Diffstat (limited to 'mesalib/configure.ac')
-rw-r--r--mesalib/configure.ac58
1 files changed, 49 insertions, 9 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 6b97a26fc..55a9fa712 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -10,7 +10,7 @@ AC_INIT([Mesa], [9.1.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
AC_CONFIG_AUX_DIR([bin])
AC_CONFIG_MACRO_DIR([m4])
-AC_CANONICAL_HOST
+AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([foreign])
dnl http://people.gnome.org/~walters/docs/build-api.txt
@@ -24,9 +24,6 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-LT_PREREQ([2.2])
-LT_INIT([disable-static])
-
dnl Set internal versions
OSMESA_VERSION=8
AC_SUBST([OSMESA_VERSION])
@@ -45,7 +42,9 @@ LIBKMS_XORG_REQUIRED=1.0.0
dnl Check for progs
AC_PROG_CPP
AC_PROG_CC
+AX_PROG_CC_FOR_BUILD
AC_PROG_CXX
+AX_PROG_CXX_FOR_BUILD
AM_PROG_CC_C_O
AM_PROG_AS
AC_CHECK_PROGS([MAKE], [gmake make])
@@ -54,6 +53,9 @@ AC_PROG_SED
AC_PROG_MKDIR_P
AC_PATH_PROG([MKDEP], [makedepend])
+LT_PREREQ([2.2])
+LT_INIT([disable-static])
+
if test "x$MKDEP" = "x"; then
AC_MSG_ERROR([makedepend is required to build Mesa])
fi
@@ -155,6 +157,21 @@ dnl Cache LDFLAGS and CPPFLAGS so we can add to them and restore later
_SAVE_LDFLAGS="$LDFLAGS"
_SAVE_CPPFLAGS="$CPPFLAGS"
+dnl build host compiler macros
+DEFINES_FOR_BUILD=""
+AC_SUBST([DEFINES_FOR_BUILD])
+case "$build_os" in
+linux*|*-gnu*|gnu*)
+ DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -D_GNU_SOURCE"
+ ;;
+solaris*)
+ DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DSVR4"
+ ;;
+cygwin*)
+ DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD"
+ ;;
+esac
+
dnl Compiler macros
DEFINES=""
AC_SUBST([DEFINES])
@@ -177,6 +194,7 @@ if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall -std=gnu99"
;;
*)
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -Wall -std=c99"
CFLAGS="$CFLAGS -Wall -std=c99"
;;
esac
@@ -206,13 +224,16 @@ if test "x$GCC" = xyes; then
CFLAGS=$save_CFLAGS
# Work around aliasing bugs - developers should comment this out
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-strict-aliasing"
CFLAGS="$CFLAGS -fno-strict-aliasing"
# gcc's builtin memcmp is slower than glibc's
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-builtin-memcmp"
CFLAGS="$CFLAGS -fno-builtin-memcmp"
fi
if test "x$GXX" = xyes; then
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -Wall"
CXXFLAGS="$CXXFLAGS -Wall"
# Enable -fvisibility=hidden if using a gcc that supports it
@@ -229,10 +250,12 @@ if test "x$GXX" = xyes; then
CXXFLAGS=$save_CXXFLAGS
# Work around aliasing bugs - developers should comment this out
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-strict-aliasing"
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
# gcc's builtin memcmp is slower than glibc's
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-builtin-memcmp"
CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
fi
@@ -316,6 +339,14 @@ AC_ARG_ENABLE([debug],
[enable_debug=no]
)
if test "x$enable_debug" = xyes; then
+ DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DDEBUG"
+ if test "x$GCC_FOR_BUILD" = xyes; then
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g"
+ fi
+ if test "x$GXX_FOR_BUILD" = xyes; then
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g"
+ fi
+
DEFINES="$DEFINES -DDEBUG"
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -g"
@@ -1748,15 +1779,23 @@ gallium_require_drm_loader() {
}
radeon_llvm_check() {
- LLVM_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
- if test "$LLVM_VERSION_MAJOR" -lt "3" -o "x$LLVM_VERSION" = "x3.0"; then
- AC_MSG_ERROR([LLVM 3.1 or newer is required for the r600/radeonsi llvm compiler.])
+ LLVM_REQUIRED_VERSION_MAJOR="3"
+ LLVM_REQUIRED_VERSION_MINOR="2"
+ LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
+ LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
+ if test "$LLVM_AVAILABLE_VERSION_MAJOR" -lt "$LLVM_REQUIRED_VERSION_MAJOR" -o [ "$LLVM_AVAILABLE_VERSION_MAJOR" -eq "$LLVM_REQUIRED_VERSION_MAJOR" -a "$LLVM_AVAILABLE_VERSION_MINOR" -lt "$LLVM_REQUIRED_VERSION_MINOR" ] ; then
+ AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with AMDGPU target enabled is required.
+ To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
+ git://people.freedesktop.org/~tstellar/llvm master
+ and build with --enable-experimental-targets=AMDGPU])
fi
- if test "$LLVM_VERSION_MAJOR" -ge "3" -a "x$LLVM_VERSION" != "x3.1" && $LLVM_CONFIG --targets-built | grep -qv '\<AMDGPU\>' ; then
- AC_MSG_ERROR([To use the r600/radeonsi LLVM backend with LLVM 3.2 and newer, you need to fetch the LLVM source from:
+ if test true && $LLVM_CONFIG --targets-built | grep -qv '\<AMDGPU\>' ; then
+ AC_MSG_ERROR([LLVM AMDGPU Target not enabled.
+ To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
git://people.freedesktop.org/~tstellar/llvm master
and build with --enable-experimental-targets=AMDGPU])
fi
+ AC_MSG_WARN([Please ensure you use the latest llvm tree from git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])
if test "x$LLVM_VERSION" = "x3.2"; then
LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`"
fi
@@ -1940,6 +1979,7 @@ AC_CONFIG_FILES([configs/current
src/gbm/Makefile
src/gbm/main/gbm.pc
src/glsl/Makefile
+ src/glsl/builtin_compiler/Makefile
src/glsl/glcpp/Makefile
src/glsl/tests/Makefile
src/glx/Makefile