| @@ -1,144 +1,157 @@ | | | @@ -1,144 +1,157 @@ |
1 | $NetBSD: patch-configure_ac,v 1.3 2015/04/05 08:51:08 dsainty Exp $ | | 1 | $NetBSD: patch-configure_ac,v 1.4 2015/04/07 12:54:36 dsainty Exp $ |
2 | | | 2 | |
3 | Correct shell syntax. Allow Pkgsrc to manage dlopen() support. | | 3 | Recognise lower-case "netbsd" as BSD. |
| | | 4 | |
| | | 5 | Correct shell test = syntax. |
| | | 6 | |
| | | 7 | Allow Pkgsrc to manage dlopen() support. |
4 | | | 8 | |
5 | --- configure.ac.orig 2015-02-05 15:52:37.000000000 +1300 | | 9 | --- configure.ac.orig 2015-02-05 15:52:37.000000000 +1300 |
6 | +++ configure.ac 2015-04-01 23:24:28.305177975 +1300 | | 10 | +++ configure.ac 2015-04-01 23:24:28.305177975 +1300 |
| | | 11 | @@ -23,7 +23,7 @@ |
| | | 12 | # Do something specific for linux |
| | | 13 | HOST_OS='linux' |
| | | 14 | ;; |
| | | 15 | - *BSD*) |
| | | 16 | + *[[Bb][Ss][dD]]*) |
| | | 17 | # Do something specific for BSD |
| | | 18 | HOST_OS='BSD' |
| | | 19 | ;; |
7 | @@ -48,41 +48,41 @@ | | 20 | @@ -48,41 +48,41 @@ |
8 | AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm]) | | 21 | AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm]) |
9 | AC_ARG_VAR(ZM_CONFIG_DIR,[Location of ZoneMinder configuration, default system config directory]) | | 22 | AC_ARG_VAR(ZM_CONFIG_DIR,[Location of ZoneMinder configuration, default system config directory]) |
10 | | | 23 | |
11 | -if test "$ZM_DB_TYPE" == ""; then | | 24 | -if test "$ZM_DB_TYPE" == ""; then |
12 | +if test "$ZM_DB_TYPE" = ""; then | | 25 | +if test "$ZM_DB_TYPE" = ""; then |
13 | AC_SUBST(ZM_DB_TYPE,[mysql]) | | 26 | AC_SUBST(ZM_DB_TYPE,[mysql]) |
14 | fi | | 27 | fi |
15 | -if test "$ZM_DB_HOST" == ""; then | | 28 | -if test "$ZM_DB_HOST" == ""; then |
16 | +if test "$ZM_DB_HOST" = ""; then | | 29 | +if test "$ZM_DB_HOST" = ""; then |
17 | AC_SUBST(ZM_DB_HOST,[localhost]) | | 30 | AC_SUBST(ZM_DB_HOST,[localhost]) |
18 | fi | | 31 | fi |
19 | -if test "$ZM_DB_NAME" == ""; then | | 32 | -if test "$ZM_DB_NAME" == ""; then |
20 | +if test "$ZM_DB_NAME" = ""; then | | 33 | +if test "$ZM_DB_NAME" = ""; then |
21 | AC_SUBST(ZM_DB_NAME,[zm]) | | 34 | AC_SUBST(ZM_DB_NAME,[zm]) |
22 | fi | | 35 | fi |
23 | -if test "$ZM_DB_USER" == ""; then | | 36 | -if test "$ZM_DB_USER" == ""; then |
24 | +if test "$ZM_DB_USER" = ""; then | | 37 | +if test "$ZM_DB_USER" = ""; then |
25 | AC_SUBST(ZM_DB_USER,[zmuser]) | | 38 | AC_SUBST(ZM_DB_USER,[zmuser]) |
26 | fi | | 39 | fi |
27 | -if test "$ZM_DB_PASS" == ""; then | | 40 | -if test "$ZM_DB_PASS" == ""; then |
28 | +if test "$ZM_DB_PASS" = ""; then | | 41 | +if test "$ZM_DB_PASS" = ""; then |
29 | AC_SUBST(ZM_DB_PASS,[zmpass]) | | 42 | AC_SUBST(ZM_DB_PASS,[zmpass]) |
30 | fi | | 43 | fi |
31 | -if test "$ZM_SSL_LIB" == ""; then | | 44 | -if test "$ZM_SSL_LIB" == ""; then |
32 | +if test "$ZM_SSL_LIB" = ""; then | | 45 | +if test "$ZM_SSL_LIB" = ""; then |
33 | AC_SUBST(ZM_SSL_LIB,gnutls) | | 46 | AC_SUBST(ZM_SSL_LIB,gnutls) |
34 | fi | | 47 | fi |
35 | -if test "$ZM_MYSQL_ENGINE" == ""; then | | 48 | -if test "$ZM_MYSQL_ENGINE" == ""; then |
36 | +if test "$ZM_MYSQL_ENGINE" = ""; then | | 49 | +if test "$ZM_MYSQL_ENGINE" = ""; then |
37 | AC_SUBST(ZM_MYSQL_ENGINE,InnoDB) | | 50 | AC_SUBST(ZM_MYSQL_ENGINE,InnoDB) |
38 | fi | | 51 | fi |
39 | -if test "$ZM_RUNDIR" == ""; then | | 52 | -if test "$ZM_RUNDIR" == ""; then |
40 | +if test "$ZM_RUNDIR" = ""; then | | 53 | +if test "$ZM_RUNDIR" = ""; then |
41 | AC_SUBST(ZM_RUNDIR,[/var/run/zm]) | | 54 | AC_SUBST(ZM_RUNDIR,[/var/run/zm]) |
42 | fi | | 55 | fi |
43 | -if test "$ZM_SOCKDIR" == ""; then | | 56 | -if test "$ZM_SOCKDIR" == ""; then |
44 | +if test "$ZM_SOCKDIR" = ""; then | | 57 | +if test "$ZM_SOCKDIR" = ""; then |
45 | AC_SUBST(ZM_SOCKDIR,[/var/run/zm]) | | 58 | AC_SUBST(ZM_SOCKDIR,[/var/run/zm]) |
46 | fi | | 59 | fi |
47 | -if test "$ZM_TMPDIR" == ""; then | | 60 | -if test "$ZM_TMPDIR" == ""; then |
48 | +if test "$ZM_TMPDIR" = ""; then | | 61 | +if test "$ZM_TMPDIR" = ""; then |
49 | AC_SUBST(ZM_TMPDIR,[/tmp/zm]) | | 62 | AC_SUBST(ZM_TMPDIR,[/tmp/zm]) |
50 | fi | | 63 | fi |
51 | -if test "$ZM_LOGDIR" == ""; then | | 64 | -if test "$ZM_LOGDIR" == ""; then |
52 | +if test "$ZM_LOGDIR" = ""; then | | 65 | +if test "$ZM_LOGDIR" = ""; then |
53 | AC_SUBST(ZM_LOGDIR,[/var/log/zm]) | | 66 | AC_SUBST(ZM_LOGDIR,[/var/log/zm]) |
54 | fi | | 67 | fi |
55 | AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory]) | | 68 | AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory]) |
56 | -if test "$ZM_CONFIG_DIR" == ""; then | | 69 | -if test "$ZM_CONFIG_DIR" == ""; then |
57 | +if test "$ZM_CONFIG_DIR" = ""; then | | 70 | +if test "$ZM_CONFIG_DIR" = ""; then |
58 | AC_SUBST(ZM_CONFIG_DIR,[$SYSCONFDIR]) | | 71 | AC_SUBST(ZM_CONFIG_DIR,[$SYSCONFDIR]) |
59 | fi | | 72 | fi |
60 | | | 73 | |
61 | @@ -254,7 +254,7 @@ | | 74 | @@ -254,7 +254,7 @@ |
62 | filesystem which will normally be the case by default. | | 75 | filesystem which will normally be the case by default. |
63 | e.g. --enable-mmap=yes or --disable-mmap]) | | 76 | e.g. --enable-mmap=yes or --disable-mmap]) |
64 | ) | | 77 | ) |
65 | -if test "$ENABLE_MMAP" == "yes"; then | | 78 | -if test "$ENABLE_MMAP" == "yes"; then |
66 | +if test "$ENABLE_MMAP" = "yes"; then | | 79 | +if test "$ENABLE_MMAP" = "yes"; then |
67 | AC_DEFINE(ZM_MEM_MAPPED,1,"Whether to use mapped rather than shared memory") | | 80 | AC_DEFINE(ZM_MEM_MAPPED,1,"Whether to use mapped rather than shared memory") |
68 | else | | 81 | else |
69 | AC_DEFINE(ZM_MEM_MAPPED,0,"Whether to use mapped rather than shared memory") | | 82 | AC_DEFINE(ZM_MEM_MAPPED,0,"Whether to use mapped rather than shared memory") |
70 | @@ -303,7 +303,7 @@ | | 83 | @@ -303,7 +303,7 @@ |
71 | AC_PATH_PROG(PATH_FFMPEG,ffmpeg) | | 84 | AC_PATH_PROG(PATH_FFMPEG,ffmpeg) |
72 | AC_CHECK_PROG(OPT_NETPBM,pnmscale,yes,no) | | 85 | AC_CHECK_PROG(OPT_NETPBM,pnmscale,yes,no) |
73 | AC_PATH_PROG(PATH_NETPBM,pnmscale) | | 86 | AC_PATH_PROG(PATH_NETPBM,pnmscale) |
74 | -if test "$OPT_NETPBM" == "yes"; then | | 87 | -if test "$OPT_NETPBM" == "yes"; then |
75 | +if test "$OPT_NETPBM" = "yes"; then | | 88 | +if test "$OPT_NETPBM" = "yes"; then |
76 | PATH_NETPBM=`dirname $PATH_NETPBM` | | 89 | PATH_NETPBM=`dirname $PATH_NETPBM` |
77 | fi | | 90 | fi |
78 | | | 91 | |
79 | @@ -311,20 +311,20 @@ | | 92 | @@ -311,20 +311,20 @@ |
80 | AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.a)) | | 93 | AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.a)) |
81 | AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a)) | | 94 | AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a)) |
82 | AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a)) | | 95 | AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a)) |
83 | -AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) | | 96 | -AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) |
84 | -if test "$ZM_SSL_LIB" == "openssl"; then | | 97 | -if test "$ZM_SSL_LIB" == "openssl"; then |
85 | +#AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) | | 98 | +#AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) |
86 | +if test "$ZM_SSL_LIB" = "openssl"; then | | 99 | +if test "$ZM_SSL_LIB" = "openssl"; then |
87 | AC_CHECK_HEADERS(openssl/md5.h,,AC_MSG_WARN(zm requires openssl/md5.h header to be installed for openssl),) | | 100 | AC_CHECK_HEADERS(openssl/md5.h,,AC_MSG_WARN(zm requires openssl/md5.h header to be installed for openssl),) |
88 | AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead])) | | 101 | AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead])) |
89 | else | | 102 | else |
90 | AC_CHECK_HEADERS(gnutls/openssl.h,AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,1),AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,0),) | | 103 | AC_CHECK_HEADERS(gnutls/openssl.h,AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,1),AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,0),) |
91 | AC_CHECK_HEADERS(gnutls/gnutls.h,AC_SUBST(ZM_HAS_GNUTLS,1),AC_SUBST(ZM_HAS_GNUTLS,0),) | | 104 | AC_CHECK_HEADERS(gnutls/gnutls.h,AC_SUBST(ZM_HAS_GNUTLS,1),AC_SUBST(ZM_HAS_GNUTLS,0),) |
92 | -if test "$ZM_HAS_GNUTLS_OPENSSL" == "0" && test "$ZM_HAS_GNUTLS" == "0"; then | | 105 | -if test "$ZM_HAS_GNUTLS_OPENSSL" == "0" && test "$ZM_HAS_GNUTLS" == "0"; then |
93 | +if test "$ZM_HAS_GNUTLS_OPENSSL" = "0" && test "$ZM_HAS_GNUTLS" = "0"; then | | 106 | +if test "$ZM_HAS_GNUTLS_OPENSSL" = "0" && test "$ZM_HAS_GNUTLS" = "0"; then |
94 | AC_MSG_WARN(gnutls is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead) | | 107 | AC_MSG_WARN(gnutls is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead) |
95 | fi | | 108 | fi |
96 | AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),) | | 109 | AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),) |
97 | 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])) | | 110 | 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])) |
98 | 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])) | | 111 | 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])) |
99 | -if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then | | 112 | -if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then |
100 | +if test "$ZM_HAS_GNUTLS_OPENSSL" = "1"; then | | 113 | +if test "$ZM_HAS_GNUTLS_OPENSSL" = "1"; then |
101 | 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])) | | 114 | 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])) |
102 | fi | | 115 | fi |
103 | fi | | 116 | fi |
104 | @@ -356,7 +356,7 @@ | | 117 | @@ -356,7 +356,7 @@ |
105 | AC_CHECK_HEADERS(pthread.h,,,) | | 118 | AC_CHECK_HEADERS(pthread.h,,,) |
106 | AC_CHECK_HEADERS(linux/videodev.h,AC_SUBST(ZM_HAS_V4L1,1),AC_SUBST(ZM_HAS_V4L1,0),) | | 119 | AC_CHECK_HEADERS(linux/videodev.h,AC_SUBST(ZM_HAS_V4L1,1),AC_SUBST(ZM_HAS_V4L1,0),) |
107 | AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_HAS_V4L2,1),AC_SUBST(ZM_HAS_V4L2,0),) | | 120 | AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_HAS_V4L2,1),AC_SUBST(ZM_HAS_V4L2,0),) |
108 | -if test "$ZM_HAS_V4L1" == "1" || test "$ZM_HAS_V4L2" == "1"; then | | 121 | -if test "$ZM_HAS_V4L1" == "1" || test "$ZM_HAS_V4L2" == "1"; then |
109 | +if test "$ZM_HAS_V4L1" = "1" || test "$ZM_HAS_V4L2" = "1"; then | | 122 | +if test "$ZM_HAS_V4L1" = "1" || test "$ZM_HAS_V4L2" = "1"; then |
110 | AC_SUBST(ZM_HAS_V4L,1) | | 123 | AC_SUBST(ZM_HAS_V4L,1) |
111 | else | | 124 | else |
112 | AC_SUBST(ZM_HAS_V4L,0) | | 125 | AC_SUBST(ZM_HAS_V4L,0) |
113 | @@ -372,7 +372,7 @@ | | 126 | @@ -372,7 +372,7 @@ |
114 | AC_LANG_POP([C]) | | 127 | AC_LANG_POP([C]) |
115 | AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,) | | 128 | AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,) |
116 | AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,) | | 129 | AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,) |
117 | -if test "$ENABLE_MMAP" == "yes"; then | | 130 | -if test "$ENABLE_MMAP" == "yes"; then |
118 | +if test "$ENABLE_MMAP" = "yes"; then | | 131 | +if test "$ENABLE_MMAP" = "yes"; then |
119 | AC_CHECK_HEADERS(sys/mman.h,,,) | | 132 | AC_CHECK_HEADERS(sys/mman.h,,,) |
120 | AC_CHECK_HEADERS(fcntl.h,,,) | | 133 | AC_CHECK_HEADERS(fcntl.h,,,) |
121 | else | | 134 | else |
122 | @@ -383,11 +383,11 @@ | | 135 | @@ -383,11 +383,11 @@ |
123 | AC_CHECK_HEADERS(vlc/vlc.h,,,) | | 136 | AC_CHECK_HEADERS(vlc/vlc.h,,,) |
124 | AC_CHECK_HEADERS(curl/curl.h,,,) | | 137 | AC_CHECK_HEADERS(curl/curl.h,,,) |
125 | | | 138 | |
126 | -if test "$ZM_SSL_LIB" == "openssl"; then | | 139 | -if test "$ZM_SSL_LIB" == "openssl"; then |
127 | +if test "$ZM_SSL_LIB" = "openssl"; then | | 140 | +if test "$ZM_SSL_LIB" = "openssl"; then |
128 | AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include <stdlib.h> | | 141 | AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include <stdlib.h> |
129 | #include <openssl/md5.h>]) | | 142 | #include <openssl/md5.h>]) |
130 | else | | 143 | else |
131 | -if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then | | 144 | -if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then |
132 | +if test "$ZM_HAS_GNUTLS_OPENSSL" = "1"; then | | 145 | +if test "$ZM_HAS_GNUTLS_OPENSSL" = "1"; then |
133 | AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead]),[#include <stdlib.h> | | 146 | AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead]),[#include <stdlib.h> |
134 | #include <gnutls/openssl.h>]) | | 147 | #include <gnutls/openssl.h>]) |
135 | else | | 148 | else |
136 | @@ -411,7 +411,7 @@ | | 149 | @@ -411,7 +411,7 @@ |
137 | AC_PROG_PERL_MODULES(Date::Manip,,AC_MSG_ERROR(zm requires Date::Manip)) | | 150 | AC_PROG_PERL_MODULES(Date::Manip,,AC_MSG_ERROR(zm requires Date::Manip)) |
138 | AC_PROG_PERL_MODULES(LWP::UserAgent,,AC_MSG_ERROR(zm requires LWP::UserAgent)) | | 151 | AC_PROG_PERL_MODULES(LWP::UserAgent,,AC_MSG_ERROR(zm requires LWP::UserAgent)) |
139 | AC_PROG_PERL_MODULES(ExtUtils::MakeMaker,,AC_MSG_ERROR(zm requires ExtUtils::MakeMaker)) | | 152 | AC_PROG_PERL_MODULES(ExtUtils::MakeMaker,,AC_MSG_ERROR(zm requires ExtUtils::MakeMaker)) |
140 | -if test "$ENABLE_MMAP" == "yes"; then | | 153 | -if test "$ENABLE_MMAP" == "yes"; then |
141 | +if test "$ENABLE_MMAP" = "yes"; then | | 154 | +if test "$ENABLE_MMAP" = "yes"; then |
142 | 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)) | | 155 | 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)) |
143 | fi | | 156 | fi |
144 | | | 157 | |