Commit 462a2407 authored by Kevin E Martin's avatar Kevin E Martin

Add xorg-server.m4 for driver dependency checking.

Update pkgcheck depedencies to work with separate build roots.
parent 56101c9d
2005-11-01 Kevin E. Martin <kem-at-freedesktop-dot-org>
* Makefile.am:
Add xorg-server.m4 for driver dependency checking.
* configure.ac:
* hw/dmx/config/Makefile.am:
* hw/dmx/examples/Makefile.am:
* hw/xfree86/dri/Makefile.am:
* hw/xfree86/utils/xorgcfg/Makefile.am:
Update pkgcheck depedencies to work with separate build roots.
2005-10-28 Alan Coopersmith <alan.coopersmith@sun.com> 2005-10-28 Alan Coopersmith <alan.coopersmith@sun.com>
* hw/xfree86/Makefile.am: * hw/xfree86/Makefile.am:
......
...@@ -67,9 +67,13 @@ SUBDIRS = \ ...@@ -67,9 +67,13 @@ SUBDIRS = \
$(XPDDX_DIR) \ $(XPDDX_DIR) \
$(XPCONFIG_DIR) $(XPCONFIG_DIR)
aclocaldir = $(datadir)/aclocal
aclocal_DATA = xorg-server.m4
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-server.pc pkgconfig_DATA = xorg-server.pc
EXTRA_DIST = xorg-server.pc.in
EXTRA_DIST = xorg-server.pc.in xorg-server.m4
DIST_SUBDIRS = \ DIST_SUBDIRS = \
doc \ doc \
......
...@@ -434,7 +434,7 @@ XEXT_INC='-I$(top_srcdir)/Xext' ...@@ -434,7 +434,7 @@ XEXT_INC='-I$(top_srcdir)/Xext'
XEXT_LIB='$(top_builddir)/Xext/libXext.la' XEXT_LIB='$(top_builddir)/Xext/libXext.la'
dnl Core modules for most extensions, et al. dnl Core modules for most extensions, et al.
REQUIRED_MODULES="randrproto renderproto fixesproto damageproto xcmiscproto xextproto xfont xproto xtrans xau xf86miscproto xf86vidmodeproto xf86bigfontproto scrnsaverproto bigreqsproto resourceproto fontenc fontsproto" REQUIRED_MODULES="randrproto renderproto fixesproto damageproto xcmiscproto xextproto xfont xproto xtrans xau xf86miscproto xf86vidmodeproto xf86bigfontproto scrnsaverproto bigreqsproto resourceproto fontenc fontsproto inputproto xf86dgaproto"
AM_CONDITIONAL(XV, [test "x$XV" = xyes]) AM_CONDITIONAL(XV, [test "x$XV" = xyes])
if test "x$XV" = xyes; then if test "x$XV" = xyes; then
...@@ -445,7 +445,6 @@ fi ...@@ -445,7 +445,6 @@ fi
AM_CONDITIONAL(DGA, [test "x$DGA" = xyes]) AM_CONDITIONAL(DGA, [test "x$DGA" = xyes])
if test "x$DGA" = xyes; then if test "x$DGA" = xyes; then
AC_DEFINE(DGA, 1, [Support DGA extension]) AC_DEFINE(DGA, 1, [Support DGA extension])
REQUIRED_MODULES="$REQUIRED_MODULES xf86dgaproto"
fi fi
AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes])
...@@ -511,11 +510,10 @@ if test "x$DRI" = xyes; then ...@@ -511,11 +510,10 @@ if test "x$DRI" = xyes; then
AC_DEFINE(XF86DRI, 1, [Build DRI extension]) AC_DEFINE(XF86DRI, 1, [Build DRI extension])
PKG_CHECK_MODULES([DRIPROTO], [xf86driproto]) PKG_CHECK_MODULES([DRIPROTO], [xf86driproto])
PKG_CHECK_MODULES([LIBDRM], [libdrm]) PKG_CHECK_MODULES([LIBDRM], [libdrm])
if test "x$GLX" = xyes; then PKG_CHECK_MODULES([GL], [glproto >= 1.4.1])
PKG_CHECK_MODULES([GL], [glproto >= 1.4.1])
fi
AC_SUBST(DRIPROTO_CFLAGS) AC_SUBST(DRIPROTO_CFLAGS)
AC_SUBST(LIBDRM_CFLAGS) AC_SUBST(LIBDRM_CFLAGS)
AC_SUBST(GL_CFLAGS)
fi fi
AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
...@@ -577,6 +575,15 @@ if test "x$XF86MISC" = xyes; then ...@@ -577,6 +575,15 @@ if test "x$XF86MISC" = xyes; then
AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions]) AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions])
fi fi
if test "x$XPRINT" = xauto; then
PKG_CHECK_MODULES([XPRINT], [printproto], [XPRINT=yes], [XPRINT=no])
fi
AM_CONDITIONAL(XPRINT, [test "x$XPRINT" = xyes])
if test "x$XPRINT" = xyes; then
AC_DEFINE(XPRINT, 1, [Build Print extension])
REQUIRED_MODULES="$REQUIRED_MODULES printproto"
fi
AC_DEFINE(RENDER, 1, [Support RENDER extension]) AC_DEFINE(RENDER, 1, [Support RENDER extension])
RENDER_LIB='$(top_builddir)/render/librender.la' RENDER_LIB='$(top_builddir)/render/librender.la'
RENDER_INC='-I$(top_srcdir)/render' RENDER_INC='-I$(top_srcdir)/render'
...@@ -746,6 +753,7 @@ dnl Linux sources in DMX require <linux/keyboard.h> ...@@ -746,6 +753,7 @@ dnl Linux sources in DMX require <linux/keyboard.h>
PKG_CHECK_MODULES([GL], [glproto]) PKG_CHECK_MODULES([GL], [glproto])
fi fi
PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11]) PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11])
AC_SUBST(XDMXCONFIG_DEP_CFLAGS)
AC_SUBST(XDMXCONFIG_DEP_LIBS) AC_SUBST(XDMXCONFIG_DEP_LIBS)
PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx xext x11]) PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx xext x11])
AC_SUBST(DMXEXAMPLES_DEP_LIBS) AC_SUBST(DMXEXAMPLES_DEP_LIBS)
...@@ -989,12 +997,8 @@ AM_CONDITIONAL(AFB, [test "x$XORG" = xyes]) ...@@ -989,12 +997,8 @@ AM_CONDITIONAL(AFB, [test "x$XORG" = xyes])
dnl Xprint DDX dnl Xprint DDX
if test "x$XPRINT" = xauto; then
PKG_CHECK_MODULES([XPRINT], [printproto x11], [XPRINT=yes], [XPRINT=no])
fi
AC_MSG_CHECKING([whether to build Xprint DDX]) AC_MSG_CHECKING([whether to build Xprint DDX])
AC_MSG_RESULT([$XPRINT]) AC_MSG_RESULT([$XPRINT])
AM_CONDITIONAL(XPRINT, [test x$XPRINT = xyes])
if test "x$XPRINT" = xyes; then if test "x$XPRINT" = xyes; then
PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau]) PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau])
...@@ -1135,6 +1139,8 @@ if test x$XORGCFG = xyes ; then ...@@ -1135,6 +1139,8 @@ if test x$XORGCFG = xyes ; then
AC_CHECK_LIB([ncurses],[waddstr], AC_CHECK_LIB([ncurses],[waddstr],
[XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lncurses" ; CURSES=yes], [XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lncurses" ; CURSES=yes],
[CURSES=no])) [CURSES=no]))
AC_SUBST(XORGCFG_DEP_CFLAGS)
AC_SUBST(XORGCFG_DEP_LIBS)
fi fi
AM_CONDITIONAL(BUILD_XORGCFG, [test x$XORGCFG = xyes]) AM_CONDITIONAL(BUILD_XORGCFG, [test x$XORGCFG = xyes])
AM_CONDITIONAL(USE_CURSES, [test x$CURSES = xyes]) AM_CONDITIONAL(USE_CURSES, [test x$CURSES = xyes])
......
...@@ -37,6 +37,7 @@ xdmxconfig_SOURCES = \ ...@@ -37,6 +37,7 @@ xdmxconfig_SOURCES = \
Canvas.h \ Canvas.h \
CanvasP.h CanvasP.h
xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@ xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@
xdmxconfig_CFLAGS = $(AM_CFLAGS) @XDMXCONFIG_DEP_CFLAGS@
vdltodmx_DEPENDENCIES = libdmxconfig.a vdltodmx_DEPENDENCIES = libdmxconfig.a
vdltodmx_SOURCES = vdltodmx.c vdltodmx_SOURCES = vdltodmx.c
......
...@@ -11,45 +11,60 @@ noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG) ...@@ -11,45 +11,60 @@ noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG)
xdmx_SOURCES = xdmx.c xdmx_SOURCES = xdmx.c
xdmx_LDADD = @DMXEXAMPLES_DEP_LIBS@ xdmx_LDADD = @DMXEXAMPLES_DEP_LIBS@
xdmx_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
dmxwininfo_SOURCES = dmxwininfo.c dmxwininfo_SOURCES = dmxwininfo.c
dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@ dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@
dmxwininfo_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
dmxreconfig_SOURCES = dmxreconfig.c dmxreconfig_SOURCES = dmxreconfig.c
dmxreconfig_LDADD = @DMXEXAMPLES_DEP_LIBS@ dmxreconfig_LDADD = @DMXEXAMPLES_DEP_LIBS@
dmxreconfig_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
dmxresize_SOURCES = dmxresize.c dmxresize_SOURCES = dmxresize.c
dmxresize_LDADD = @DMXEXAMPLES_DEP_LIBS@ dmxresize_LDADD = @DMXEXAMPLES_DEP_LIBS@
dmxresize_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
dmxaddscreen_SOURCES = dmxaddscreen.c dmxaddscreen_SOURCES = dmxaddscreen.c
dmxaddscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@ dmxaddscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@
dmxaddscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
dmxrmscreen_SOURCES = dmxrmscreen.c dmxrmscreen_SOURCES = dmxrmscreen.c
dmxrmscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@ dmxrmscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@
dmxrmscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
dmxaddinput_SOURCES = dmxaddinput.c dmxaddinput_SOURCES = dmxaddinput.c
dmxaddinput_LDADD = @DMXEXAMPLES_DEP_LIBS@ dmxaddinput_LDADD = @DMXEXAMPLES_DEP_LIBS@
dmxaddinput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
dmxrminput_SOURCES = dmxrminput.c dmxrminput_SOURCES = dmxrminput.c
dmxrminput_LDADD = @DMXEXAMPLES_DEP_LIBS@ dmxrminput_LDADD = @DMXEXAMPLES_DEP_LIBS@
dmxrminput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
xinput_SOURCES = xinput.c xinput_SOURCES = xinput.c
xinput_LDADD = @DMXXIEXAMPLES_DEP_LIBS@ xinput_LDADD = @DMXXIEXAMPLES_DEP_LIBS@
xinput_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
xtest_SOURCES = xtest.c xtest_SOURCES = xtest.c
xtest_LDADD = @XTSTEXAMPLES_DEP_LIBS@ xtest_LDADD = @XTSTEXAMPLES_DEP_LIBS@
xtest_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
evi_SOURCES = evi.c evi_SOURCES = evi.c
evi_LDADD = @X11EXAMPLES_DEP_LIBS@ evi_LDADD = @X11EXAMPLES_DEP_LIBS@
evi_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
res_SOURCES = res.c res_SOURCES = res.c
res_LDADD = @XRESEXAMPLES_DEP_LIBS@ res_LDADD = @XRESEXAMPLES_DEP_LIBS@
res_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
xled_SOURCES = xled.c xled_SOURCES = xled.c
xled_LDADD = @X11EXAMPLES_DEP_LIBS@ xled_LDADD = @X11EXAMPLES_DEP_LIBS@
xled_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
xbell_SOURCES = xbell.c xbell_SOURCES = xbell.c
xbell_LDADD = @X11EXAMPLES_DEP_LIBS@ xbell_LDADD = @X11EXAMPLES_DEP_LIBS@
xbell_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
ev_SOURCES = ev.c ev_SOURCES = ev.c
ev_LDADD = ev_LDADD =
ev_CFLAGS =
...@@ -9,7 +9,8 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ ...@@ -9,7 +9,8 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
-DHAVE_XORG_CONFIG_H \ -DHAVE_XORG_CONFIG_H \
-DXFree86Module -DIN_MODULE \ -DXFree86Module -DIN_MODULE \
@DRIPROTO_CFLAGS@ \ @DRIPROTO_CFLAGS@ \
@LIBDRM_CFLAGS@ @LIBDRM_CFLAGS@ \
@GL_CFLAGS@
libdri_la_LDFLAGS = -module -avoid-version libdri_la_LDFLAGS = -module -avoid-version
libdri_ladir = $(moduledir)/extensions libdri_ladir = $(moduledir)/extensions
libdri_la_SOURCES = \ libdri_la_SOURCES = \
......
...@@ -31,7 +31,7 @@ bin_PROGRAMS = xorgcfg ...@@ -31,7 +31,7 @@ bin_PROGRAMS = xorgcfg
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/hw/xfree86/parser INCLUDES = $(XORG_INCS) -I$(top_srcdir)/hw/xfree86/parser
xorgcfg_CFLAGS = $(XORG_CFLAGS) $(CURSESDEFINES) xorgcfg_CFLAGS = $(XORG_CFLAGS) $(CURSESDEFINES) $(XORGCFG_DEP_CFLAGS)
xorgcfg_LDADD = $(XORGCFG_DEP_LIBS) ../../parser/libparser.a $(LOADERLIB) \ xorgcfg_LDADD = $(XORGCFG_DEP_LIBS) ../../parser/libparser.a $(LOADERLIB) \
../../os-support/libxorgos.la ../../dummylib/libdummy-nonserver.a ../../os-support/libxorgos.la ../../dummylib/libdummy-nonserver.a
......
dnl Copyright 2005 Red Hat, Inc
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
dnl copyright notice and this permission notice appear in supporting
dnl documentation.
dnl
dnl The above copyright notice and this permission notice shall be included
dnl in all copies or substantial portions of the Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
dnl OTHER DEALINGS IN THE SOFTWARE.
dnl
dnl Except as contained in this notice, the name of the copyright holders shall
dnl not be used in advertising or otherwise to promote the sale, use or
dnl other dealings in this Software without prior written authorization
dnl from the copyright holders.
dnl
# XORG_DRIVER_CHECK_EXT()
# --------------------------
# Checks for the $1 define in xorg-server.h (from the sdk). If it
# is defined, then add $1 to $REQUIRED_MODULES.
AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "xorg-server.h"
#if !defined $1
#error $1 not defined
#endif
]])],
[_EXT_CHECK=yes],
[_EXT_CHECK=no])
CFLAGS="$SAVE_CFLAGS"
AC_MSG_CHECKING([if $1 is defined])
AC_MSG_RESULT([$_EXT_CHECK])
if test "$_EXT_CHECK" != no; then
REQUIRED_MODULES="$REQUIRED_MODULES $2"
fi
])
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