Skip to contentSkip to conversation

autotools configuration cleanups

PATCH Applied Rhys Kidd 2 participants 19 messages Jan 21, 2019 – Jan 22, 2019 1 message not in the archive Kbuild

lore
Share & tools
lore

Rhys Kidd

author
#0 lore raw

cover 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
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 20190121055223.7891-1-rhyskidd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

author
#2 lore raw

PATCH 1/17 config: Fix typo in comment

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index 56a971f..2fb8fcd 100644
@@ -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> ]], [[ ]])],
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#3 lore raw

PATCH 2/17 config, nv: Use xorg-macros PACKAGE_VERSION_{MAJOR, MINOR, PATCHLEVEL}

In reply to a message not in the archive

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")
---
 configure.ac    | 9 ---------
 src/nv_driver.c | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)
configure.ac +0 -9
index 2fb8fcd..c9b8a66 100644
@@ -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])
src/nv_driver.c +1 -1
index a5d50c1..1d276cf 100644
@@ -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,
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#4 lore raw

PATCH 3/17 config: Only check for presence of libdrm package once

In reply to a message not in the archive

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")
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index c9b8a66..c80f92d 100644
@@ -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")
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#5 lore raw

PATCH 4/17 config: Rely upon list.h as at least xorg-server 1.8 required

In reply to a message not in the archive
Fixes edd1608 ("xorg_list: define the xorg_list* symbols")
---
 configure.ac | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)
configure.ac +5 -12
index c80f92d..b2913e8 100644
@@ -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
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#6 lore raw

PATCH 5/17 config: remove AC_PROG_CC as it overrides AC_PROG_C_C99

In reply to a message not in the archive

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.

---
 configure.ac | 1 -
 1 file changed, 1 deletion(-)
configure.ac +0 -1
index b2913e8..3b09c01 100644
@@ -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"])
 
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#7 lore raw

PATCH 6/17 gitignore: Update to mirror modern X.org drivers

In reply to a message not in the archive

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

---
 .gitignore | 76 ++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 65 insertions(+), 11 deletions(-)
.gitignore +65 -11
index 2694d9d..10aeed9 100644
@@ -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'
+#
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#8 lore raw

PATCH 7/17 config: libtoolize: put macros in AC_CONFIG_MACRO_DIR, 'm4'

In reply to a message not in the archive

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

---
 .gitignore    | 5 -----
 Makefile.am   | 3 +++
 configure.ac  | 1 +
 m4/.gitignore | 5 +++++
 4 files changed, 9 insertions(+), 5 deletions(-)
 create mode 100644 m4/.gitignore
.gitignore +0 -5
index 10aeed9..f7953e3 100644
@@ -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
Makefile.am +3 -0
index 032be8a..05e9ec6 100644
@@ -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
 
configure.ac +1 -0
index 3b09c01..0323adf 100644
@@ -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])
m4/.gitignore new file +5 -0
new file mode 100644
index 0000000..464ba5c
@@ -0,0 +1,5 @@
+libtool.m4
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#9 lore raw

PATCH 8/17 config: Use XORG_DEFAULT_OPTIONS which replaces six XORG_* macros

In reply to a message not in the archive

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/

---
 configure.ac | 3 ---
 1 file changed, 3 deletions(-)
configure.ac +0 -3
index 0323adf..f9e0e54 100644
@@ -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])], [],
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#10 lore raw

PATCH 9/17 config: remove unrequired AC_HEADER_STDC

In reply to a message not in the archive

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.

---
 configure.ac | 3 ---
 1 file changed, 3 deletions(-)
configure.ac +0 -3
index f9e0e54..3a1e18e 100644
@@ -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"
 
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#11 lore raw

PATCH 10/17 config: Utilize util-macros 1.8 for additional man page support

In reply to a message not in the archive

Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages.

---
 man/Makefile.am | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)
man/Makefile.am +2 -18
index bf7ec17..1b421f4 100644
@@ -35,25 +35,9 @@ EXTRA_DIST = @[email protected]
 
 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) < $< > $@
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#12 lore raw

PATCH 11/17 config: Use LT_INIT option instead of AC_DISABLE_STATIC

In reply to a message not in the archive

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/

---
 configure.ac | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
configure.ac +2 -4
index 3a1e18e..7e19da8 100644
@@ -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"])
 
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#13 lore raw

PATCH 12/17 config: Add comments for main statements

In reply to a message not in the archive
---
 configure.ac | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
configure.ac +6 -3
index 7e19da8..41b1217 100644
@@ -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])
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#14 lore raw

PATCH 13/17 config: Remove unrequired AC_SUBST for LIBDRM_NOUVEAU and LIBUDEV

In reply to a message not in the archive

These macros are called by the PKG_CHECK_MODULES macro, for all versions of pkg-config >= 0.24.0 (released May 23, 2010).

---
 configure.ac | 4 ----
 1 file changed, 4 deletions(-)
configure.ac +0 -4
index 41b1217..2ae9d7c 100644
@@ -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"
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#15 lore raw

PATCH 14/17 config: remove unused sdkdir=$(pkg-config...) statement

In reply to a message not in the archive

The sdkdir variable is not used, so remove the statement.

(Copied from xf86-video-ati 36bd69affc996c92c40b7360a7fbaa1a3a46abfd)

---
 configure.ac | 1 -
 1 file changed, 1 deletion(-)
configure.ac +0 -1
index 2ae9d7c..d1bd8b4 100644
@@ -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])
 
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#16 lore raw

PATCH 15/17 config: Set automake options consistently in one location

In reply to a message not in the archive

Avoid use of two manners of setting automake configuration options, and consolidate them into AM_INIT_AUTOMAKE macro.

---
 Makefile.am  | 2 --
 configure.ac | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
Makefile.am +0 -2
index 05e9ec6..f40ae43 100644
@@ -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
configure.ac +1 -1
index d1bd8b4..bcbb8ae 100644
@@ -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])])
 
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#17 lore raw

PATCH 16/17 config: Complete bug report URL for Xorg DDX nouveau driver

In reply to a message not in the archive
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index bcbb8ae..edca095 100644
@@ -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],
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
author
#18 lore raw

PATCH 17/17 config: Suggest upstream to find macros in case they are missing

In reply to a message not in the archive

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)

---
 configure.ac | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
configure.ac +6 -2
index edca095..1998f71 100644
@@ -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])
Signature · 6 lines
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Applied
#19 lore raw
In reply to a message not in the archive

Thanks, applied.

Quoted 45 lines · Rhys Kidd

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
Quoted 7 lines

--
2.19.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau