I'd like to submit the attached patch to configure.ac fixing two issues: 1. Packaging systems such as pkgsrc use source tarballs not git, so configure could try to see if it's really in a git repository else use ChangeLog to determine the driver date to use. NB 'git log' should probably already be 'git log -1'
2. When using strict ISO C compilers, such as if using -std=c99 instead of for example -std=gnu99, typeof is not a valid keyword and __typeof__ should be used. Use AC_C_TYPEOF to automatically define a macro if necessary. cheers -- Richard PALO
>From e52880d8175fafac61bb45ff0274d47d39715f50 Mon Sep 17 00:00:00 2001 From: Richard PALO <[email protected]> Date: Thu, 19 Nov 2015 19:17:38 +0100 Subject: [PATCH] Sense if git should be used (for tarball) and if typeof needs to be __typeof__ Use `git log` only if not in a source tarball where ChangeLog is already generated and git may not be present. Check to see if __typeof__ needs to be used instead of typeof, which is the case if strict ISO c is used (such as -std=c99) Signed-off-by: Richard PALO <[email protected]> --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9c77f94..71482ec 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,7 @@ 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 \")], + [$(printf \"; if test -d .git; then git log; else cat ChangeLog; fi |head -3|tail -1|tr -d '\n'; printf \")], [Driver date]) AC_CONFIG_SRCDIR([Makefile.am]) @@ -105,6 +105,7 @@ AC_SUBST([LIBUDEV_LIBS]) # Checks for header files. AC_HEADER_STDC +AC_C_TYPEOF # Use -Wall all the time CFLAGS="$CFLAGS -Wall" -- 2.6.3
_______________________________________________ Nouveau mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/nouveau
