diff options
author | marha <marha@users.sourceforge.net> | 2012-08-17 10:55:40 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-17 10:55:40 +0200 |
commit | 6d3ef5c3fe5b69e59e3511202db6a66f71c2f234 (patch) | |
tree | 3830d989b529135e92edb6004aa368f287ed20c5 /mesalib/configure.ac | |
parent | cf506c799c2281867a28ac33ac985994918bc0ba (diff) | |
parent | 5d9b8cf0e4054e774f906cde9dd6b61ceca72d44 (diff) | |
download | vcxsrv-6d3ef5c3fe5b69e59e3511202db6a66f71c2f234.tar.gz vcxsrv-6d3ef5c3fe5b69e59e3511202db6a66f71c2f234.tar.bz2 vcxsrv-6d3ef5c3fe5b69e59e3511202db6a66f71c2f234.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/configure.ac')
-rw-r--r-- | mesalib/configure.ac | 91 |
1 files changed, 17 insertions, 74 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac index 0329bad80..7dac091b0 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -146,15 +146,9 @@ dnl LIB_DIR - library basename LIB_DIR=`echo $libdir | $SED 's%.*/%%'` AC_SUBST([LIB_DIR]) -dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later +dnl Cache LDFLAGS and CPPFLAGS so we can add to them and restore later _SAVE_LDFLAGS="$LDFLAGS" -AC_ARG_VAR([EXTRA_LIB_PATH],[Extra -L paths for the linker]) -AC_SUBST([EXTRA_LIB_PATH]) - -dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later _SAVE_CPPFLAGS="$CPPFLAGS" -AC_ARG_VAR([X11_INCLUDES],[Extra -I paths for X11 headers]) -AC_SUBST([X11_INCLUDES]) dnl Compiler macros DEFINES="" @@ -878,32 +872,8 @@ if test "x$enable_dri" = xyes; then fi fi -dnl -dnl Find out if X is available. The variable have_x is set if libX11 is -dnl found to mimic AC_PATH_XTRA. -dnl -if test -n "$PKG_CONFIG"; then - AC_MSG_CHECKING([pkg-config files for X11 are available]) - PKG_CHECK_EXISTS([x11],[ - x11_pkgconfig=yes - have_x=yes - ],[ - x11_pkgconfig=no - ]) - AC_MSG_RESULT([$x11_pkgconfig]) -else - x11_pkgconfig=no -fi -dnl Use the autoconf macro if no pkg-config files -if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([X11], [x11]) -else - AC_PATH_XTRA - test -z "$X11_CFLAGS" && X11_CFLAGS="$X_CFLAGS" - test -z "$X11_LIBS" && X11_LIBS="$X_LIBS -lX11" - AC_SUBST([X11_CFLAGS]) - AC_SUBST([X11_LIBS]) -fi +dnl Find out if X is available. +PKG_CHECK_MODULES([X11], [x11]) dnl Try to tell the user that the --x-* options are only used when dnl pkg-config is not available. This must be right after AC_PATH_XTRA. @@ -947,18 +917,10 @@ dnl case "x$enable_glx$enable_xlib_glx" in xyesyes) # Xlib-based GLX - if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([XLIBGL], [x11 xext]) - GL_PC_REQ_PRIV="x11 xext" - X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS" - GL_LIB_DEPS="$XLIBGL_LIBS" - else - # should check these... - X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" - GL_LIB_DEPS="$X_LIBS -lX11 -lXext" - GL_PC_LIB_PRIV="$GL_LIB_DEPS" - GL_PC_CFLAGS="$X11_INCLUDES" - fi + PKG_CHECK_MODULES([XLIBGL], [x11 xext]) + GL_PC_REQ_PRIV="x11 xext" + X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS" + GL_LIB_DEPS="$XLIBGL_LIBS" GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $DLOPEN_LIBS" GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread" ;; @@ -975,38 +937,19 @@ xyesno) fi # find the DRI deps for libGL - if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx >= 1.8.1]) - dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx" - - # add xf86vidmode if available - PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no) - if test "$HAVE_XF86VIDMODE" = yes ; then - dri_modules="$dri_modules xxf86vm" - fi + dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1" - PKG_CHECK_MODULES([DRIGL], [$dri_modules]) - GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules" - X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS" - GL_LIB_DEPS="$DRIGL_LIBS" - else - # should check these... - X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" - if test "x$HAVE_XF86VIDMODE" == xyes; then - GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes" - else - GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXdamage -lXfixes" - fi - GL_PC_LIB_PRIV="$GL_LIB_DEPS" - GL_PC_CFLAGS="$X11_INCLUDES" - - # XCB can only be used from pkg-config - PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx >= 1.8.1]) - GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV x11-xcb xcb-glx" - X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS" - GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS" + # add xf86vidmode if available + PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no) + if test "$HAVE_XF86VIDMODE" = yes ; then + dri_modules="$dri_modules xxf86vm" fi + PKG_CHECK_MODULES([DRIGL], [$dri_modules]) + GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules" + X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS" + GL_LIB_DEPS="$DRIGL_LIBS" + # need DRM libs, -lpthread, etc. GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" |