From 91e4307272715585bd5b381ef76390e9329cc700 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 11 Nov 2019 13:03:22 +0000 Subject: [PATCH] openexr: fix compilation with openexr >= 2.4.0 in autotools Only pass -std=c++98 for openexr 2.3.x. --- configure.ac | 9 +++++++++ ext/openexr/Makefile.am | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 66857581d..bdc34c6bd 100644 --- a/configure.ac +++ b/configure.ac @@ -1896,6 +1896,15 @@ dnl *** OpenEXR *** translit(dnm, m, l) AM_CONDITIONAL(USE_OPENEXR, true) AG_GST_CHECK_FEATURE(OPENEXR, [openexr library], openexr, [ AG_GST_PKG_CHECK_MODULES(OPENEXR, OpenEXR) + if test "x$HAVE_OPENEXR" = "xyes"; then + AG_GST_PKG_CHECK_MODULES(OPENEXR240, OpenEXR >= 2.4.0) + if test "x$HAVE_OPENEXR240" = "xyes"; then + OPENEXR_STDCFLAGS= + else + OPENEXR_STDCFLAGS="-std=c++98" + fi + AC_SUBST([OPENEXR_STDCFLAGS]) + fi ]) dnl *** openh264 *** diff --git a/ext/openexr/Makefile.am b/ext/openexr/Makefile.am index 1a95fee6b..d7a3e5b12 100644 --- a/ext/openexr/Makefile.am +++ b/ext/openexr/Makefile.am @@ -6,7 +6,7 @@ libgstopenexr_la_CFLAGS = \ $(OPENEXR_CFLAGS) libgstopenexr_la_CXXFLAGS = \ $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) \ - $(OPENEXR_CFLAGS) -std=c++98 + $(OPENEXR_CFLAGS) $(OPENEXR_STDCFLAGS) libgstopenexr_la_LIBADD = \ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \ $(GST_BASE_LIBS) $(GST_LIBS) $(OPENEXR_LIBS) -- 2.34.1