X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure.ac;h=c5042f93ee71b4bc45a9dfe8936220edef5aed6a;hb=6e627b49f9c9b62bb116a738305a564d4f28e633;hp=d54cba36d3c616abd55c1aa574c182fc184749bb;hpb=1a568e0f2b65e4e1e1d19a6dece3a792a33da825;p=mesa.git diff --git a/configure.ac b/configure.ac index d54cba36d3c..c5042f93ee7 100644 --- a/configure.ac +++ b/configure.ac @@ -285,18 +285,15 @@ dnl Can't have static and shared libraries, default to static if user dnl explicitly requested. If both disabled, set to static since shared dnl was explicitly requested. case "x$enable_static$enable_shared" in -xyesyes ) - AC_MSG_WARN([Cannot build static and shared libraries, disabling shared]) - enable_shared=no +xnoyes ) ;; -xnono ) - AC_MSG_WARN([Cannot disable both static and shared libraries, enabling static]) - enable_static=yes +* ) + AC_MSG_WARN([Messa build supports only shared libraries, enabling shared]) + enable_shared=yes + enable_static=no ;; esac -AM_CONDITIONAL(BUILD_SHARED, test "x$enable_shared" = xyes) - dnl dnl other compiler options dnl @@ -316,28 +313,34 @@ if test "x$enable_debug" = xyes; then fi fi +dnl +dnl compatibility symlinks +dnl +case "$host_os" in +linux* ) + HAVE_COMPAT_SYMLINKS=yes ;; +* ) + HAVE_COMPAT_SYMLINKS=no ;; +esac + +AM_CONDITIONAL(HAVE_COMPAT_SYMLINKS, test "x$HAVE_COMPAT_SYMLINKS" = xyes) + dnl dnl library names dnl -LIB_PREFIX_GLOB='lib' -LIB_VERSION_SEPARATOR='.' -if test "$enable_static" = yes; then - LIB_EXTENSION='a' -else - case "$host_os" in - darwin* ) - LIB_EXTENSION='dylib' ;; - cygwin* ) - dnl prefix can be 'cyg' or 'lib' - LIB_PREFIX_GLOB='???' - LIB_VERSION_SEPARATOR='-' - LIB_EXTENSION='dll' ;; - aix* ) - LIB_EXTENSION='a' ;; - * ) - LIB_EXTENSION='so' ;; - esac -fi +case "$host_os" in +darwin* ) + LIB_EXT='dylib' ;; +cygwin* ) + LIB_EXT='dll' ;; +aix* ) + LIB_EXT='a' ;; +* ) + LIB_EXT='so' ;; +esac + +AC_SUBST([LIB_EXT]) + AC_ARG_WITH([gl-lib-name], [AS_HELP_STRING([--with-gl-lib-name@<:@=NAME@:>@], [specify GL library name @<:@default=GL@:>@])], @@ -383,37 +386,6 @@ if test "x$enable_texture_float" = xyes; then DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED" fi -GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION} -OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION} -EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION} -GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION} -GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION} -VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION} -GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION} - -GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' - -AC_SUBST([GL_LIB_NAME]) -AC_SUBST([OSMESA_LIB_NAME]) -AC_SUBST([EGL_LIB_NAME]) -AC_SUBST([GLESv1_CM_LIB_NAME]) -AC_SUBST([GLESv2_LIB_NAME]) -AC_SUBST([VG_LIB_NAME]) -AC_SUBST([GLAPI_LIB_NAME]) - -AC_SUBST([GL_LIB_GLOB]) -AC_SUBST([EGL_LIB_GLOB]) -AC_SUBST([GLESv1_CM_LIB_GLOB]) -AC_SUBST([GLESv2_LIB_GLOB]) -AC_SUBST([VG_LIB_GLOB]) -AC_SUBST([GLAPI_LIB_GLOB]) - dnl dnl Arch/platform-specific settings dnl @@ -610,10 +582,8 @@ AC_ARG_ENABLE([omx], [enable_omx=no]) AC_ARG_ENABLE([opencl], [AS_HELP_STRING([--enable-opencl], - [enable OpenCL library NOTE: Enabling this option will also enable - --with-llvm-shared-libs - @<:@default=no@:>@])], - [], + [enable OpenCL library @<:@default=no@:>@])], + [enable_opencl="$enableval"], [enable_opencl=no]) AC_ARG_ENABLE([opencl_icd], [AS_HELP_STRING([--enable-opencl-icd], @@ -804,11 +774,6 @@ PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED], have_libudev=yes, have_libudev=no) if test "x$enable_dri" = xyes; then - # DRI must be shared, I think - if test "$enable_static" = yes; then - AC_MSG_ERROR([Cannot use static libraries for DRI drivers]) - fi - # not a hard requirement as swrast does not depend on it if test "x$have_libdrm" = xyes; then DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" @@ -994,6 +959,10 @@ if test "x$enable_dri" = xyes; then DEFINES="$DEFINES -DHAVE_DRI3" fi + if test "x$have_libudev" != xyes; then + AC_MSG_ERROR([libudev-dev required for building DRI]) + fi + case "$host_cpu" in powerpc* | sparc*) # Build only the drivers for cards that exist on PowerPC/sparc @@ -1068,7 +1037,7 @@ if test -n "$with_dri_drivers"; then dri_drivers=`IFS=', '; echo $with_dri_drivers` for driver in $dri_drivers; do - DRI_DIRS+="$driver " + DRI_DIRS="$DRI_DIRS $driver" case "x$driver" in xi915) HAVE_I915_DRI=yes; @@ -1136,12 +1105,7 @@ x16|x32) esac if test "x$enable_osmesa" = xyes -o "x$enable_gallium_osmesa" = xyes; then - # only link libraries with osmesa if shared - if test "$enable_static" = no; then - OSMESA_LIB_DEPS="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS" - else - OSMESA_LIB_DEPS="" - fi + OSMESA_LIB_DEPS="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS" OSMESA_MESA_DEPS="" OSMESA_PC_LIB_PRIV="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS" fi @@ -1190,11 +1154,8 @@ if test "x$enable_egl" = xyes; then AC_CHECK_FUNC(mincore, [DEFINES="$DEFINES -DHAVE_MINCORE"]) - if test "$enable_static" != yes; then - if test "x$enable_dri" = xyes; then - HAVE_EGL_DRIVER_DRI2=1 - fi - + if test "x$enable_dri" = xyes; then + HAVE_EGL_DRIVER_DRI2=1 fi fi AM_CONDITIONAL(HAVE_EGL, test "x$enable_egl" = xyes) @@ -1531,8 +1492,8 @@ AC_ARG_ENABLE([gallium-llvm], AC_ARG_ENABLE([llvm-shared-libs], [AS_HELP_STRING([--enable-llvm-shared-libs], [link with LLVM shared libraries @<:@default=enabled@:>@])], - [], - [with_llvm_shared_libs=yes]) + [enable_llvm_shared_libs="$enableval"], + [enable_llvm_shared_libs=yes]) AC_ARG_WITH([llvm-prefix], [AS_HELP_STRING([--with-llvm-prefix], @@ -1667,11 +1628,16 @@ AC_ARG_WITH([vdpau-libdir], [VDPAU_LIB_INSTALL_DIR='${libdir}/vdpau']) AC_SUBST([VDPAU_LIB_INSTALL_DIR]) +OMX_LIB_INSTALL_DIR_DEFAULT='' +if test "x$enable_omx" = xyes; then + OMX_LIB_INSTALL_DIR_DEFAULT=`$PKG_CONFIG --variable=pluginsdir libomxil-bellagio` +fi + AC_ARG_WITH([omx-libdir], [AS_HELP_STRING([--with-omx-libdir=DIR], [directory for the OMX libraries])], [OMX_LIB_INSTALL_DIR="$withval"], - [OMX_LIB_INSTALL_DIR=`$PKG_CONFIG --variable=pluginsdir libomxil-bellagio`]) + [OMX_LIB_INSTALL_DIR="$OMX_LIB_INSTALL_DIR_DEFAULT"]) AC_SUBST([OMX_LIB_INSTALL_DIR]) dnl Directory for OpenCL libs @@ -1869,7 +1835,7 @@ if test "x$MESA_LLVM" != x0; then LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`" - if test "x$with_llvm_shared_libs" = xyes; then + if test "x$enable_llvm_shared_libs" = xyes; then dnl We can't use $LLVM_VERSION because it has 'svn' stripped out, LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version` AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"], [llvm_have_one_so=yes]) @@ -1886,18 +1852,17 @@ if test "x$MESA_LLVM" != x0; then and that your llvm libraries are installed in $LLVM_LIBDIR If you have installed your llvm libraries to a different directory you can use the --with-llvm-prefix= configure flag to specify this directory. - NOTE: Mesa is attempting to use llvm shared libraries because you have - passed one of the following options to configure: - --with-llvm-shared-libs - --enable-opencl + NOTE: Mesa is attempting to use llvm shared libraries by default. If you do not want to build with llvm shared libraries and instead want to - use llvm static libraries then remove these options from your configure - invocation and reconfigure.])]) + use llvm static libraries then add --disable-llvm-shared-libs to your configure + invocation and rebuild.])]) dnl We don't need to update LLVM_LIBS in this case because the LLVM dnl install uses a shared object for each compoenent and we have dnl already added all of these objects to LLVM_LIBS. fi + else + AC_MSG_WARN([Building mesa with staticly linked LLVM may cause compilation issues]) fi fi