summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-09-12 22:36:15 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-09-12 22:36:15 +1000
commit623d92f0b2ce0205d0762147cd6ecac4f922f3de (patch)
tree3bb5b01427d1f2be291fb194c8e83b3c7f78d0b3 /configure.ac
parent2aa6d3cfce738f57c31ae676e11399382bd5660e (diff)
- (dtucker) [configure.ac] Fix incorrect quoting and tests for cross-compile.
Partly by & ok djm@.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac56
1 files changed, 30 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index 9b80c6a37..1f9e4dbee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.229 2004/09/11 13:26:37 dtucker Exp $ 1# $Id: configure.ac,v 1.230 2004/09/12 12:36:16 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -506,10 +506,11 @@ AC_ARG_WITH(libs,
506) 506)
507 507
508AC_MSG_CHECKING(compiler and flags for sanity) 508AC_MSG_CHECKING(compiler and flags for sanity)
509AC_RUN_IFELSE([ 509AC_RUN_IFELSE(
510 [AC_LANG_SOURCE([
510#include <stdio.h> 511#include <stdio.h>
511int main(){exit(0);} 512int main(){exit(0);}
512 ], 513 ])],
513 [ AC_MSG_RESULT(yes) ], 514 [ AC_MSG_RESULT(yes) ],
514 [ 515 [
515 AC_MSG_RESULT(no) 516 AC_MSG_RESULT(no)
@@ -648,7 +649,7 @@ AC_ARG_WITH(zlib-version-check,
648) 649)
649 650
650AC_MSG_CHECKING(for zlib 1.1.4 or greater) 651AC_MSG_CHECKING(for zlib 1.1.4 or greater)
651AC_RUN_IFELSE([ 652AC_RUN_IFELSE([AC_LANG_SOURCE([[
652#include <zlib.h> 653#include <zlib.h>
653int main() 654int main()
654{ 655{
@@ -660,7 +661,7 @@ int main()
660 exit(0); 661 exit(0);
661 exit(2); 662 exit(2);
662} 663}
663 ], 664 ]])],
664 AC_MSG_RESULT(yes), 665 AC_MSG_RESULT(yes),
665 [ AC_MSG_RESULT(no) 666 [ AC_MSG_RESULT(no)
666 if test -z "$zlib_check_nonfatal" ; then 667 if test -z "$zlib_check_nonfatal" ; then
@@ -729,11 +730,11 @@ AC_EGREP_CPP(FOUNDIT,
729 730
730AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) 731AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
731AC_RUN_IFELSE( 732AC_RUN_IFELSE(
732 [ 733 [AC_LANG_SOURCE([[
733#include <sys/types.h> 734#include <sys/types.h>
734#include <dirent.h> 735#include <dirent.h>
735int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));} 736int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
736 ], 737 ]])],
737 [AC_MSG_RESULT(yes)], 738 [AC_MSG_RESULT(yes)],
738 [ 739 [
739 AC_MSG_RESULT(no) 740 AC_MSG_RESULT(no)
@@ -901,11 +902,12 @@ AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>])
901AC_CHECK_FUNCS(setresuid, [ 902AC_CHECK_FUNCS(setresuid, [
902 dnl Some platorms have setresuid that isn't implemented, test for this 903 dnl Some platorms have setresuid that isn't implemented, test for this
903 AC_MSG_CHECKING(if setresuid seems to work) 904 AC_MSG_CHECKING(if setresuid seems to work)
904 AC_RUN_IFELSE([ 905 AC_RUN_IFELSE(
906 [AC_LANG_SOURCE([[
905#include <stdlib.h> 907#include <stdlib.h>
906#include <errno.h> 908#include <errno.h>
907int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 909int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
908 ], 910 ]])],
909 [AC_MSG_RESULT(yes)], 911 [AC_MSG_RESULT(yes)],
910 [AC_DEFINE(BROKEN_SETRESUID) 912 [AC_DEFINE(BROKEN_SETRESUID)
911 AC_MSG_RESULT(not implemented)], 913 AC_MSG_RESULT(not implemented)],
@@ -916,11 +918,12 @@ int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
916AC_CHECK_FUNCS(setresgid, [ 918AC_CHECK_FUNCS(setresgid, [
917 dnl Some platorms have setresgid that isn't implemented, test for this 919 dnl Some platorms have setresgid that isn't implemented, test for this
918 AC_MSG_CHECKING(if setresgid seems to work) 920 AC_MSG_CHECKING(if setresgid seems to work)
919 AC_RUN_IFELSE([ 921 AC_RUN_IFELSE(
922 [AC_LANG_SOURCE([[
920#include <stdlib.h> 923#include <stdlib.h>
921#include <errno.h> 924#include <errno.h>
922int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 925int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
923 ], 926 ]])],
924 [AC_MSG_RESULT(yes)], 927 [AC_MSG_RESULT(yes)],
925 [AC_DEFINE(BROKEN_SETRESGID) 928 [AC_DEFINE(BROKEN_SETRESGID)
926 AC_MSG_RESULT(not implemented)], 929 AC_MSG_RESULT(not implemented)],
@@ -951,10 +954,10 @@ AC_CHECK_FUNC(getpagesize,
951if test "x$ac_cv_func_snprintf" = "xyes" ; then 954if test "x$ac_cv_func_snprintf" = "xyes" ; then
952 AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) 955 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
953 AC_RUN_IFELSE( 956 AC_RUN_IFELSE(
954 [ 957 [AC_LANG_SOURCE([[
955#include <stdio.h> 958#include <stdio.h>
956int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');} 959int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
957 ], 960 ]])],
958 [AC_MSG_RESULT(yes)], 961 [AC_MSG_RESULT(yes)],
959 [ 962 [
960 AC_MSG_RESULT(no) 963 AC_MSG_RESULT(no)
@@ -1223,7 +1226,7 @@ AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
1223# Determine OpenSSL header version 1226# Determine OpenSSL header version
1224AC_MSG_CHECKING([OpenSSL header version]) 1227AC_MSG_CHECKING([OpenSSL header version])
1225AC_RUN_IFELSE( 1228AC_RUN_IFELSE(
1226 [ 1229 [AC_LANG_SOURCE([[
1227#include <stdio.h> 1230#include <stdio.h>
1228#include <string.h> 1231#include <string.h>
1229#include <openssl/opensslv.h> 1232#include <openssl/opensslv.h>
@@ -1241,7 +1244,7 @@ int main(void) {
1241 1244
1242 exit(0); 1245 exit(0);
1243} 1246}
1244 ], 1247 ]])],
1245 [ 1248 [
1246 ssl_header_ver=`cat conftest.sslincver` 1249 ssl_header_ver=`cat conftest.sslincver`
1247 AC_MSG_RESULT($ssl_header_ver) 1250 AC_MSG_RESULT($ssl_header_ver)
@@ -1258,7 +1261,7 @@ int main(void) {
1258# Determine OpenSSL library version 1261# Determine OpenSSL library version
1259AC_MSG_CHECKING([OpenSSL library version]) 1262AC_MSG_CHECKING([OpenSSL library version])
1260AC_RUN_IFELSE( 1263AC_RUN_IFELSE(
1261 [ 1264 [AC_LANG_SOURCE([[
1262#include <stdio.h> 1265#include <stdio.h>
1263#include <string.h> 1266#include <string.h>
1264#include <openssl/opensslv.h> 1267#include <openssl/opensslv.h>
@@ -1277,7 +1280,7 @@ int main(void) {
1277 1280
1278 exit(0); 1281 exit(0);
1279} 1282}
1280 ], 1283 ]])],
1281 [ 1284 [
1282 ssl_library_ver=`cat conftest.ssllibver` 1285 ssl_library_ver=`cat conftest.ssllibver`
1283 AC_MSG_RESULT($ssl_library_ver) 1286 AC_MSG_RESULT($ssl_library_ver)
@@ -1294,11 +1297,11 @@ int main(void) {
1294# Sanity check OpenSSL headers 1297# Sanity check OpenSSL headers
1295AC_MSG_CHECKING([whether OpenSSL's headers match the library]) 1298AC_MSG_CHECKING([whether OpenSSL's headers match the library])
1296AC_RUN_IFELSE( 1299AC_RUN_IFELSE(
1297 [ 1300 [AC_LANG_SOURCE([[
1298#include <string.h> 1301#include <string.h>
1299#include <openssl/opensslv.h> 1302#include <openssl/opensslv.h>
1300int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); } 1303int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
1301 ], 1304 ]])],
1302 [ 1305 [
1303 AC_MSG_RESULT(yes) 1306 AC_MSG_RESULT(yes)
1304 ], 1307 ],
@@ -1331,11 +1334,11 @@ fi
1331# Check wheter OpenSSL seeds itself 1334# Check wheter OpenSSL seeds itself
1332AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) 1335AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
1333AC_RUN_IFELSE( 1336AC_RUN_IFELSE(
1334 [ 1337 [AC_LANG_SOURCE([[
1335#include <string.h> 1338#include <string.h>
1336#include <openssl/rand.h> 1339#include <openssl/rand.h>
1337int main(void) { exit(RAND_status() == 1 ? 0 : 1); } 1340int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
1338 ], 1341 ]])],
1339 [ 1342 [
1340 OPENSSL_SEEDS_ITSELF=yes 1343 OPENSSL_SEEDS_ITSELF=yes
1341 AC_MSG_RESULT(yes) 1344 AC_MSG_RESULT(yes)
@@ -1918,7 +1921,7 @@ if test "x$ac_cv_have_int64_t" = "xno" -a \
1918else 1921else
1919dnl test snprintf (broken on SCO w/gcc) 1922dnl test snprintf (broken on SCO w/gcc)
1920 AC_RUN_IFELSE( 1923 AC_RUN_IFELSE(
1921 [ 1924 [AC_LANG_SOURCE([[
1922#include <stdio.h> 1925#include <stdio.h>
1923#include <string.h> 1926#include <string.h>
1924#ifdef HAVE_SNPRINTF 1927#ifdef HAVE_SNPRINTF
@@ -1941,7 +1944,7 @@ main()
1941#else 1944#else
1942main() { exit(0); } 1945main() { exit(0); }
1943#endif 1946#endif
1944 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ], 1947 ]])], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ],
1945 AC_MSG_WARN([cross compiling: Assuming working snprintf()]) 1948 AC_MSG_WARN([cross compiling: Assuming working snprintf()])
1946 ) 1949 )
1947fi 1950fi
@@ -2413,7 +2416,7 @@ if test ! -z "$MAIL" ; then
2413 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") 2416 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
2414fi 2417fi
2415 2418
2416if test ! -z "$cross_compiling"; then 2419if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
2417 AC_MSG_WARN([cross compiling: Disabling /dev/ptmx test]) 2420 AC_MSG_WARN([cross compiling: Disabling /dev/ptmx test])
2418 disable_ptmx_check=yes 2421 disable_ptmx_check=yes
2419fi 2422fi
@@ -2428,7 +2431,7 @@ if test -z "$no_dev_ptmx" ; then
2428 fi 2431 fi
2429fi 2432fi
2430 2433
2431if test -z "$cross_compiling"; then 2434if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
2432 AC_CHECK_FILE("/dev/ptc", 2435 AC_CHECK_FILE("/dev/ptc",
2433 [ 2436 [
2434 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) 2437 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
@@ -2537,7 +2540,8 @@ AC_ARG_ENABLE(etc-default-login,
2537 [ AC_CHECK_FILE("/etc/default/login", 2540 [ AC_CHECK_FILE("/etc/default/login",
2538 [ external_path_file=/etc/default/login ]) 2541 [ external_path_file=/etc/default/login ])
2539 2542
2540 if test ! -z "$cross_compiling"; then 2543 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
2544 then
2541 AC_MSG_WARN([cross compiling: Disabling /etc/default/login test]) 2545 AC_MSG_WARN([cross compiling: Disabling /etc/default/login test])
2542 elif test "x$external_path_file" = "x/etc/default/login"; then 2546 elif test "x$external_path_file" = "x/etc/default/login"; then
2543 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN) 2547 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)