X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure.ac;h=be6898f7deeb46d5443019582a2b2ba25ea60960;hb=31406d978da38fa0e65c5e1553abbd9654ba131d;hp=3a6fde2df6b2e35b021e7f1021984004cdac9733;hpb=49e2275d0d67696662b4e0008a72b9004826feed;p=mesa.git diff --git a/configure.ac b/configure.ac index 3a6fde2df6b..be6898f7dee 100644 --- a/configure.ac +++ b/configure.ac @@ -238,40 +238,10 @@ dnl dnl Optional flags, check for compiler support dnl AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_SUPPORTED=1], [SSE41_SUPPORTED=0]) -AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1]) - -dnl -dnl Hacks to enable 32 or 64 bit build -dnl -AC_ARG_ENABLE([32-bit], - [AS_HELP_STRING([--enable-32-bit], - [build 32-bit libraries @<:@default=auto@:>@])], - [enable_32bit="$enableval"], - [enable_32bit=auto] -) -if test "x$enable_32bit" = xyes; then - if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -m32" - CCASFLAGS="$CCASFLAGS -m32" - fi - if test "x$GXX" = xyes; then - CXXFLAGS="$CXXFLAGS -m32" - fi -fi -AC_ARG_ENABLE([64-bit], - [AS_HELP_STRING([--enable-64-bit], - [build 64-bit libraries @<:@default=auto@:>@])], - [enable_64bit="$enableval"], - [enable_64bit=auto] -) -if test "x$enable_64bit" = xyes; then - if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -m64" - fi - if test "x$GXX" = xyes; then - CXXFLAGS="$CXXFLAGS -m64" - fi +if test "x$SSE41_SUPPORTED" = x1; then + DEFINES="$DEFINES -DUSE_SSE41" fi +AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1]) dnl Can't have static and shared libraries, default to static if user dnl explicitly requested. If both disabled, set to static since shared @@ -301,10 +271,20 @@ AC_ARG_ENABLE([debug], if test "x$enable_debug" = xyes; then DEFINES="$DEFINES -DDEBUG" if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -g -O0" + if ! echo "$CFLAGS" | grep -q -e '-g'; then + CFLAGS="$CFLAGS -g" + fi + if ! echo "$CFLAGS" | grep -q -e '-O'; then + CFLAGS="$CFLAGS -O0" + fi fi if test "x$GXX" = xyes; then - CXXFLAGS="$CXXFLAGS -g -O0" + if ! echo "$CXXFLAGS" | grep -q -e '-g'; then + CXXFLAGS="$CXXFLAGS -g" + fi + if ! echo "$CXXFLAGS" | grep -q -e '-O'; then + CXXFLAGS="$CXXFLAGS -O0" + fi fi fi @@ -474,10 +454,7 @@ if test "x$enable_asm" = xyes; then case "$host_cpu" in i?86) case "$host_os" in - linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*) - test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86 - ;; - gnu*) + linux* | *freebsd* | dragonfly* | *netbsd* | openbsd* | gnu*) asm_arch=x86 ;; esac @@ -485,7 +462,7 @@ if test "x$enable_asm" = xyes; then x86_64|amd64) case "$host_os" in linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*) - test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64 + asm_arch=x86_64 ;; esac ;; @@ -525,10 +502,10 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"], AC_SUBST([DLOPEN_LIBS]) dnl Check if that library also has dladdr -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS $DLOPEN_LIBS" +save_LIBS="$LIBS" +LIBS="$LIBS $DLOPEN_LIBS" AC_CHECK_FUNCS([dladdr]) -LDFLAGS="$save_LDFLAGS" +LIBS="$save_LIBS" case "$host_os" in darwin*|mingw*) @@ -714,7 +691,7 @@ GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast" AC_ARG_WITH([gallium-drivers], [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@], [comma delimited Gallium drivers list, e.g. - "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast" + "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4" @<:@default=r300,r600,svga,swrast@:>@])], [with_gallium_drivers="$withval"], [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"]) @@ -1340,9 +1317,9 @@ if test "x$enable_gallium_gbm" = xyes; then if test "x$enable_gbm" = xno; then AC_MSG_ERROR([cannot enable gbm_gallium without gbm]) fi - # gbm_gallium abuses DRI_LIB_DEPS to link. Make sure it is set. - if test "x$enable_dri" = xno; then - AC_MSG_ERROR([gbm_gallium requires --enable-dri to build]) + + if test "x$enable_gallium_egl" != xyes; then + AC_MSG_ERROR([gbm_gallium is only used by egl_gallium]) fi GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS" @@ -1845,6 +1822,7 @@ gallium_check_st() { gallium_require_llvm() { if test "x$MESA_LLVM" = x0; then + case "$host" in *gnux32) return;; esac case "$host_cpu" in i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);; esac @@ -1935,7 +1913,7 @@ if test -n "$with_gallium_drivers"; then gallium_require_drm_loader gallium_require_llvm "Gallium R300" GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" - gallium_check_st "radeon/drm" "dri/r300" "xa/r300" "" "" + gallium_check_st "radeon/drm" "dri/r300" ;; xr600) HAVE_GALLIUM_R600=yes @@ -1952,7 +1930,7 @@ if test -n "$with_gallium_drivers"; then if test "x$enable_opencl" = xyes; then LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser" fi - gallium_check_st "radeon/drm" "dri/r600" "xa/r600" "xvmc/r600" "vdpau/r600" "omx/r600" + gallium_check_st "radeon/drm" "dri/r600" "" "xvmc/r600" "vdpau/r600" "omx/r600" ;; xradeonsi) HAVE_GALLIUM_RADEONSI=yes @@ -1961,7 +1939,7 @@ if test -n "$with_gallium_drivers"; then GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi" radeon_llvm_check "radeonsi" require_egl_drm "radeonsi" - gallium_check_st "radeon/drm" "dri/radeonsi" "xa/radeonsi" "" "vdpau/radeonsi" "omx/radeonsi" + gallium_check_st "radeon/drm" "dri/radeonsi" "" "" "vdpau/radeonsi" "omx/radeonsi" ;; xnouveau) HAVE_GALLIUM_NOUVEAU=yes @@ -1988,6 +1966,22 @@ if test -n "$with_gallium_drivers"; then if test "x$enable_dri" = xyes; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri/swrast" fi + + if test "x$have_libdrm" = xyes; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri/kms-swrast" + fi + ;; + xvc4) + HAVE_GALLIUM_VC4=yes + gallium_require_drm_loader + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS vc4" + gallium_check_st "vc4/drm" "dri-vc4" "" "" "" + + case "$host_cpu" in + i?86 | x86_64 | amd64) + USE_VC4_SIMULATOR=yes + ;; + esac ;; *) AC_MSG_ERROR([Unknown Gallium driver: $driver]) @@ -2050,6 +2044,7 @@ AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes) +AM_CONDITIONAL(HAVE_GALLIUM_VC4, test "x$HAVE_GALLIUM_VC4" = xyes) AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test "x$HAVE_GALLIUM_SVGA" = xyes -o \ "x$HAVE_GALLIUM_SOFTPIPE" = xyes) @@ -2115,6 +2110,10 @@ AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes) AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes) AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes) AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1) +AM_CONDITIONAL(USE_VC4_SIMULATOR, test x$USE_VC4_SIMULATOR = xyes) +if test "x$USE_VC4_SIMULATOR" = xyes -a "x$HAVE_GALLIUM_ILO" = xyes; then + AC_MSG_ERROR([VC4 simulator on x86 replaces i965 driver build, so ilo must be disabled.]) +fi AC_SUBST([ELF_LIB]) @@ -2168,9 +2167,9 @@ AC_CONFIG_FILES([Makefile src/egl/wayland/wayland-drm/Makefile src/egl/wayland/wayland-egl/Makefile src/egl/wayland/wayland-egl/wayland-egl.pc + src/gallium/Makefile src/gallium/auxiliary/Makefile src/gallium/auxiliary/pipe-loader/Makefile - src/gallium/drivers/Makefile src/gallium/drivers/freedreno/Makefile src/gallium/drivers/galahad/Makefile src/gallium/drivers/i915/Makefile @@ -2187,7 +2186,7 @@ AC_CONFIG_FILES([Makefile src/gallium/drivers/softpipe/Makefile src/gallium/drivers/svga/Makefile src/gallium/drivers/trace/Makefile - src/gallium/state_trackers/Makefile + src/gallium/drivers/vc4/Makefile src/gallium/state_trackers/clover/Makefile src/gallium/state_trackers/dri/Makefile src/gallium/state_trackers/egl/Makefile @@ -2199,7 +2198,6 @@ AC_CONFIG_FILES([Makefile src/gallium/state_trackers/vega/Makefile src/gallium/state_trackers/xa/Makefile src/gallium/state_trackers/xvmc/Makefile - src/gallium/targets/Makefile src/gallium/targets/dri/Makefile src/gallium/targets/egl-static/Makefile src/gallium/targets/gbm/Makefile @@ -2215,7 +2213,6 @@ AC_CONFIG_FILES([Makefile src/gallium/targets/xvmc/Makefile src/gallium/tests/trivial/Makefile src/gallium/tests/unit/Makefile - src/gallium/winsys/Makefile src/gallium/winsys/freedreno/drm/Makefile src/gallium/winsys/i915/drm/Makefile src/gallium/winsys/intel/drm/Makefile @@ -2224,10 +2221,12 @@ AC_CONFIG_FILES([Makefile src/gallium/winsys/svga/drm/Makefile src/gallium/winsys/sw/dri/Makefile src/gallium/winsys/sw/fbdev/Makefile + src/gallium/winsys/sw/kms-dri/Makefile src/gallium/winsys/sw/null/Makefile src/gallium/winsys/sw/wayland/Makefile src/gallium/winsys/sw/wrapper/Makefile src/gallium/winsys/sw/xlib/Makefile + src/gallium/winsys/vc4/drm/Makefile src/gbm/Makefile src/gbm/main/gbm.pc src/glsl/Makefile @@ -2237,15 +2236,9 @@ AC_CONFIG_FILES([Makefile src/gtest/Makefile src/loader/Makefile src/mapi/Makefile - src/mapi/es1api/Makefile src/mapi/es1api/glesv1_cm.pc - src/mapi/es2api/Makefile src/mapi/es2api/glesv2.pc - src/mapi/glapi/Makefile src/mapi/glapi/gen/Makefile - src/mapi/glapi/tests/Makefile - src/mapi/shared-glapi/Makefile - src/mapi/shared-glapi/tests/Makefile src/mapi/vgapi/Makefile src/mapi/vgapi/vg.pc src/mesa/Makefile @@ -2264,7 +2257,8 @@ AC_CONFIG_FILES([Makefile src/mesa/drivers/osmesa/osmesa.pc src/mesa/drivers/x11/Makefile src/mesa/main/tests/Makefile - src/mesa/main/tests/hash_table/Makefile]) + src/util/Makefile + src/util/tests/hash_table/Makefile]) dnl Sort the dirs alphabetically GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`