diff --git a/CMakeLists.txt b/CMakeLists.txt index be72abd7e..ef04e1fba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -438,6 +438,12 @@ if(NOT ZM_NO_MMAP) set(ZM_MMAP_PERLPACKAGE "Sys::Mmap") endif(NOT ZM_NO_MMAP) +# Check for the ONVIF flag and enable ZM_HAS_ONVIF accordingly +set(ZM_HAS_ONVIF 0) +if(ZM_ONVIF) + set(ZM_HAS_ONVIF 1) +endif(ZM_ONVIF) + # Check for authenication functions if(HAVE_OPENSSL_MD5_H) set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}") diff --git a/configure.ac b/configure.ac index 108212659..0cde4661b 100644 --- a/configure.ac +++ b/configure.ac @@ -276,6 +276,11 @@ AM_CONDITIONAL([COND_ONVIF], [test "$enable_onvif" = yes]) # Compiler AC_LANG_CPLUSPLUS +if test "$ENABLE_ONVIF" == "yes"; then + AC_SUBST(ZM_HAS_ONVIF,1) +else + AC_SUBST(ZM_HAS_ONVIF,0) +fi # Checks for programs. AC_PROG_CXX diff --git a/web/includes/config.php.in b/web/includes/config.php.in index be956d75c..fbcb0e7b3 100644 --- a/web/includes/config.php.in +++ b/web/includes/config.php.in @@ -61,6 +61,11 @@ define( "ZM_HAS_V4L2", "@ZM_HAS_V4L2@" ); // V4L2 support enabled define( "ZM_HAS_V4L1", "@ZM_HAS_V4L1@" ); // V4L1 support enabled define( "ZM_HAS_V4L", "@ZM_HAS_V4L@" ); // V4L support enabled +// +// If ONVIF support has been built in +// +define( "ZM_HAS_ONVIF", "@ZM_HAS_ONVIF@" ); // ONVIF support enabled + // // If PCRE dev libraries are installed // diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 75773fe3d..fa72c3ba5 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -426,7 +426,14 @@ if ( canEdit( 'Monitors' ) ) ?>
- + + +