1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
|
--- configure.orig Fri Sep 3 14:08:03 2004
+++ configure Fri Sep 3 14:14:34 2004
@@ -43,8 +43,8 @@
DIR_LIB=/usr/local/lib
DIR_LIBEXEC=$DIR_SBIN
DIR_SPOOL=/var/spool/hylafax
-DIR_HTML=/var/httpd/htdocs/hylafax
-DIR_CGI=/var/httpd/cgi-bin
+DIR_HTML=/usr/local/share/doc/hylafax
+DIR_CGI=/usr/local/share/doc/hylafax/cgi-bin
PATH_DPSRIP=$DIR_LIBEXEC/ps2fax.exe
PATH_IMPRIP=/usr/lib/print/psrip
HTMLPATH=/hylafax
@@ -52,9 +52,9 @@
DEFVRES=98
PAGESIZE="North American Letter"
FAXUID=uucp
-FAXGID=
-SYSUID=bin
-SYSGID=
+FAXGID=dialer
+SYSUID=root
+SYSGID=wheel
DSO=auto
GETTY=auto
HTML=no
@@ -384,7 +384,7 @@
-srcdir=*|--srcdir=*) SRCDIR="$ac_optarg";;
-target|--target) ac_prev=TARGET;;
-target=*|--target=*) TARGET="$ac_optarg" ;;
- -disable-pam|--disable-pam) DISABLE_PAM="yes" ;;
+ -disable-pam|--disable-pam) DISABLE_PAM="yes" ;;
-version|--version)
echo "This is HylaFAX configure $Revision: 1.102 $"
exit 0
@@ -1519,10 +1519,16 @@
#
CheckForLibrary()
{
+ incls=$1; shift
+ vars=$1; shift
f=$1; shift
libs="$@";
- cat>t.c<<EOF
-int t() { $f(); return 0; }
+ echo "">t.c
+ for i in $incls; do
+ echo "#include "$i>>t.c
+ done
+ cat>>t.c<<EOF
+int t() { $vars $f; return 0; }
int main(){ t(); return 0; }
EOF
capture cat t.c
@@ -1542,39 +1548,41 @@
}
if [ "$SGI2FAX" = auto ]; then
- if CheckForLibrary iopen -limage && CheckForIncludeFile gl/image.h; then
+ if CheckForLibrary "<gl/image.h>" "char *a,*b;" "iopen(a,b)" -limage && CheckForIncludeFile gl/image.h; then
Note "Looks like there is support for SGI RGB images, configuring sgi2fax."
SGI2FAX=yes
else
SGI2FAX=no
fi
fi
-if [ "$LIBMALLOC" = auto ]; then
- if CheckForLibrary mallopt -lmalloc; then
- Note "Looks like -lmalloc is here, using it for memory allocation."
- LIBMALLOC=yes
- else
+### FreeBSD have malloc in -lc, which is checked elsewhere.
+#if [ "$LIBMALLOC" = auto ]; then
+# if CheckForLibrary mallopt -lmalloc; then
+# Note "Looks like -lmalloc is here, using it for memory allocation."
+# LIBMALLOC=yes
+# else
LIBMALLOC=no
- fi
-fi
-if [ "$LIBSUN" = auto ]; then
- if CheckForLibrary getpwnam -lsun; then
- Note "Looks like -lsun is here, using it for NIS passwd & group stuff."
- LIBSUN=yes
- else
+# fi
+#fi
+### FreeBSD have getpwnam in -lc, which is checked elsewhere.
+#if [ "$LIBSUN" = auto ]; then
+# if CheckForLibrary getpwnam -lsun; then
+# Note "Looks like -lsun is here, using it for NIS passwd & group stuff."
+# LIBSUN=yes
+# else
LIBSUN=no
- fi
-fi
+# fi
+#fi
HAVE_PAM="/*#define HAVE_PAM 1*/"
PAMLIBS=""
if [ "$DISABLE_PAM" != "yes" ]; then
Note "Checking for PAM (Pluggable Authentication Module) support"
- CheckForLibrary pam_authenticate -lpam &&
- CheckForLibrary misc_conv -lpam_misc -lpam &&
+ CheckForLibrary "<sys/types.h> <security/pam_appl.h>" "pam_handle_t *a; int b;" "pam_authenticate(a,b)" -lpam &&
+ CheckForLibrary "<security/pam_misc.h>" "int a; const struct pam_message **b; struct pam_response **c; void *d;" "misc_conv(a,b,c,d)" -lpam &&
CheckForIncludeFile security/pam_appl.h &&
CheckForIncludeFile security/pam_misc.h && {
HAVE_PAM="#define HAVE_PAM 1"
- PAMLIBS="-lpam -lpam_misc"
+ PAMLIBS="-lpam"
}
if [ "x$PAMLIBS" = "x" ]; then
Note "... not found. Disabling PAM support"
@@ -1584,25 +1592,25 @@
else
Note "Disabling PAM support"
fi
-CheckForLibrary crypt -lc || {
+CheckForLibrary "<unistd.h>" "const char *a,*b;" "crypt(a,b)" -lc || {
#
# FreeBSD-2.1 in particular needs -lcrypt.
# SCO sometime has -lcrypt_d (domestic) and
# sometimes -lcrypt_i (import?)
#
for i in -lcrypt -lcrypt_d -lcrypt_i; do
- if CheckForLibrary crypt $i; then
+ if CheckForLibrary "" "" "crypt()" $i; then
Note "Looks like $i is needed for crypt."
MACHDEPLIBS="$MACHDEPLIBS $i"
break;
fi
done
}
-CheckForLibrary strftime -lc || {
+CheckForLibrary "<sys/types.h> <time.h>" "char *a; size_t b; const char *c; const struct tm *d;" "strftime(a,b,c,d)" -lc || {
#
# SCO has strftime in -lintl.
#
- if CheckForLibrary strftime -lintl; then
+ if CheckForLibrary "" "" "strftime()" -lintl; then
Note "Looks like -lintl is needed for strftime."
MACHDEPLIBS="$MACHDEPLIBS -lintl"
else
@@ -1620,18 +1628,18 @@
boom
fi
}
-CheckForLibrary socket -lc || {
+CheckForLibrary "<sys/types.h> <sys/socket.h>" "int a,b,c;" "socket(a,b,c)" -lc || {
#
# Socket support is not in normal C library, check
# for SVR4-style networking w/ -lsocket & -lnsl
#
- if CheckForLibrary socket -lsocket -lnsl; then
+ if CheckForLibrary "" "" "socket()" -lsocket -lnsl; then
Note "Looks like -lsocket & -lnsl are needed for socket support."
MACHDEPLIBS="$MACHDEPLIBS -lsocket -lnsl"
- elif CheckForLibrary socket -linet -lnsl_s; then
+ elif CheckForLibrary "" "" "socket()" -linet -lnsl_s; then
Note "Looks like -linet & -lnsl_s are needed for socket support."
MACHDEPLIBS="$MACHDEPLIBS -linet -lnsl_s"
- elif CheckForLibrary socket -lsocket; then
+ elif CheckForLibrary "" "" "socket()" -lsocket; then
Note "Looks like -lsocket is needed for socket support."
MACHDEPLIBS="$MACHDEPLIBS -lsocket"
else
@@ -1650,39 +1658,43 @@
boom
fi
}
-if CheckForLibrary logwtmp -lutil; then
+if CheckForLibrary "<sys/types.h> <libutil.h>" "const char *a,*b,*c;" "logwtmp(a,b,c)" -lutil; then
Note "Looks like -lutil is needed for wtmp file logging."
MACHDEPLIBS="$MACHDEPLIBS -lutil"
HAS_LOGWTMP=yes
else
HAS_LOGWTMP=no
fi
-CheckForLibrary ftruncate -lc || {
- CheckForLibrary chsize -lx && {
+CheckForLibrary "<unistd.h>" "int a; off_t b;" "ftruncate(a,b)" -lc || {
+ CheckForLibrary "" "" "chsize()" -lx && {
Note "Looks like -lx is needed for chsize (used to emulate ftruncate)."
MACHDEPLIBS="$MACHDEPLIBS -lx"
}
}
-CheckForLibrary flock -lc || {
- CheckForLibrary flock -lbsd && {
+CheckForLibrary "<sys/file.h>" "int a,b;" "flock(a,b)" -lc || {
+ CheckForLibrary "" "" "flock()" -lbsd && {
Note "Looks like -lbsd is needed for flock."
MACHDEPLIBS="$MACHDEPLIBS -lbsd"
}
}
-for f in openlog pututxline; do
- CheckForLibrary $f -lc || {
- CheckForLibrary $f -lgen && {
- Note "Looks like -lgen is needed for $f."
- MACHDEPLIBS="$MACHDEPLIBS -lgen"
- break;
- }
+CheckForLibrary "<syslog.h> <stdarg.h>" "const char *a; int b,c;" "openlog(a,b,c)" -lc || {
+ CheckForLibrary "" "" "openlog()" -lgen && {
+ Note "Looks like -lgen is needed for openlog."
+ MACHDEPLIBS="$MACHDEPLIBS -lgen"
}
-done
+}
+### FreeBSD do not have pututxline.
+#CheckForLibrary pututxline -lc || {
+# CheckForLibrary pututxline -lgen && {
+# Note "Looks like -lgen is needed for pututxline."
+# MACHDEPLIBS="$MACHDEPLIBS -lgen"
+# }
+#}
if [ "$ISGXX" = yes ]; then
if [ -z "$CXXRUNTIME" ]; then
- for f in memmove strdup; do
- CheckForLibrary $f -lc || {
- CheckForLibrary $f -lg++ && {
+ for f in "memmove(a,b,c)" "strdup(d)"; do
+ CheckForLibrary "<string.h>" "void *a; const void *b; size_t c; const char *d;" $f -lc || {
+ CheckForLibrary "" "" "$f()" -lg++ && {
Note "Looks like we need -lg++ for $f"
MACHDEPLIBS="$MACHDEPLIBS -lg++"
break;
@@ -1690,9 +1702,9 @@
}
done
fi
- for f in strtoul strerror memmove random; do
- CheckForLibrary $f -lc || {
- CheckForLibrary $f -liberty && {
+ for f in "strtoul(a,b,c)" "strerror(c)" "memmove(d,e,f)" "random()"; do
+ CheckForLibrary "<stdlib.h> <limits.h> <string.h>" "const char *a; char **b; int c; void *d; const void *e; size_t f;" $f -lc || {
+ CheckForLibrary "" "" "$f()" -liberty && {
Note "Looks like we need -liberty for $f"
MACHDEPLIBS="$MACHDEPLIBS -liberty"
break;
@@ -1700,12 +1712,12 @@
}
done
fi
-CheckForLibrary floor -lm && {
+CheckForLibrary "<math.h>" "double a;" "floor(a)" -lm && {
Note "Looks like -lm is the library for math functions."
MACHDEPLIBS="$MACHDEPLIBS -lm"
}
MACHDEPLIBS="$MACHDEPLIBS $CXXRUNTIME"
-test "$LIBSUN" = yes && MACHDEPLIBS="$MACHDEPLIBS -lsun"
+test "$LIBSUN" = yes && MACHDEPLIBS="$MACHDEPLIBS -lc"
test "$LIBMALLOC" = yes && MACHDEPLIBS="$MACHDEPLIBS -lmalloc"
#
@@ -2364,5 +2364,5 @@
if [ "${lib_ver}" = "3.4" ]; then
tiff_runlen_t="uint16"
- elif [ "${lib_ver}" = "3.5" -o "${lib_ver}" = "3.6" ]; then
+ elif [ "${lib_ver}" = "3.5" -o "${lib_ver}" = "3.6" -o "${lib_ver}" = "3.7" ]; then
tiff_runlen_t="uint32"
fi
@@ -2401,7 +2401,7 @@
Incompatible TIFF Library.
-HylaFAX ${VERSION} requires TIFF software distribution ver 3.4, 3.5, or
-3.6. If you do not have up to date TIFF software on your system then
-you can retrieve it from the location where you obtained this software.
+HylaFAX ${VERSION} requires TIFF software distribution ver 3.4, 3.5,
+3.6, or 3.7. If you do not have up to date TIFF software on your system
+then you can retrieve it from the location where you obtained this software.
The Home Page for version 3.5 and later is http://www.libtiff.org
EOF
@@ -2640,7 +2652,7 @@
}
CheckFuncDecl unlink 'extern int unlink(const char*);' unistd.h
CheckFuncDecl read 'extern int read(int, const void*, unsigned int);' unistd.h
- CheckFuncDecl ioctl 'extern int ioctl(int, int, ...);' unistd.h sys/ioctl.h
+ CheckFuncDecl ioctl 'extern int ioctl(int, unsigned long, ...);' sys/ioccom.h
CheckForFunc fchown && {
echo '#define HAS_FCHOWN 1'
Note "... configure use of fchown"
@@ -2852,7 +2864,7 @@
AddFuncDecl logwtmp \
'int logwtmp(const char*, const char*, const char*);'
}
- CheckForLibrary logout -lutil && {
+ CheckForLibrary "<sys/types.h> <libutil.h>" "const char *a;" "logout(a)" -lutil && {
echo '#define HAS_LOGOUT 1'
Note "... configure use of logout (BSD-style utmp support)"
CheckForFuncDecl logout utmp.h || {
@@ -4307,18 +4319,8 @@
HylaFAX configuration parameters (part 1 of 2) are:
-[ 1] Directory for applications: $DIR_BIN
-[ 2] Directory for lib data files: $DIR_LIBDATA
-[ 3] Directory for lib executables: $DIR_LIBEXEC
-[ 4] Directory for system apps: $DIR_SBIN
-[ 5] Directory for manual pages: $DIR_MAN
-[ 6] Directory for HTML documentation: $DIR_HTML
-[ 7] Directory for spooling: $DIR_SPOOL
-[ 8] Directory for uucp lock files: $DIR_LOCKS
-[ 9] Uucp lock file scheme: $LOCKS
[10] PostScript imager package: $PS
[11] PostScript imager program: $PATH_PSRIP
-[12] Manual page installation scheme: $MANSCHEME
[13] Default page size: $PAGESIZE
[14] Default vertical res (lpi): $DEFVRES
@@ -4334,16 +4336,9 @@
[15] Location of getty program: $PATH_GETTY
[16] Location of voice getty program: $PATH_VGETTY
[17] Location of sendmail program: $PATH_SENDMAIL
-[18] Location of TIFF tools: $TIFFBIN
-[19] Location of SysV init scripts: $DIR_SYSVINIT
-[20] Location of SysV start scripts: $DIR_SYSVINITSTART
-[21] Location of SysV stop scripts: $DIR_SYSVINITSTOP
-[22] Name of SysV start script: $NAME_SYSVINITSTART
-[23] Name of SysV stop script: $NAME_SYSVINITSTOP
-[24] Init script starts faxq: $FAXQ_SERVER
-[25] Init script starts hfaxd $HFAXD_SERVER
-[26] Start old protocol: $HFAXD_OLD_PROTOCOL
-[27] Start paging protocol: $HFAXD_SNPP_SERVER
+[26] Use old protocol: $HFAXD_OLD_PROTOCOL
+[27] Use paging protocol: $HFAXD_SNPP_SERVER
+
EOF
}
@@ -4444,7 +4439,7 @@
ok=skip
while [ "$ok" != y ] && [ "$ok" != yes ]; do
if [ "$ok" != skip ]; then
- for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
+ for i in 10 11 13 14 ; do
promptForParameter $i;
done
fi
@@ -4473,7 +4468,7 @@
ok=skip
while [ "$ok" != y ] && [ "$ok" != yes ]; do
if [ "$ok" != skip ]; then
- for i in 15 16 17 18 19 20 21 22 23 24 25 26 27 ; do
+ for i in 15 16 17 26 27 ; do
promptForParameter $i;
done
fi
|