configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
PATCH 1/1 configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
From: Emil Velikov <[email protected]>
Currently the latter is only set when using --enable-intel.
Whereas for the CFLAGS with "enable", it's set by PKG_CHECK_MODULES and it's set locally for "disable". Yet, in either case it's not propagated through, this one can get a range of build issues regardless of the actual state of the toggle.
---
If interested, one can do a fine grained addition in the respective files, but this is the quickest fix ;-)
On a related note: seems like the nouveau and vc4 CFLAGS are _not_ propagated either. Any volunteers ?
--- configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
configure.ac +6 -3
@@ -178,12 +178,15 @@ fi if test "x$INTEL" = xyes; then PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64]) AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support]) - DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" - AC_SUBST([DRM_LIBS]) else DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/ - AC_SUBST([DRM_INTEL_CFLAGS]) + DRM_INTEL_LIBS= fi +DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS" +DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" +AC_SUBST([DRM_CFLAGS]) +AC_SUBST([DRM_LIBS]) + AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes]) # for dma-buf tests
Signature · 6 lines
2.9.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
From: Emil Velikov <[email protected]>
Currently the latter is only set when using --enable-intel.
Whereas for the CFLAGS: if we "enable" PKG_CHECK_MODULES sets the variable, while for "disable" we do it locally. In either case the CFLAGS is not propagated through, this one can get build issues regardless of the actual state of the toggle.
v2: Add -I for the include directive and correctly propagate $(top_srcdir).
---
This time fully tested:
- enable/disable/auto with and w/o libdrm_intel :-)
Did not see much point in splitting the v2 only changes to 1/2 and keep this as 2/2. I don't mind either way though :-)
--- configure.ac | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
configure.ac +7 -4
@@ -178,12 +178,15 @@ fi if test "x$INTEL" = xyes; then PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64]) AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support]) - DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" - AC_SUBST([DRM_LIBS]) else - DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/ - AC_SUBST([DRM_INTEL_CFLAGS]) + DRM_INTEL_CFLAGS=-I$\(top_srcdir\)/lib/stubs/drm/ + DRM_INTEL_LIBS= fi +DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS" +DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" +AC_SUBST([DRM_CFLAGS]) +AC_SUBST([DRM_LIBS]) + AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes]) # for dma-buf tests
Signature · 6 lines
2.9.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Thanks Emil!
This looks good to me.
Quoted 41 lines · Emil Velikov
From: Emil Velikov <[email protected]>
Currently the latter is only set when using --enable-intel.
Whereas for the CFLAGS: if we "enable"
PKG_CHECK_MODULESsets the variable, while for "disable" we do it locally. In either case the CFLAGS is not propagated through, this one can get build issues regardless of the actual state of the toggle.v2: Add -I for the include directive and correctly propagate $(top_srcdir).
Cc Brian Starkey <[email protected]>Cc Robert Foss <[email protected]>Reported-by Brian Starkey <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
This time fully tested:
- enable/disable/auto with and w/olibdrm_intel:-)Did not see much point in splitting the v2 only changes to 1/2 and keep this as 2/2. I don't mind either way though :-)
--- configure.ac | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)configure.ac +1
-4@@ -178,12 +178,15 @@ fi if test "x$INTEL" = xyes; then PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64]) AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support]) - DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" - AC_SUBST([DRM_LIBS]) else - DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/ - AC_SUBST([DRM_INTEL_CFLAGS]) + DRM_INTEL_CFLAGS=-I$\(top_srcdir\)/lib/stubs/drm/
configure.ac fi · line 192
Quoted 10 lines
configure.ac +6
-0+ DRM_INTEL_LIBS= fi +DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS" +DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" +AC_SUBST([DRM_CFLAGS]) +AC_SUBST([DRM_LIBS]) + AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes]) # for dma-buf tests
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Emil,
Quoted 9 lines · Emil Velikov
From: Emil Velikov <[email protected]>
Currently the latter is only set when using --enable-intel.
Whereas for the CFLAGS: if we "enable"
PKG_CHECK_MODULESsets the variable, while for "disable" we do it locally. In either case the CFLAGS is not propagated through, this one can get build issues regardless of the actual state of the toggle.
Quoted 8 lines
v2: Add -I for the include directive and correctly propagate $(top_srcdir).
Cc Brian Starkey <[email protected]>Cc Robert Foss <[email protected]>Reported-by Brian Starkey <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
This fixes my include path problem, so:
Thanks very much for your help,
-Brian
Quoted 32 lines
This time fully tested:
- enable/disable/auto with and w/olibdrm_intel:-)Did not see much point in splitting the v2 only changes to 1/2 and keep this as 2/2. I don't mind either way though :-)
---
configure.ac | 11 +++++++----1 file changed, 7 insertions(+), 4 deletions(-)configure.ac +0
-0@@ -178,12 +178,15 @@ fiif test "x$INTEL" = xyes; then
PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64]) AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support])configure.ac +0
-2- DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" - AC_SUBST([DRM_LIBS])else
configure.ac +2
-2- DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/ - AC_SUBST([DRM_INTEL_CFLAGS]) + DRM_INTEL_CFLAGS=-I$\(top_srcdir\)/lib/stubs/drm/ + DRM_INTEL_LIBS=fi
configure.ac +5
-0+DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS" +DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" +AC_SUBST([DRM_CFLAGS]) +AC_SUBST([DRM_LIBS]) +
AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes])
Quoted 4 lines
# for dma-buf testsSignature · 1 line
2.9.3
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx