Commit 899cebb7 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Olivier Fourdan

configure: Build hashtable for Xres and glvnd

With autoconf, hashtable support is built along with Xres support.

Yet, glvnd also use it, so when disabling Xres from configure, the
build will fail at link time because hashtable functions are not
available.

Untie the build of hashtable from Xres support, just like meson build
does.
Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Closes: xorg/xserver#1091
parent 606ba7fc
Pipeline #225662 passed with stages
in 4 minutes and 47 seconds
noinst_LTLIBRARIES = libXext.la libXvidmode.la
noinst_LTLIBRARIES = libXext.la libXvidmode.la libhashtable.la
AM_CFLAGS = $(DIX_CFLAGS)
......@@ -35,7 +35,7 @@ BUILTIN_SRCS += $(XV_SRCS)
endif
# XResource extension: lets clients get data about per-client resource usage
RES_SRCS = hashtable.c hashtable.h xres.c
RES_SRCS = xres.c
if RES
BUILTIN_SRCS += $(RES_SRCS)
endif
......@@ -95,10 +95,16 @@ endif
libXext_la_SOURCES = $(BUILTIN_SRCS)
libXext_la_LIBADD = $(BUILTIN_LIBS)
if RES
libXext_la_LIBADD += libhashtable.la
endif
# XVidMode extension
libXvidmode_la_SOURCES = vidmode.c
#Hashtable
libhashtable_la_SOURCES = hashtable.c hashtable.h
EXTRA_DIST = \
$(MITSHM_SRCS) \
$(XV_SRCS) \
......
......@@ -1056,9 +1056,11 @@ if test "x$SCREENSAVER" = xyes; then
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO"
fi
HASHTABLE=no
AM_CONDITIONAL(RES, [test "x$RES" = xyes])
if test "x$RES" = xyes; then
AC_DEFINE(RES, 1, [Support X resource extension])
HASHTABLE=yes
REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO"
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO"
fi
......@@ -1242,6 +1244,7 @@ if test "x$GLX" = xyes; then
PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL)
AC_SUBST(XLIB_CFLAGS)
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
HASHTABLE=yes
GLX_LIBS='$(top_builddir)/glx/libglx.la $(top_builddir)/glx/libglxvnd.la'
GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS"
else
......@@ -1249,6 +1252,8 @@ else
fi
AM_CONDITIONAL(GLX, test "x$GLX" = xyes)
AM_CONDITIONAL(HASHTABLE, test "x$HASHTABLE" = xyes)
AC_SUBST([GLX_DEFINES])
AC_SUBST([GLX_SYS_LIBS])
......
......@@ -81,7 +81,7 @@ libglx_la_SOURCES = \
unpack.h \
xfont.c
libglx_la_LIBADD = $(DLOPEN_LIBS)
libglx_la_LIBADD = $(DLOPEN_LIBS) $(top_builddir)/Xext/libhashtable.la
libglxvnd_la_SOURCES = \
vndcmds.c \
......@@ -90,4 +90,6 @@ libglxvnd_la_SOURCES = \
vndservervendor.h \
vndservervendor.c
libglxvnd_la_LIBADD = $(top_builddir)/Xext/libhashtable.la
EXTRA_DIST = vnd_dispatch_stubs.c
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment