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
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
-if test "$enable_static" = yes; then
- LIB_EXT='a'
-else
- case "$host_os" in
- darwin* )
- LIB_EXT='dylib' ;;
- cygwin* )
- LIB_EXT='dll' ;;
- aix* )
- LIB_EXT='a' ;;
- * )
- LIB_EXT='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])
[enable_omx=no])
AC_ARG_ENABLE([opencl],
[AS_HELP_STRING([--enable-opencl],
- [enable OpenCL library NOTE: Enabling this option will also enable
- --enable-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],
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"
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
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)
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],
[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
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])
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:
- --enable-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