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

Collapse All | Expand All

(-)configure.ac (-27 / +63 lines)
Lines 503-509 AC_ARG_WITH(libs, Link Here
503
)
503
)
504
504
505
AC_MSG_CHECKING(compiler and flags for sanity)
505
AC_MSG_CHECKING(compiler and flags for sanity)
506
AC_TRY_RUN([
506
AC_RUN_IFELSE([
507
#include <stdio.h>
507
#include <stdio.h>
508
int main(){exit(0);}
508
int main(){exit(0);}
509
	],
509
	],
Lines 511-517 int main(){exit(0);} Link Here
511
	[
511
	[
512
		AC_MSG_RESULT(no)
512
		AC_MSG_RESULT(no)
513
		AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
513
		AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
514
	]
514
	],
515
	[	AC_MSG_WARN([cross compiling: not checking compiler sanity]) ]
515
)
516
)
516
517
517
# Checks for header files.
518
# Checks for header files.
Lines 716-722 AC_EGREP_CPP(FOUNDIT, Link Here
716
)
717
)
717
718
718
AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
719
AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
719
AC_TRY_RUN(
720
AC_RUN_IFELSE(
720
	[
721
	[
721
#include <sys/types.h>
722
#include <sys/types.h>
722
#include <dirent.h>
723
#include <dirent.h>
Lines 726-731 int main(void){struct dirent d;exit(size Link Here
726
	[
727
	[
727
		AC_MSG_RESULT(no)
728
		AC_MSG_RESULT(no)
728
		AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
729
		AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
730
	],
731
	[ 
732
		AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME])
733
		AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
729
	]
734
	]
730
)
735
)
731
736
Lines 924-930 AC_CHECK_FUNC(getpagesize, Link Here
924
# Check for broken snprintf
929
# Check for broken snprintf
925
if test "x$ac_cv_func_snprintf" = "xyes" ; then
930
if test "x$ac_cv_func_snprintf" = "xyes" ; then
926
	AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
931
	AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
927
	AC_TRY_RUN(
932
	AC_RUN_IFELSE(
928
		[
933
		[
929
#include <stdio.h>
934
#include <stdio.h>
930
int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
935
int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
Lines 934-940 int main(void){char b[5];snprintf(b,5,"1 Link Here
934
			AC_MSG_RESULT(no)
939
			AC_MSG_RESULT(no)
935
			AC_DEFINE(BROKEN_SNPRINTF)
940
			AC_DEFINE(BROKEN_SNPRINTF)
936
			AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
941
			AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
937
		]
942
		],
943
		[ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ]
938
	)
944
	)
939
fi
945
fi
940
946
Lines 1195-1201 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAV Link Here
1195
1201
1196
# Determine OpenSSL header version
1202
# Determine OpenSSL header version
1197
AC_MSG_CHECKING([OpenSSL header version])
1203
AC_MSG_CHECKING([OpenSSL header version])
1198
AC_TRY_RUN(
1204
AC_RUN_IFELSE(
1199
	[
1205
	[
1200
#include <stdio.h>
1206
#include <stdio.h>
1201
#include <string.h>
1207
#include <string.h>
Lines 1222-1233 int main(void) { Link Here
1222
	[
1228
	[
1223
		AC_MSG_RESULT(not found)
1229
		AC_MSG_RESULT(not found)
1224
		AC_MSG_ERROR(OpenSSL version header not found.)
1230
		AC_MSG_ERROR(OpenSSL version header not found.)
1231
	],
1232
	[
1233
		AC_MSG_WARN([cross compiling: not checking])
1225
	]
1234
	]
1226
)
1235
)
1227
1236
1228
# Determine OpenSSL library version
1237
# Determine OpenSSL library version
1229
AC_MSG_CHECKING([OpenSSL library version])
1238
AC_MSG_CHECKING([OpenSSL library version])
1230
AC_TRY_RUN(
1239
AC_RUN_IFELSE(
1231
	[
1240
	[
1232
#include <stdio.h>
1241
#include <stdio.h>
1233
#include <string.h>
1242
#include <string.h>
Lines 1255-1266 int main(void) { Link Here
1255
	[
1264
	[
1256
		AC_MSG_RESULT(not found)
1265
		AC_MSG_RESULT(not found)
1257
		AC_MSG_ERROR(OpenSSL library not found.)
1266
		AC_MSG_ERROR(OpenSSL library not found.)
1267
	],
1268
	[
1269
		AC_MSG_WARN([cross compiling: not checking])
1258
	]
1270
	]
1259
)
1271
)
1260
1272
1261
# Sanity check OpenSSL headers
1273
# Sanity check OpenSSL headers
1262
AC_MSG_CHECKING([whether OpenSSL's headers match the library])
1274
AC_MSG_CHECKING([whether OpenSSL's headers match the library])
1263
AC_TRY_RUN(
1275
AC_RUN_IFELSE(
1264
	[
1276
	[
1265
#include <string.h>
1277
#include <string.h>
1266
#include <openssl/opensslv.h>
1278
#include <openssl/opensslv.h>
Lines 1274-1279 int main(void) { exit(SSLeay() == OPENSS Link Here
1274
		AC_MSG_ERROR([Your OpenSSL headers do not match your library.
1286
		AC_MSG_ERROR([Your OpenSSL headers do not match your library.
1275
Check config.log for details.
1287
Check config.log for details.
1276
Also see contrib/findssl.sh for help identifying header/library mismatches.])
1288
Also see contrib/findssl.sh for help identifying header/library mismatches.])
1289
	],
1290
	[
1291
		AC_MSG_WARN([cross compiling: not checking])
1277
	]
1292
	]
1278
)
1293
)
1279
1294
Lines 1294-1300 fi Link Here
1294
1309
1295
# Check wheter OpenSSL seeds itself
1310
# Check wheter OpenSSL seeds itself
1296
AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
1311
AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
1297
AC_TRY_RUN(
1312
AC_RUN_IFELSE(
1298
	[
1313
	[
1299
#include <string.h>
1314
#include <string.h>
1300
#include <openssl/rand.h>
1315
#include <openssl/rand.h>
Lines 1309-1314 int main(void) { exit(RAND_status() == 1 Link Here
1309
		# Default to use of the rand helper if OpenSSL doesn't
1324
		# Default to use of the rand helper if OpenSSL doesn't
1310
		# seed itself
1325
		# seed itself
1311
		USE_RAND_HELPER=yes
1326
		USE_RAND_HELPER=yes
1327
	],
1328
	[
1329
		AC_MSG_WARN([cross compiling: assuming yes])
1330
		# This is safe, since all recent OpenSSL versions will
1331
		# complain at runtime if not seeded correctly. 
1332
		OPENSSL_SEEDS_ITSELF=yes
1312
	]
1333
	]
1313
)
1334
)
1314
1335
Lines 1875-1881 if test "x$ac_cv_have_int64_t" = "xno" - Link Here
1875
	exit 1;
1896
	exit 1;
1876
else
1897
else
1877
dnl test snprintf (broken on SCO w/gcc)
1898
dnl test snprintf (broken on SCO w/gcc)
1878
	AC_TRY_RUN(
1899
	AC_RUN_IFELSE(
1879
		[
1900
		[
1880
#include <stdio.h>
1901
#include <stdio.h>
1881
#include <string.h>
1902
#include <string.h>
Lines 1899-1905 main() Link Here
1899
#else
1920
#else
1900
main() { exit(0); }
1921
main() { exit(0); }
1901
#endif
1922
#endif
1902
		], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1923
		], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ],
1924
		AC_MSG_WARN([cross compiling: Assuming working snprintf()])
1903
	)
1925
	)
1904
fi
1926
fi
1905
1927
Lines 2004-2016 fi Link Here
2004
dnl make sure we're using the real structure members and not defines
2026
dnl make sure we're using the real structure members and not defines
2005
AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
2027
AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
2006
		ac_cv_have_accrights_in_msghdr, [
2028
		ac_cv_have_accrights_in_msghdr, [
2007
	AC_TRY_RUN(
2029
	AC_COMPILE_IFELSE(
2008
		[
2030
		[
2009
#include <sys/types.h>
2031
#include <sys/types.h>
2010
#include <sys/socket.h>
2032
#include <sys/socket.h>
2011
#include <sys/uio.h>
2033
#include <sys/uio.h>
2012
int main() {
2034
int main() {
2013
#ifdef msg_accrights
2035
#ifdef msg_accrights
2036
#error "msg_accrights is a macro"
2014
exit(1);
2037
exit(1);
2015
#endif
2038
#endif
2016
struct msghdr m;
2039
struct msghdr m;
Lines 2028-2040 fi Link Here
2028
2051
2029
AC_CACHE_CHECK([for msg_control field in struct msghdr],
2052
AC_CACHE_CHECK([for msg_control field in struct msghdr],
2030
		ac_cv_have_control_in_msghdr, [
2053
		ac_cv_have_control_in_msghdr, [
2031
	AC_TRY_RUN(
2054
	AC_COMPILE_IFELSE(
2032
		[
2055
		[
2033
#include <sys/types.h>
2056
#include <sys/types.h>
2034
#include <sys/socket.h>
2057
#include <sys/socket.h>
2035
#include <sys/uio.h>
2058
#include <sys/uio.h>
2036
int main() {
2059
int main() {
2037
#ifdef msg_control
2060
#ifdef msg_control
2061
#error "msg_control is a macro"
2038
exit(1);
2062
exit(1);
2039
#endif
2063
#endif
2040
struct msghdr m;
2064
struct msghdr m;
Lines 2368-2373 if test ! -z "$MAIL" ; then Link Here
2368
	AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
2392
	AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
2369
fi
2393
fi
2370
2394
2395
if test ! -z "$cross_compiling"; then
2396
	AC_MSG_WARN([cross compiling: Disabling /dev/ptmx test])
2397
	disable_ptmx_check=yes
2398
fi
2371
if test -z "$no_dev_ptmx" ; then
2399
if test -z "$no_dev_ptmx" ; then
2372
	if test "x$disable_ptmx_check" != "xyes" ; then
2400
	if test "x$disable_ptmx_check" != "xyes" ; then
2373
		AC_CHECK_FILE("/dev/ptmx",
2401
		AC_CHECK_FILE("/dev/ptmx",
Lines 2378-2389 if test -z "$no_dev_ptmx" ; then Link Here
2378
		)
2406
		)
2379
	fi
2407
	fi
2380
fi
2408
fi
2381
AC_CHECK_FILE("/dev/ptc",
2409
2382
	[
2410
if test -z "$cross_compiling"; then
2383
		AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
2411
	AC_CHECK_FILE("/dev/ptc",
2384
		have_dev_ptc=1
2412
		[
2385
	]
2413
			AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
2386
)
2414
			have_dev_ptc=1
2415
		]
2416
	)
2417
else
2418
	AC_MSG_WARN([cross compiling: Disabling /dev/ptc test])
2419
fi
2387
2420
2388
# Options from here on. Some of these are preset by platform above
2421
# Options from here on. Some of these are preset by platform above
2389
AC_ARG_WITH(mantype,
2422
AC_ARG_WITH(mantype,
Lines 2479-2492 fi Link Here
2479
2512
2480
# check for /etc/default/login and use it if present.
2513
# check for /etc/default/login and use it if present.
2481
AC_ARG_ENABLE(etc-default-login,
2514
AC_ARG_ENABLE(etc-default-login,
2482
	[  --disable-etc-default-login       Disable using PATH from /etc/default/login [no]],,
2515
	[ --disable-etc-default-login       Disable using PATH from /etc/default/login [no]],,
2483
[
2516
	[ AC_CHECK_FILE("/etc/default/login",
2484
AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ])
2517
	    [ external_path_file=/etc/default/login ])
2485
2518
2486
if test "x$external_path_file" = "x/etc/default/login"; then
2519
	if test ! -z "$cross_compiling"; then
2487
	AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
2520
		AC_MSG_WARN([cross compiling: Disabling /etc/default/login test])
2488
fi
2521
	elif test "x$external_path_file" = "x/etc/default/login"; then
2489
])
2522
		AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
2523
	fi
2524
	]
2525
)
2490
2526
2491
dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2527
dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2492
if test $ac_cv_func_login_getcapbool = "yes" -a \
2528
if test $ac_cv_func_login_getcapbool = "yes" -a \

Return to bug 321