|
|
|
@ -288,6 +288,37 @@ fi
|
|
|
|
|
if test -n "$OPENEXR_LIBS"
|
|
|
|
|
then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
|
|
|
|
|
AC_LANG_SAVE
|
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
|
SAVED_CXXFLAGS="$CXXFLAGS"
|
|
|
|
|
for CXX_STD_TEST in "" 11 14 17; do
|
|
|
|
|
CXXFLAGS="$SAVED_CXXFLAGS"
|
|
|
|
|
if test "x$CXX_STD_TEST" = "x"; then
|
|
|
|
|
AC_MSG_CHECKING([OpenEXR build with default C++ standard])
|
|
|
|
|
OPENEXR_CXXFLAGS=""
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_CHECKING([OpenEXR build with C++$CXX_STD_TEST])
|
|
|
|
|
OPENEXR_CXXFLAGS="-std=c++$CXX_STD_TEST"
|
|
|
|
|
fi
|
|
|
|
|
CXXFLAGS="$SAVED_CXXFLAGS $OPENEXR_CFLAGS $OPENEXR_CXXFLAGS"
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <ImfRgbaFile.h>
|
|
|
|
|
],[ ],
|
|
|
|
|
openexr_cxx_std=yes,
|
|
|
|
|
openexr_cxx_std=no
|
|
|
|
|
)
|
|
|
|
|
if test "x$openexr_cxx_std" = "xyes"; then
|
|
|
|
|
AC_SUBST(OPENEXR_CXXFLAGS)
|
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
|
break
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
CXXFLAGS="$SAVED_CXXFLAGS"
|
|
|
|
|
AC_LANG_RESTORE
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([not found])
|
|
|
|
|
fi
|
|
|
|
@ -296,6 +327,6 @@ AC_SUBST(OPENEXR_LIBS)
|
|
|
|
|
AC_SUBST(OPENEXR_CFLAGS)
|
|
|
|
|
AC_SUBST(OPENEXR_RPATH)
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL(have_openexr, test -n "$OPENEXR_LIBS")
|
|
|
|
|
AM_CONDITIONAL(have_openexr, test "x$openexr_cxx_std" = "xyes")
|
|
|
|
|
|
|
|
|
|
# --- End of OpenEXR check ---
|
|
|
|
|