$NetBSD: patch-configure_ac,v 1.4 2015/04/07 12:54:36 dsainty Exp $ Recognise lower-case "netbsd" as BSD. Correct shell test = syntax. Allow Pkgsrc to manage dlopen() support. --- configure.ac.orig 2015-02-05 15:52:37.000000000 +1300 +++ configure.ac 2015-04-01 23:24:28.305177975 +1300 @@ -23,7 +23,7 @@ # Do something specific for linux HOST_OS='linux' ;; - *BSD*) + *[[Bb][Ss][dD]]*) # Do something specific for BSD HOST_OS='BSD' ;; @@ -48,41 +48,41 @@ 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 @@ -254,7 +254,7 @@ 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") @@ -303,7 +303,7 @@ AC_PATH_PROG(PATH_FFMPEG,ffmpeg) AC_CHECK_PROG(OPT_NETPBM,pnmscale,yes,no) AC_PATH_PROG(PATH_NETPBM,pnmscale) -if test "$OPT_NETPBM" == "yes"; then +if test "$OPT_NETPBM" = "yes"; then PATH_NETPBM=`dirname $PATH_NETPBM` fi @@ -311,20 +311,20 @@ 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)) -AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) -if test "$ZM_SSL_LIB" == "openssl"; then +#AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) +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 @@ -356,7 +356,7 @@ AC_CHECK_HEADERS(pthread.h,,,) AC_CHECK_HEADERS(linux/videodev.h,AC_SUBST(ZM_HAS_V4L1,1),AC_SUBST(ZM_HAS_V4L1,0),) AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_HAS_V4L2,1),AC_SUBST(ZM_HAS_V4L2,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 AC_SUBST(ZM_HAS_V4L,1) else AC_SUBST(ZM_HAS_V4L,0) @@ -372,7 +372,7 @@ 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 @@ -383,11 +383,11 @@ 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 @@ -411,7 +411,7 @@ 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