summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-10-17 23:29:23 +1000
committerDarren Tucker <dtucker@zip.com.au>2005-10-17 23:29:23 +1000
commit314d89e050fa43771379d05733464294ba2a9c4e (patch)
tree8fbe83c21577b71cb1f65b72bbf61f8431e82a88 /configure.ac
parent9ac1a65acb80ac607eaabcba4c9ea4e0182d8a02 (diff)
- (dtucker) [configure.ac] Bug #1097: Fix configure for cross-compiling.
/etc/default/login report and testing from aabaker at iee.org, corrections from tim@.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac69
1 files changed, 41 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index bd0352a8a..d0569df60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.301 2005/10/09 01:40:03 dtucker Exp $ 1# $Id: configure.ac,v 1.302 2005/10/17 13:29:23 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -772,8 +772,8 @@ AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
772 ac_cv_have_broken_dirname, [ 772 ac_cv_have_broken_dirname, [
773 save_LIBS="$LIBS" 773 save_LIBS="$LIBS"
774 LIBS="$LIBS -lgen" 774 LIBS="$LIBS -lgen"
775 AC_TRY_RUN( 775 AC_RUN_IFELSE(
776 [ 776 [AC_LANG_SOURCE([[
777#include <libgen.h> 777#include <libgen.h>
778#include <string.h> 778#include <string.h>
779 779
@@ -788,9 +788,10 @@ int main(int argc, char **argv) {
788 exit(0); 788 exit(0);
789 } 789 }
790} 790}
791 ], 791 ]])],
792 [ ac_cv_have_broken_dirname="no" ],
793 [ ac_cv_have_broken_dirname="yes" ],
792 [ ac_cv_have_broken_dirname="no" ], 794 [ ac_cv_have_broken_dirname="no" ],
793 [ ac_cv_have_broken_dirname="yes" ]
794 ) 795 )
795 LIBS="$save_LIBS" 796 LIBS="$save_LIBS"
796 ]) 797 ])
@@ -1005,12 +1006,12 @@ AC_ARG_WITH(skey,
1005 SKEY_MSG="yes" 1006 SKEY_MSG="yes"
1006 1007
1007 AC_MSG_CHECKING([for s/key support]) 1008 AC_MSG_CHECKING([for s/key support])
1008 AC_TRY_RUN( 1009 AC_LINK_IFELSE(
1009 [ 1010 [AC_LANG_SOURCE([[
1010#include <stdio.h> 1011#include <stdio.h>
1011#include <skey.h> 1012#include <skey.h>
1012int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); } 1013int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
1013 ], 1014 ]])],
1014 [AC_MSG_RESULT(yes)], 1015 [AC_MSG_RESULT(yes)],
1015 [ 1016 [
1016 AC_MSG_RESULT(no) 1017 AC_MSG_RESULT(no)
@@ -1380,15 +1381,15 @@ fi
1380dnl see whether mkstemp() requires XXXXXX 1381dnl see whether mkstemp() requires XXXXXX
1381if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 1382if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
1382AC_MSG_CHECKING([for (overly) strict mkstemp]) 1383AC_MSG_CHECKING([for (overly) strict mkstemp])
1383AC_TRY_RUN( 1384AC_RUN_IFELSE(
1384 [ 1385 [AC_LANG_SOURCE([[
1385#include <stdlib.h> 1386#include <stdlib.h>
1386main() { char template[]="conftest.mkstemp-test"; 1387main() { char template[]="conftest.mkstemp-test";
1387if (mkstemp(template) == -1) 1388if (mkstemp(template) == -1)
1388 exit(1); 1389 exit(1);
1389unlink(template); exit(0); 1390unlink(template); exit(0);
1390} 1391}
1391 ], 1392 ]])],
1392 [ 1393 [
1393 AC_MSG_RESULT(no) 1394 AC_MSG_RESULT(no)
1394 ], 1395 ],
@@ -1406,8 +1407,8 @@ fi
1406dnl make sure that openpty does not reacquire controlling terminal 1407dnl make sure that openpty does not reacquire controlling terminal
1407if test ! -z "$check_for_openpty_ctty_bug"; then 1408if test ! -z "$check_for_openpty_ctty_bug"; then
1408 AC_MSG_CHECKING(if openpty correctly handles controlling tty) 1409 AC_MSG_CHECKING(if openpty correctly handles controlling tty)
1409 AC_TRY_RUN( 1410 AC_RUN_IFELSE(
1410 [ 1411 [AC_LANG_SOURCE([[
1411#include <stdio.h> 1412#include <stdio.h>
1412#include <sys/fcntl.h> 1413#include <sys/fcntl.h>
1413#include <sys/types.h> 1414#include <sys/types.h>
@@ -1439,13 +1440,16 @@ main()
1439 exit(0); /* Did not acquire ctty: OK */ 1440 exit(0); /* Did not acquire ctty: OK */
1440 } 1441 }
1441} 1442}
1442 ], 1443 ]])],
1443 [ 1444 [
1444 AC_MSG_RESULT(yes) 1445 AC_MSG_RESULT(yes)
1445 ], 1446 ],
1446 [ 1447 [
1447 AC_MSG_RESULT(no) 1448 AC_MSG_RESULT(no)
1448 AC_DEFINE(SSHD_ACQUIRES_CTTY) 1449 AC_DEFINE(SSHD_ACQUIRES_CTTY)
1450 ],
1451 [
1452 AC_MSG_RESULT(cross-compiling, assuming yes)
1449 ] 1453 ]
1450 ) 1454 )
1451fi 1455fi
@@ -1453,8 +1457,8 @@ fi
1453if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 1457if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1454 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 1458 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
1455 AC_MSG_CHECKING(if getaddrinfo seems to work) 1459 AC_MSG_CHECKING(if getaddrinfo seems to work)
1456 AC_TRY_RUN( 1460 AC_RUN_IFELSE(
1457 [ 1461 [AC_LANG_SOURCE([[
1458#include <stdio.h> 1462#include <stdio.h>
1459#include <sys/socket.h> 1463#include <sys/socket.h>
1460#include <netdb.h> 1464#include <netdb.h>
@@ -1508,13 +1512,16 @@ main(void)
1508 } 1512 }
1509 exit(0); 1513 exit(0);
1510} 1514}
1511 ], 1515 ]])],
1512 [ 1516 [
1513 AC_MSG_RESULT(yes) 1517 AC_MSG_RESULT(yes)
1514 ], 1518 ],
1515 [ 1519 [
1516 AC_MSG_RESULT(no) 1520 AC_MSG_RESULT(no)
1517 AC_DEFINE(BROKEN_GETADDRINFO) 1521 AC_DEFINE(BROKEN_GETADDRINFO)
1522 ],
1523 [
1524 AC_MSG_RESULT(cross-compiling, assuming yes)
1518 ] 1525 ]
1519 ) 1526 )
1520fi 1527fi
@@ -1522,8 +1529,8 @@ fi
1522if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 1529if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1523 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then 1530 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
1524 AC_MSG_CHECKING(if getaddrinfo seems to work) 1531 AC_MSG_CHECKING(if getaddrinfo seems to work)
1525 AC_TRY_RUN( 1532 AC_RUN_IFELSE(
1526 [ 1533 [AC_LANG_SOURCE([[
1527#include <stdio.h> 1534#include <stdio.h>
1528#include <sys/socket.h> 1535#include <sys/socket.h>
1529#include <netdb.h> 1536#include <netdb.h>
@@ -1565,7 +1572,7 @@ main(void)
1565 } 1572 }
1566 exit(0); 1573 exit(0);
1567} 1574}
1568 ], 1575 ]])],
1569 [ 1576 [
1570 AC_MSG_RESULT(yes) 1577 AC_MSG_RESULT(yes)
1571 AC_DEFINE(AIX_GETNAMEINFO_HACK, 1, 1578 AC_DEFINE(AIX_GETNAMEINFO_HACK, 1,
@@ -1575,6 +1582,8 @@ main(void)
1575 [ 1582 [
1576 AC_MSG_RESULT(no) 1583 AC_MSG_RESULT(no)
1577 AC_DEFINE(BROKEN_GETADDRINFO) 1584 AC_DEFINE(BROKEN_GETADDRINFO)
1585 ],
1586 AC_MSG_RESULT(cross-compiling, assuming no)
1578 ] 1587 ]
1579 ) 1588 )
1580fi 1589fi
@@ -3084,16 +3093,19 @@ AC_ARG_ENABLE(etc-default-login,
3084 else 3093 else
3085 etc_default_login=yes 3094 etc_default_login=yes
3086 fi ], 3095 fi ],
3087 [ etc_default_login=yes ] 3096 [ if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
3097 then
3098 AC_MSG_WARN([cross compiling: not checking /etc/default/login])
3099 etc_default_login=no
3100 else
3101 etc_default_login=yes
3102 fi ]
3088) 3103)
3089 3104
3090if test "x$etc_default_login" != "xno"; then 3105if test "x$etc_default_login" != "xno"; then
3091 AC_CHECK_FILE("/etc/default/login", 3106 AC_CHECK_FILE("/etc/default/login",
3092 [ external_path_file=/etc/default/login ]) 3107 [ external_path_file=/etc/default/login ])
3093 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; 3108 if test "x$external_path_file" = "x/etc/default/login"; then
3094 then
3095 AC_MSG_WARN([cross compiling: Disabling /etc/default/login test])
3096 elif test "x$external_path_file" = "x/etc/default/login"; then
3097 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN, 1, 3109 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN, 1,
3098 [Define if your system has /etc/default/login]) 3110 [Define if your system has /etc/default/login])
3099 fi 3111 fi
@@ -3132,8 +3144,8 @@ $external_path_file .])
3132If PATH is defined in $external_path_file, ensure the path to scp is included, 3144If PATH is defined in $external_path_file, ensure the path to scp is included,
3133otherwise scp will not work.]) 3145otherwise scp will not work.])
3134 fi 3146 fi
3135 AC_TRY_RUN( 3147 AC_RUN_IFELSE(
3136 [ 3148 [AC_LANG_SOURCE([[
3137/* find out what STDPATH is */ 3149/* find out what STDPATH is */
3138#include <stdio.h> 3150#include <stdio.h>
3139#ifdef HAVE_PATHS_H 3151#ifdef HAVE_PATHS_H
@@ -3165,7 +3177,8 @@ main()
3165 3177
3166 exit(0); 3178 exit(0);
3167} 3179}
3168 ], [ user_path=`cat conftest.stdpath` ], 3180 ]])],
3181 [ user_path=`cat conftest.stdpath` ],
3169 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ], 3182 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
3170 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ] 3183 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
3171 ) 3184 )