$NetBSD: patch-configure_ac,v 1.5 2020/08/25 16:42:21 gdt Exp $ Remediate == (bashism) in configure.ac --- configure.ac.orig 2016-02-03 18:40:30.000000000 +0000 +++ configure.ac @@ -64,41 +64,41 @@ AC_ARG_VAR(ZM_TMPDIR,[Location of tempor AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm]) AC_ARG_VAR(ZM_CONFIG_DIR,[Location of ZoneMinder configuration, default system config directory]) -if test "$ZM_DB_TYPE" == ""; then +if test "$ZM_DB_TYPE" = ""; then AC_SUBST(ZM_DB_TYPE,[mysql]) fi -if test "$ZM_DB_HOST" == ""; then +if test "$ZM_DB_HOST" = ""; then AC_SUBST(ZM_DB_HOST,[localhost]) fi -if test "$ZM_DB_NAME" == ""; then +if test "$ZM_DB_NAME" = ""; then AC_SUBST(ZM_DB_NAME,[zm]) fi -if test "$ZM_DB_USER" == ""; then +if test "$ZM_DB_USER" = ""; then AC_SUBST(ZM_DB_USER,[zmuser]) fi -if test "$ZM_DB_PASS" == ""; then +if test "$ZM_DB_PASS" = ""; then AC_SUBST(ZM_DB_PASS,[zmpass]) fi -if test "$ZM_SSL_LIB" == ""; then +if test "$ZM_SSL_LIB" = ""; then AC_SUBST(ZM_SSL_LIB,gnutls) fi -if test "$ZM_MYSQL_ENGINE" == ""; then +if test "$ZM_MYSQL_ENGINE" = ""; then AC_SUBST(ZM_MYSQL_ENGINE,InnoDB) fi -if test "$ZM_RUNDIR" == ""; then +if test "$ZM_RUNDIR" = ""; then AC_SUBST(ZM_RUNDIR,[/var/run/zm]) fi -if test "$ZM_SOCKDIR" == ""; then +if test "$ZM_SOCKDIR" = ""; then AC_SUBST(ZM_SOCKDIR,[/var/run/zm]) fi -if test "$ZM_TMPDIR" == ""; then +if test "$ZM_TMPDIR" = ""; then AC_SUBST(ZM_TMPDIR,[/tmp/zm]) fi -if test "$ZM_LOGDIR" == ""; then +if test "$ZM_LOGDIR" = ""; then AC_SUBST(ZM_LOGDIR,[/var/log/zm]) fi AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory]) -if test "$ZM_CONFIG_DIR" == ""; then +if test "$ZM_CONFIG_DIR" = ""; then AC_SUBST(ZM_CONFIG_DIR,[$SYSCONFDIR]) fi @@ -270,7 +270,7 @@ AC_ARG_ENABLE(mmap, filesystem which will normally be the case by default. e.g. --enable-mmap=yes or --disable-mmap]) ) -if test "$ENABLE_MMAP" == "yes"; then +if test "$ENABLE_MMAP" = "yes"; then AC_DEFINE(ZM_MEM_MAPPED,1,"Whether to use mapped rather than shared memory") else AC_DEFINE(ZM_MEM_MAPPED,0,"Whether to use mapped rather than shared memory") @@ -292,7 +292,7 @@ AM_CONDITIONAL([COND_ONVIF], [test "$ena # Compiler AC_LANG_CPLUSPLUS -if test "$ENABLE_ONVIF" == "yes"; then +if test "$ENABLE_ONVIF" = "yes"; then AC_SUBST(ZM_HAS_ONVIF,1) else AC_SUBST(ZM_HAS_ONVIF,0) @@ -342,22 +342,22 @@ AC_CHECK_LIB(rt,clock_gettime,,AC_MSG_ER AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.a)) AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a)) AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a)) -if test "$BSD" == "0"; then +if test "$BSD" = "0"; then AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) fi -if test "$ZM_SSL_LIB" == "openssl"; then +if test "$ZM_SSL_LIB" = "openssl"; then AC_CHECK_HEADERS(openssl/md5.h,,AC_MSG_WARN(zm requires openssl/md5.h header to be installed for openssl),) AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead])) else AC_CHECK_HEADERS(gnutls/openssl.h,AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,1),AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,0),) AC_CHECK_HEADERS(gnutls/gnutls.h,AC_SUBST(ZM_HAS_GNUTLS,1),AC_SUBST(ZM_HAS_GNUTLS,0),) -if test "$ZM_HAS_GNUTLS_OPENSSL" == "0" && test "$ZM_HAS_GNUTLS" == "0"; then +if test "$ZM_HAS_GNUTLS_OPENSSL" = "0" && test "$ZM_HAS_GNUTLS" = "0"; then AC_MSG_WARN(gnutls is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead) fi AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),) AC_CHECK_LIB(gcrypt,gcry_check_version,,AC_MSG_WARN([libgcrypt.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead])) AC_CHECK_LIB(gnutls,gnutls_fingerprint,,AC_MSG_WARN([libgnutls.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead])) -if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then +if test "$ZM_HAS_GNUTLS_OPENSSL" = "1"; then AC_CHECK_LIB(gnutls-openssl,MD5,,AC_MSG_WARN([libgnutls.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead])) fi fi @@ -400,7 +400,7 @@ AC_SUBST(ZM_HAS_V4L2) # Set global Video for Linux flag ZM_HAS_V4L=0 -if test "$ZM_HAS_V4L1" == "1" || test "$ZM_HAS_V4L2" == "1"; then +if test "$ZM_HAS_V4L1" = "1" || test "$ZM_HAS_V4L2" = "1"; then ZM_HAS_V4L=1 else AC_MSG_WARN(zm requires Video4Linux or Video4Linux2 to be installed for analog or USB camera support) @@ -417,7 +417,7 @@ AC_CHECK_HEADERS(libswscale/swscale.h,,, AC_LANG_POP([C]) AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,) AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,) -if test "$ENABLE_MMAP" == "yes"; then +if test "$ENABLE_MMAP" = "yes"; then AC_CHECK_HEADERS(sys/mman.h,,,) AC_CHECK_HEADERS(fcntl.h,,,) else @@ -428,11 +428,11 @@ AC_CHECK_HEADERS(zlib.h,,,) AC_CHECK_HEADERS(vlc/vlc.h,,,) AC_CHECK_HEADERS(curl/curl.h,,,) -if test "$ZM_SSL_LIB" == "openssl"; then +if test "$ZM_SSL_LIB" = "openssl"; then AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include #include ]) else -if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then +if test "$ZM_HAS_GNUTLS_OPENSSL" = "1"; then AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead]),[#include #include ]) else @@ -457,7 +457,7 @@ AC_PROG_PERL_MODULES(Time::HiRes,,AC_MSG AC_PROG_PERL_MODULES(Date::Manip,,AC_MSG_ERROR(zm requires Date::Manip)) AC_PROG_PERL_MODULES(LWP::UserAgent,,AC_MSG_ERROR(zm requires LWP::UserAgent)) AC_PROG_PERL_MODULES(ExtUtils::MakeMaker,,AC_MSG_ERROR(zm requires ExtUtils::MakeMaker)) -if test "$ENABLE_MMAP" == "yes"; then +if test "$ENABLE_MMAP" = "yes"; then AC_PROG_PERL_MODULES(Sys::Mmap,,AC_MSG_ERROR(zm requires Sys::Mmap for mapped memory - set --enable-mmap=no to use IPC shared memory instead)) fi