View | Details | Raw Unified | Return to bug 76179 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 76179