Add scanpci, xorgcfg, & xorgconfig utilities.

This commit is contained in:
Alan Coopersmith 2005-09-24 02:40:51 +00:00
parent 2ba865b3f5
commit a5477ae7ac
11 changed files with 378 additions and 20 deletions

View File

@ -1,3 +1,18 @@
2005-09-23 Alan Coopersmith <alan.coopersmith@sun.com>
* configure.ac:
* cpprules.in:
* hw/xfree86/Makefile.am:
* hw/xfree86/dummylib/Makefile.am:
* hw/xfree86/os-support/.cvsignore:
* hw/xfree86/os-support/Makefile.am:
* hw/xfree86/scanpci/Makefile.am:
* hw/xfree86/utils/Makefile.am:
* hw/xfree86/utils/scanpci/Makefile.am:
* hw/xfree86/utils/xorgcfg/Makefile.am:
* hw/xfree86/utils/xorgconfig/Makefile.am:
Add scanpci, xorgcfg, & xorgconfig utilities.
2005-09-21 Kristian Høgsberg <krh@redhat.com>
* configure.ac: Accept --with-xkb-output argument to specify

View File

@ -57,6 +57,7 @@ AC_PROG_MAKE_SET
PKG_PROG_PKG_CONFIG
AC_PROG_LEX
AC_PROG_YACC
XORG_PROG_RAWCPP
AC_HEADER_DIRENT
AC_HEADER_STDC
@ -87,6 +88,8 @@ AC_CHECK_FUNC([getpeereid],
AC_DEFINE(HAS_GETPEEREID, 1, [Have the `getpeereid' function.]))
AC_CHECK_FUNC([getpeerucred],
AC_DEFINE(HAS_GETPEERUCRED, 1, [Have the `getpeerucred' function.]))
AC_CHECK_FUNC([strlcat], HAVE_STRLCAT=yes, HAVE_STRLCAT=no)
AM_CONDITIONAL(NEED_STRLCAT, [test x$HAVE_STRLCAT = xno])
AM_CONDITIONAL(NEED_VSNPRINTF, [test x$HAVE_VSNPRINTF = xno])
@ -836,7 +839,8 @@ if test "x$XORG" = xyes; then
AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
dnl these only go in xorg-config.h
CONFIGFILE="$sysconfdir/xorg.conf"
XF86CONFIGFILE="xorg.conf"
CONFIGFILE="$sysconfdir/$XF86CONFIGFILE"
LOGPREFIX="$logdir/Xorg."
AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
@ -853,7 +857,7 @@ if test "x$XORG" = xyes; then
AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module])
AC_DEFINE(DRIVERS, {}, [Built-in output drivers (none)])
AC_DEFINE(IDRIVERS, {}, [Built-in input drivers (none)])
AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Location of configuration file])
AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file])
AC_DEFINE_DIR(XF86CONFIGFILE, CONFIGFILE, [Path to Xorg configuration file])
AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path])
AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location])
@ -997,6 +1001,25 @@ esac
AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
dnl xorgconfig CLI configuration utility
PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile])
dnl xorgcfg GUI configuration utility
AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([ --enable-xorgcfg ],
[Build xorgcfg GUI configuration utility (default: yes)]),
[XORGCFG=$enableval],[XORGCFG=yes])
if test x$XORGCFG = xyes ; then
PKG_CHECK_MODULES([XORGCFG_DEP],
[xkbui xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm x11])
AC_CHECK_LIB([curses],[waddstr],
[XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lcurses"; CURSES=yes],
AC_CHECK_LIB([ncurses],[waddstr],
[XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lncurses" ; CURSES=yes],
[CURSES=no]))
fi
AM_CONDITIONAL(BUILD_XORGCFG, [test x$XORGCFG = xyes])
AM_CONDITIONAL(USE_CURSES, [test x$CURSES = xyes])
CFLAGS="$XSERVER_CFLAGS $CFLAGS"
AC_SUBST([CFLAGS])
@ -1008,6 +1031,9 @@ AC_SUBST([DIX_CFLAGS])
AC_SUBST([libdir exec_prefix prefix])
# Man page sections - used in config utils & generating man pages
XORG_MANPAGE_SECTIONS
# XORG in this case refers to the roll-up releases, not the Xorg DDX.
XORG_RELEASE_VERSION
@ -1091,6 +1117,10 @@ hw/xfree86/xf4bpp/Makefile
hw/xfree86/xf8_16bpp/Makefile
hw/xfree86/xf8_32bpp/Makefile
hw/xfree86/xf8_32wid/Makefile
hw/xfree86/utils/Makefile
hw/xfree86/utils/scanpci/Makefile
hw/xfree86/utils/xorgcfg/Makefile
hw/xfree86/utils/xorgconfig/Makefile
hw/dmx/config/Makefile
hw/dmx/input/Makefile
hw/dmx/glxProxy/Makefile

24
cpprules.in Normal file
View File

@ -0,0 +1,24 @@
# -*- Makefile -*-
# Rules for generating files using the C pre-processor
# (Replaces CppFileTarget from Imake)
SED = sed
SUFFIXES = .pre
# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
# to cpp, because that trick does not work on all ANSI C preprocessors.
# Delete line numbers from the cpp output (-P is not portable, I guess).
# Allow XCOMM to be preceded by whitespace and provide a means of generating
# output lines with trailing backslashes.
# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
-e '/^\#line *[0-9][0-9]* *.*$$/d' \
-e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
-e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
-e '/^[ ]*XHASH/s/XHASH/\#/' \
-e '/\@\@$$/s/\@\@$$/\\/'
.pre:
$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@

View File

@ -4,11 +4,12 @@ endif
SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \
ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp xf8_16bpp \
xf8_32bpp xf8_32wid loader scanpci dixmods exa $(DRI_SUBDIR)
xf8_32bpp xf8_32wid loader scanpci dixmods exa $(DRI_SUBDIR) utils
DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \
xf8_16bpp xf8_32bpp xf8_32wid loader scanpci dixmods dri exa
xf8_16bpp xf8_32bpp xf8_32wid loader scanpci dixmods dri exa \
utils
bin_PROGRAMS = Xorg
@ -22,19 +23,7 @@ DISTCLEANFILES = xorg.c
xorg.c:
touch $@
xorgos.c:
touch $@
# to get the grouping semantics right, you have to glom these three together
# as one library, otherwise libtool will actively defeat your attempts to
# list them multiple times on the link line.
noinst_LTLIBRARIES = libxorgos.la
libxorgos_la_SOURCES = xorgos.c
libxorgos_la_LIBADD = os-support/@XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.la \
os-support/bus/libbus.la \
os-support/misc/libmisc.la
OS_LIBS = libxorgos.la
OS_LIBS = os-support/libxorgos.la
XORG_LIBS = \
@XORG_CORE_LIBS@ \

View File

@ -1,15 +1,51 @@
noinst_LIBRARIES = libdummy.a
# libdummy.a contains just those bits used in the server itself
# libdummy-nonserver.a contains additional routines normally found in the
# server for use in building the utilities like scanpci & the config tools
noinst_LIBRARIES = libdummy.a libdummy-nonserver.a
INCLUDES = $(XORG_INCS)
AM_CFLAGS = $(XORG_CFLAGS)
if NEED_STRLCAT
STRL_SRCS = strlcat.c strlcpy.c
endif
libdummy_a_SOURCES = getvalidbios.c \
pcitestmulti.c xf86allocscripi.c \
xf86addrestolist.c xf86drvmsg.c xf86drvmsgverb.c \
xf86getverb.c \
xf86opt.c xf86screens.c xf86servisinit.c xf86verbose.c \
strlcat.c strlcpy.c
$(STRL_SRCS)
#xf86errorf.c xf86errorfverb.c xf86msg.c xf86msgverb.c \
#logvwrite.c verrorf.c xf86info.c xalloc.c fatalerror.c \
#$(srcdir)/../os-support/shared/sigiostubs.c
libdummy_nonserver_a_SOURCES = \
$(STRL_SRCS) \
fatalerror.c \
getvalidbios.c \
logvwrite.c \
pcitestmulti.c \
verrorf.c \
xalloc.c \
xf86allocscripi.c \
xf86addrestolist.c \
xf86drvmsg.c \
xf86drvmsgverb.c \
xf86errorf.c \
xf86errorfverb.c \
xf86getpagesize.c \
xf86getverb.c \
xf86info.c \
xf86msg.c \
xf86msgverb.c \
xf86opt.c \
xf86screens.c \
xf86servisinit.c \
xf86verbose.c \
$(srcdir)/../os-support/shared/sigiostubs.c

View File

@ -9,3 +9,17 @@ sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h xf86_ansic.h xf86_libc.h xf86drm.h \
xf86drmCompat.h assyntax.h xf86OSKbd.h xf86OSmouse.h
EXTRA_DIST = int10Defines.h xf86OSpriv.h
# to get the grouping semantics right, you have to glom these three together
# as one library, otherwise libtool will actively defeat your attempts to
# list them multiple times on the link line.
noinst_LTLIBRARIES = libxorgos.la
libxorgos_la_SOURCES = xorgos.c
libxorgos_la_LIBADD = @XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.la \
bus/libbus.la \
misc/libmisc.la
xorgos.c:
touch $@
DISTCLEANFILES = xorgos.c

View File

@ -26,6 +26,6 @@ xf86PciData.c:
echo "#include \"$(srcdir)/xf86ScanPci.c\"" >> $@
xf86PciIds.h: $(srcdir)/../common/xf86PciInfo.h
$(PERL) $(srcdir)/pciid2c.pl $(srcdir)/../common/xf86PciInfo.h < $(srcdir)/pci.ids > xf86PciIds.h
$(PERL) $(srcdir)/pciid2c.pl $(srcdir)/../common/xf86PciInfo.h < $(srcdir)/pci.ids $(srcdir)/extrapci.ids > xf86PciIds.h
DISTCLEANFILES = xf86PciData.c xf86PciIds.h

View File

@ -0,0 +1,4 @@
SUBDIRS = \
scanpci \
xorgcfg \
xorgconfig

View File

@ -0,0 +1,48 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, provided that the above
# copyright notice(s) and this permission notice appear in all copies of
# the Software and that both the above copyright notice(s) and this
# permission notice appear in supporting documentation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Except as contained in this notice, the name of a copyright holder
# shall not be used in advertising or otherwise to promote the sale, use
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
bin_PROGRAMS = scanpci
XFREE86_SRCDIR = $(top_srcdir)/hw/xfree86
SCANPCI_SRCDIR = $(XFREE86_SRCDIR)/scanpci
DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib
INCLUDES = $(XORG_INCS) -I$(SCANPCI_SRCDIR) -I$(DUMMYLIB_SRCDIR)
scanpci_CFLAGS = $(XORG_CFLAGS)
scanpci_LDADD = \
../../scanpci/libscanpci.la \
../../os-support/libxorgos.la \
../../dummylib/libdummy-nonserver.a
scanpci_SOURCES = \
scanpci.c
dist_man1_MANS = \
scanpci.man

View File

@ -0,0 +1,128 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, provided that the above
# copyright notice(s) and this permission notice appear in all copies of
# the Software and that both the above copyright notice(s) and this
# permission notice appear in supporting documentation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Except as contained in this notice, the name of a copyright holder
# shall not be used in advertising or otherwise to promote the sale, use
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
if BUILD_XORGCFG
bin_PROGRAMS = xorgcfg
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/hw/xfree86/parser
xorgcfg_CFLAGS = $(XORG_CFLAGS) $(CURSESDEFINES)
xorgcfg_LDADD = $(XORGCFG_DEP_LIBS) ../../parser/libparser.a $(LOADERLIB) \
../../os-support/libxorgos.la ../../dummylib/libdummy-nonserver.a
#if DoLoadableServer
LDSRCS = \
$(top_srcdir)/hw/xfree86/os-support/shared/libc_wrapper.c \
loader.c loadmod.c
LOADERLIB = ../../loader/libloader.a
#endif
if USE_CURSES
TEXTSRC = text-mode.c
TEXTOBJ = text-mode.o
CURSESDEFINES = -DHAS_NCURSES
endif
xorgcfg_SOURCES = \
accessx.c\
card-cfg.c\
cards.c\
config.c\
expert.c\
help.c\
interface.c\
keyboard-cfg.c\
$(LDSRCS) \
monitor-cfg.c\
mouse-cfg.c\
options.c\
screen-cfg.c\
screen.c\
$(SNPRINTFSRCS)\
startx.c\
$(STRLSRCS)\
stubs.c\
$(TEXTSRC)\
vidmode.c\
xf86config.c
XBMdir = $(includedir)/X11/bitmaps
XPMdir = $(includedir)/X11/pixmaps
XBM_DATA = \
card.xbm \
keyboard.xbm \
monitor.xbm \
mouse.xbm \
left.xbm \
right.xbm \
up.xbm \
down.xbm \
wider.xbm \
narrower.xbm \
shorter.xbm \
taller.xbm
XPM_DATA = \
card.xpm \
computer.xpm \
keyboard.xpm \
monitor.xpm \
mouse.xpm
include $(top_srcdir)/cpprules.in
# App default files (*.ad)
appdefaultdir = $(sysconfdir)/X11/app-defaults
APPDEFAULTFILES = XOrgCfg
appdefault_DATA = $(APPDEFAULTFILES)
# Man page
SUFFIXES += .$(APP_MAN_SUFFIX) .man
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MANDEFS = -D__appmansuffix__=$(APP_MAN_SUFFIX) \
-D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
-D__xservername__=Xorg -D__xconfigfile__=xorg.conf \
-D__projectroot__=$(prefix)
CPP_MAN_FLAGS = $(MANDEFS) $(EXTRAMANDEFS)
.man.$(APP_MAN_SUFFIX):
$(RAWCPP) $(RAWCPPFLAGS) $(CPP_MAN_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
dist_man1_MANS = \
xorgcfg.man
endif

View File

@ -0,0 +1,70 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, provided that the above
# copyright notice(s) and this permission notice appear in all copies of
# the Software and that both the above copyright notice(s) and this
# permission notice appear in supporting documentation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Except as contained in this notice, the name of a copyright holder
# shall not be used in advertising or otherwise to promote the sale, use
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
bin_PROGRAMS = xorgconfig
X11dir = $(libdir)/X11
X11_DATA = Cards
xorgconfig_CFLAGS = $(DEP_CFLAGS) \
-DCARD_DATABASE_FILE='"$(X11dir)/Cards"' \
-DPROJECTROOT='"$(prefix)"' \
-DFILEMANSUFFIX='"$(FILE_MAN_SUFFIX)"' \
-DXVERSIONSTRING='"$(PACKAGE_STRING)"'
xorgconfig_LDADD = $(XORGCONFIG_DEP_LIBS)
xorgconfig_SOURCES = \
cards.c \
cards.h \
xorgconfig.c
# Man page
include $(top_srcdir)/cpprules.in
SUFFIXES += .$(APP_MAN_SUFFIX) .man
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MANDEFS = -D__appmansuffix__=$(APP_MAN_SUFFIX) \
-D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
-D__xservername__=Xorg -D__xconfigfile__=xorg.conf \
-D__projectroot__=$(prefix)
CPP_MAN_FLAGS = $(MANDEFS) $(EXTRAMANDEFS)
.man.$(APP_MAN_SUFFIX):
$(RAWCPP) $(RAWCPPFLAGS) $(CPP_MAN_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
dist_man1_MANS = \
xorgconfig.man
EXTRA_DIST = \
Cards98 \
xf86config.cmd