Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 00/17] autotools configuration cleanups
Series of cleanups to autotools build config files to utilize the available xorg-server macros, defaults and more closely match other modern Xorg drivers. Notable improvements: - gitignore fully covers potential build artifacts - Simplify logic given stated minimum required version of xorg-server 1.8 - Remove use of deprecated, outdated or no longer required macros - Utilize xorg macros where possible, instead of rolling own approaches - Provide clearer documentation of autotools build steps - Address warnings from libtoolize - Set automake configuration options consistently in one location - Provide complete URL to bug reports for Xorg DDX nouveau driver - Fix typos Commits referenced from xf86-video-intel, xf86-video-amdgpu and xf86-video-ati Rhys Kidd (17): config: Fix typo in comment config,nv: Use xorg-macros PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} config: Only check for presence of libdrm package once config: Rely upon list.h as at least xorg-server 1.8 required config: remove AC_PROG_CC as it overrides AC_PROG_C_C99 gitignore: Update to mirror modern X.org drivers config: libtoolize: put macros in AC_CONFIG_MACRO_DIR, 'm4' config: Use XORG_DEFAULT_OPTIONS which replaces six XORG_* macros config: remove unrequired AC_HEADER_STDC config: Utilize util-macros 1.8 for additional man page support config: Use LT_INIT option instead of AC_DISABLE_STATIC config: Add comments for main statements config: Remove unrequired AC_SUBST for LIBDRM_NOUVEAU and LIBUDEV config: remove unused sdkdir=$(pkg-config...) statement config: Set automake options consistently in one location config: Complete bug report URL for Xorg DDX nouveau driver config: Suggest upstream to find macros in case they are missing .gitignore | 71 +++++++++++++++++++++++++++++++++++++++++-------- Makefile.am | 3 ++- configure.ac | 70 +++++++++++++++++------------------------------- m4/.gitignore | 5 ++++ man/Makefile.am | 20 ++------------ src/nv_driver.c | 2 +- 6 files changed, 94 insertions(+), 77 deletions(-) create mode 100644 m4/.gitignore -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 01/17] config: Fix typo in comment
Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 56a971f..2fb8fcd 100644 --- a/configure.ac +++ b/configure.ac @@ -109,7 +109,7 @@ AC_HEADER_STDC # Use -Wall all the time CFLAGS="$CFLAGS -Wall" -# Check for -minline-all-stringops availabtility +# Check for -minline-all-stringops availability OLD_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -minline-all-stringops" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ ]])], -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 02/17] config, nv: Use xorg-macros PACKAGE_VERSION_{MAJOR, MINOR, PATCHLEVEL}
Use xorg-macros provided PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} rather than rolling our own in xf86-video-nouveau. Macro has been available since xorg-macros 1.1.5 (we rely on >= 1.8) provided that XORG_DEFAULT_OPTIONS is called. Fixes: b82aacd ("configure: require xorg-macros 1.8") Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 9 --------- src/nv_driver.c | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 2fb8fcd..c9b8a66 100644 --- a/configure.ac +++ b/configure.ac @@ -26,15 +26,6 @@ AC_INIT([xf86-video-nouveau], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) -AC_DEFINE_UNQUOTED([NV_MAJOR_VERSION], - [$(echo $PACKAGE_VERSION | sed -e 's/^\([[0-9]]*\)\.[[0-9]]*\.[[0-9]]*/\1/')], - [Major version]) -AC_DEFINE_UNQUOTED([NV_MINOR_VERSION], - [$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]*\.\([[0-9]]*\)\.[[0-9]]*/\1/')], - [Minor version]) -AC_DEFINE_UNQUOTED([NV_PATCHLEVEL], - [$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)/\1/')], - [Patch version]) AC_DEFINE_UNQUOTED([NV_DRIVER_DATE], [$(echo -n \";git log |head -3|tail -1|tr -d '\n';echo -n \")], [Driver date]) diff --git a/src/nv_driver.c b/src/nv_driver.c index a5d50c1..1d276cf 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -154,7 +154,7 @@ static XF86ModuleVersionInfo nouveauVersRec MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, - NV_MAJOR_VERSION, NV_MINOR_VERSION, NV_PATCHLEVEL, + PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 03/17] config: Only check for presence of libdrm package once
After a version-conditioned check for libdrm was added, no longer necessary to check a second time, especially without a version number check. Fixes: 779b8d4 ("Link against libdrm") Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c9b8a66..c80f92d 100644 --- a/configure.ac +++ b/configure.ac @@ -76,7 +76,7 @@ PKG_CHECK_MODULES(LIBDRM_NOUVEAU, [libdrm_nouveau >= 2.4.25]) AC_SUBST(LIBDRM_NOUVEAU_CFLAGS) AC_SUBST(LIBDRM_NOUVEAU_LIBS) -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.8] xproto fontsproto libdrm $REQUIRED_MODULES) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.8] xproto fontsproto $REQUIRED_MODULES) PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 04/17] config: Rely upon list.h as at least xorg-server 1.8 required
Fixes: edd1608 ("xorg_list: define the xorg_list* symbols") Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index c80f92d..b2913e8 100644 --- a/configure.ac +++ b/configure.ac @@ -124,18 +124,11 @@ AC_CHECK_DECL(xf86CursorResetCursor, [#include <xorg-server.h> #include <xf86Cursor.h>]) -AC_CHECK_HEADERS([list.h], - [have_list_h="yes"], [have_list_h="no"], - [#include <X11/Xdefs.h> - #include "xorg-server.h"]) - -if test "x$have_list_h" = xyes; then - AC_CHECK_DECL(xorg_list_init, - [AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [], - [#include <X11/Xdefs.h> - #include "xorg-server.h" - #include "list.h"]) -fi +AC_CHECK_DECL(xorg_list_init, + [AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [], + [#include <X11/Xdefs.h> + #include "xorg-server.h" + #include "list.h"]) AC_CONFIG_FILES([ Makefile -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 05/17] config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls AC_PROG_C_C99. This sets gcc with -std=gnu99. If AC_PROG_CC macro is called afterwards, it resets CC to gcc. Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index b2913e8..3b09c01 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,6 @@ m4_ifndef([XORG_DRIVER_CHECK_EXT], # Checks for programs. AC_DISABLE_STATIC LT_INIT -AC_PROG_CC AH_TOP([#include "xorg-server.h"]) -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 06/17] gitignore: Update to mirror modern X.org drivers
Avoids git showing autoconf/automake generated files (e.g. tarballs) that are local build artifacts and should not be committed. Cherry picked from xf86-video-intel as at: https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/blob/7c9dbc980b760e0053d83ca2d7cb147613285680/.gitignore Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- .gitignore | 76 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 65 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 2694d9d..10aeed9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,78 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo +# +# X.Org module default exclusion patterns +# The next section is for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) aclocal.m4 -autom4te.cache +autom4te.cache/ +autoscan.log +ChangeLog +compile config.guess config.h config.h.in config.log +config-ml.in +config.py config.status +config.status.lineno config.sub configure +configure.scan depcomp +.deps/ +INSTALL install-sh +.libs/ libtool +libtool.m4 ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh missing -stamp-h1 -ChangeLog -INSTALL -compile +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for xf86-video-nouveau +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 07/17] config: libtoolize: put macros in AC_CONFIG_MACRO_DIR, 'm4'
As suggested by one tool called by autoreconf. Necessitates change to: - configure.ac: Call AC_CONFIG_MACRO_DIR() - Makefile.am: Set ACLOCAL_AMFLAGS = -I m4 - Create placeholder m4 folders - Update gitignore files>From the autoconf documentation:"Starting from version 2.58, autoconf provide the macro AC_CONFIG_MACRO_DIR to declare where additional macro files are to be put and found. The argument passed to this macro is commonly m4." https://autotools.io/autoconf/macros.html Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- .gitignore | 5 ----- Makefile.am | 3 +++ configure.ac | 1 + m4/.gitignore | 5 +++++ 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 m4/.gitignore diff --git a/.gitignore b/.gitignore index 10aeed9..f7953e3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,12 +26,7 @@ INSTALL install-sh .libs/ libtool -libtool.m4 ltmain.sh -lt~obsolete.m4 -ltoptions.m4 -ltsugar.m4 -ltversion.m4 Makefile Makefile.in mdate-sh diff --git a/Makefile.am b/Makefile.am index 032be8a..05e9ec6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,6 +19,9 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AUTOMAKE_OPTIONS = foreign + +ACLOCAL_AMFLAGS = -I m4 + SUBDIRS = src man MAINTAINERCLEANFILES = ChangeLog INSTALL diff --git a/configure.ac b/configure.ac index 3b09c01..0323adf 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ AC_DEFINE_UNQUOTED([NV_DRIVER_DATE], AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([dist-bzip2]) diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..464ba5c --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1,5 @@ +libtool.m4 +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 08/17] config: Use XORG_DEFAULT_OPTIONS which replaces six XORG_* macros
This macro expands into several macros and provide several build functions [0]. Refer to the module generated aclocal.m4 file as this is subject to change. At present, this includes: - XORG_CWARNFLAGS: platform adjusted compiler warning flags - XORG_STRICT_OPTION: additional warning flags - XORG_RELEASE_VERSION: defines variables for major, minor and patch level - XORG_CHANGELOG: contains a makefile rule which creates the ChangeLog file from Git - XORG_INSTALL: contains a makefile rule which provides the INSTALL file in the module root directory - XORG_MANPAGE_SECTIONS: platform adjusted man page section number The above macros invoke the following Autoconf macros: - AC_PROG_INSTALL - AC_PROG_CC_C99 - AC_PROG_SED - AC_CANONICAL_HOST [0] https://www.x.org/wiki/NewModuleGuidelines/ Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure.ac b/configure.ac index 0323adf..f9e0e54 100644 --- a/configure.ac +++ b/configure.ac @@ -115,9 +115,6 @@ AC_SUBST([moduledir]) DRIVER_NAME=nouveau AC_SUBST([DRIVER_NAME]) -XORG_MANPAGE_SECTIONS -XORG_RELEASE_VERSION - AC_CHECK_DECL(xf86CursorResetCursor, [AC_DEFINE(HAVE_XF86_CURSOR_RESET_CURSOR, 1, [Have xf86CursorResetCursor API])], [], -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 09/17] config: remove unrequired AC_HEADER_STDC
Autoconf says: "This macro is obsolescent, as current systems have conforming header files. New programs need not use this macro". Was previously required to ensure the system has C header files conforming to ANSI C89 (ISO C90). Specifically, this macro checks for stdlib.h, stdarg.h, string.h, and float.h. This autoconf option was used to provide conditional fallback support via defined STDC_HEADERS. xf86-video-nouveau does not do so, so this macro is obsolete and unused, so let's drop it. Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure.ac b/configure.ac index f9e0e54..3a1e18e 100644 --- a/configure.ac +++ b/configure.ac @@ -94,9 +94,6 @@ AM_CONDITIONAL(LIBUDEV, [ test "x$LIBUDEV" = "xyes" ] ) AC_SUBST([LIBUDEV_CFLAGS]) AC_SUBST([LIBUDEV_LIBS]) -# Checks for header files. -AC_HEADER_STDC - # Use -Wall all the time CFLAGS="$CFLAGS -Wall" -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 10/17] config: Utilize util-macros 1.8 for additional man page support
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- man/Makefile.am | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/man/Makefile.am b/man/Makefile.am index bf7ec17..1b421f4 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -35,25 +35,9 @@ EXTRA_DIST = @DRIVER_NAME at .man CLEANFILES = $(driverman_DATA) -SED = sed - -# Strings to replace in man pages -XORGRELSTRING = @PACKAGE_STRING@ - XORGMANNAME = X Version 11 - -MAN_SUBSTS = \ - -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xservername__|Xorg|g' \ - -e 's|__xconfigfile__|xorg.conf|g' \ - -e 's|__projectroot__|$(prefix)|g' \ - -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ - -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \ - -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ - -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ - -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man .man.$(DRIVER_MAN_SUFFIX): - sed $(MAN_SUBSTS) < $< > $@ + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 11/17] config: Use LT_INIT option instead of AC_DISABLE_STATIC
Since libtool 2.2 (released March 2008) the preferred initiation of libtool is with the LT_INIT() macro, instead of AC_PROG_LIBTOOL. As we are using LT_INIT anyway we might as well pass the disable-static option directly to it instead of using the AC_DISABLE_STATIC macro. See: - https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html - https://www.x.org/wiki/NewModuleGuidelines/ Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 3a1e18e..7e19da8 100644 --- a/configure.ac +++ b/configure.ac @@ -50,10 +50,8 @@ XORG_DEFAULT_OPTIONS m4_ifndef([XORG_DRIVER_CHECK_EXT], [m4_fatal([must install xorg-server macros before running autoconf/autogen])]) - -# Checks for programs. -AC_DISABLE_STATIC -LT_INIT +# Initialize libtool +LT_INIT([disable-static]) AH_TOP([#include "xorg-server.h"]) -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 12/17] config: Add comments for main statements
Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 7e19da8..41b1217 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,7 @@ # # Process this file with autoconf to produce a configure script +# Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], [1.0.15], @@ -35,6 +36,7 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR(.) +# Initialize Automake AM_INIT_AUTOMAKE([dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -55,25 +57,27 @@ LT_INIT([disable-static]) AH_TOP([#include "xorg-server.h"]) +# Define a configure option for an alternate module directory AC_ARG_WITH(xorg-module-dir, AS_HELP_STRING([--with-xorg-module-dir=DIR], [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir="$withval"], [moduledir="$libdir/xorg/modules"]) -# Checks for extensions +# Store the list of server defined optional extensions in REQUIRED_MODULES XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(XV, videoproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) XORG_DRIVER_CHECK_EXT(DRI2, [dri2proto >= 2.6]) -# Checks for pkg-config packages +# Checks for libraries PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.60]) PKG_CHECK_MODULES(LIBDRM_NOUVEAU, [libdrm_nouveau >= 2.4.25]) AC_SUBST(LIBDRM_NOUVEAU_CFLAGS) AC_SUBST(LIBDRM_NOUVEAU_LIBS) +# Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.8] xproto fontsproto $REQUIRED_MODULES) PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), @@ -81,7 +85,6 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) sdkdir=$(pkg-config --variable=sdkdir xorg-server) -# Checks for libraries. PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10]) PKG_CHECK_MODULES(LIBUDEV, [libudev], [LIBUDEV=yes], [LIBUDEV=no]) -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 13/17] config: Remove unrequired AC_SUBST for LIBDRM_NOUVEAU and LIBUDEV
These macros are called by the PKG_CHECK_MODULES macro, for all versions of pkg-config >= 0.24.0 (released May 23, 2010). Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure.ac b/configure.ac index 41b1217..2ae9d7c 100644 --- a/configure.ac +++ b/configure.ac @@ -74,8 +74,6 @@ XORG_DRIVER_CHECK_EXT(DRI2, [dri2proto >= 2.6]) # Checks for libraries PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.60]) PKG_CHECK_MODULES(LIBDRM_NOUVEAU, [libdrm_nouveau >= 2.4.25]) -AC_SUBST(LIBDRM_NOUVEAU_CFLAGS) -AC_SUBST(LIBDRM_NOUVEAU_LIBS) # Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.8] xproto fontsproto $REQUIRED_MODULES) @@ -92,8 +90,6 @@ if test "x$LIBUDEV" = xyes; then AC_DEFINE(HAVE_LIBUDEV, 1, [libudev support]) fi AM_CONDITIONAL(LIBUDEV, [ test "x$LIBUDEV" = "xyes" ] ) -AC_SUBST([LIBUDEV_CFLAGS]) -AC_SUBST([LIBUDEV_LIBS]) # Use -Wall all the time CFLAGS="$CFLAGS -Wall" -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 14/17] config: remove unused sdkdir=$(pkg-config...) statement
The sdkdir variable is not used, so remove the statement. (Copied from xf86-video-ati 36bd69affc996c92c40b7360a7fbaa1a3a46abfd) Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2ae9d7c..d1bd8b4 100644 --- a/configure.ac +++ b/configure.ac @@ -81,7 +81,6 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10]) -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 15/17] config: Set automake options consistently in one location
Avoid use of two manners of setting automake configuration options, and consolidate them into AM_INIT_AUTOMAKE macro. Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- Makefile.am | 2 -- configure.ac | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 05e9ec6..f40ae43 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,8 +18,6 @@ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -AUTOMAKE_OPTIONS = foreign - ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src man diff --git a/configure.ac b/configure.ac index d1bd8b4..bcbb8ae 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR(.) # Initialize Automake -AM_INIT_AUTOMAKE([dist-bzip2]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 16/17] config: Complete bug report URL for Xorg DDX nouveau driver
Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bcbb8ae..edca095 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], [1.0.15], - [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/nouveau], [xf86-video-nouveau]) AC_DEFINE_UNQUOTED([NV_DRIVER_DATE], -- 2.19.1
Rhys Kidd
2019-Jan-21 05:52 UTC
[Nouveau] [PATCH xf86-video-nouveau 17/17] config: Suggest upstream to find macros in case they are missing
Added upstream suggestion to error message in case xorg macros or xserver macros are missing. No actual package manager references in suggestion since these are 'user' and/or 'distribution' preferences. (Cherry picked from xf86-video-intel 90538ecfff9c324d61419f451d41d26ab026f232) Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index edca095..1998f71 100644 --- a/configure.ac +++ b/configure.ac @@ -43,14 +43,18 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) + [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen + Hint: either install from source, https://gitlab.freedesktop.org/xorg/util/macros.git or, + depending on you distribution, try package 'xutils-dev' or 'xorg-x11-util-macros'])]) XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS # Require X.Org server macros (i.e. XORG_DRIVER_CHECK_EXT) to check for required modules m4_ifndef([XORG_DRIVER_CHECK_EXT], - [m4_fatal([must install xorg-server macros before running autoconf/autogen])]) + [m4_fatal([must install xorg-server macros before running autoconf/autogen + Hint: either install from source, https://gitlab.freedesktop.org/xorg/xserver.git or, + depending on your distribution, try package 'xserver-xorg-dev' or 'xorg-x11-server-devel'])]) # Initialize libtool LT_INIT([disable-static]) -- 2.19.1
Ilia Mirkin
2019-Jan-22 02:30 UTC
[Nouveau] [PATCH xf86-video-nouveau 00/17] autotools configuration cleanups
Thanks, applied. On Mon, Jan 21, 2019 at 12:52 AM Rhys Kidd <rhyskidd at gmail.com> wrote:> > Series of cleanups to autotools build config files to utilize the available > xorg-server macros, defaults and more closely match other modern Xorg drivers. > > Notable improvements: > - gitignore fully covers potential build artifacts > - Simplify logic given stated minimum required version of xorg-server 1.8 > - Remove use of deprecated, outdated or no longer required macros > - Utilize xorg macros where possible, instead of rolling own approaches > - Provide clearer documentation of autotools build steps > - Address warnings from libtoolize > - Set automake configuration options consistently in one location > - Provide complete URL to bug reports for Xorg DDX nouveau driver > - Fix typos > > Commits referenced from xf86-video-intel, xf86-video-amdgpu and xf86-video-ati > > Rhys Kidd (17): > config: Fix typo in comment > config,nv: Use xorg-macros PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} > config: Only check for presence of libdrm package once > config: Rely upon list.h as at least xorg-server 1.8 required > config: remove AC_PROG_CC as it overrides AC_PROG_C_C99 > gitignore: Update to mirror modern X.org drivers > config: libtoolize: put macros in AC_CONFIG_MACRO_DIR, 'm4' > config: Use XORG_DEFAULT_OPTIONS which replaces six XORG_* macros > config: remove unrequired AC_HEADER_STDC > config: Utilize util-macros 1.8 for additional man page support > config: Use LT_INIT option instead of AC_DISABLE_STATIC > config: Add comments for main statements > config: Remove unrequired AC_SUBST for LIBDRM_NOUVEAU and LIBUDEV > config: remove unused sdkdir=$(pkg-config...) statement > config: Set automake options consistently in one location > config: Complete bug report URL for Xorg DDX nouveau driver > config: Suggest upstream to find macros in case they are missing > > .gitignore | 71 +++++++++++++++++++++++++++++++++++++++++-------- > Makefile.am | 3 ++- > configure.ac | 70 +++++++++++++++++------------------------------- > m4/.gitignore | 5 ++++ > man/Makefile.am | 20 ++------------ > src/nv_driver.c | 2 +- > 6 files changed, 94 insertions(+), 77 deletions(-) > create mode 100644 m4/.gitignore > > -- > 2.19.1 > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau
Seemingly Similar Threads
- Bugfix + dri1 cleanup patches
- [PATCH xf86-video-nouveau 0/4] Compiler warnings series
- [PATCH xf86-video-nouveau] wfb: Fix missing init function decls behind FB_ACCESS_WRAPPER
- [PATCH xf86-video-nouveau] xv: fix build warning regarding const qualifier
- [Bug 100228] New: [NV137] unknown chipset (137000a1)