summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-10-17 23:29:09 +1000
committerDarren Tucker <dtucker@zip.com.au>2005-10-17 23:29:09 +1000
commit314c1be7e2b236dab8c3967669d35547a1a7229f (patch)
tree5c0eac4e9fa9d5403092d6c7de27e998026f8740
parentf99940bb9fb475c92f81d36224245b9e721d248d (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@.
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac69
2 files changed, 47 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 114489f2..55b1a531 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20051017
+ - (dtucker) [configure.ac] Bug #1097: Fix configure for cross-compiling.
+ /etc/default/login report and testing from aabaker at iee.org, corrections
+ from tim@.
+
20051008
- (dtucker) [configure.ac] Bug #1098: define $MAIL for HP-UX; report from
brian.smith at agilent com.
@@ -3034,4 +3039,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3887.2.11 2005/10/08 02:06:30 dtucker Exp $
+$Id: ChangeLog,v 1.3887.2.12 2005/10/17 13:29:09 dtucker Exp $
diff --git a/configure.ac b/configure.ac
index 73b0295e..da077454 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.292.2.4 2005/10/08 02:06:30 dtucker Exp $
+# $Id: configure.ac,v 1.292.2.5 2005/10/17 13:29:10 dtucker Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -717,8 +717,8 @@ AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
ac_cv_have_broken_dirname, [
save_LIBS="$LIBS"
LIBS="$LIBS -lgen"
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <libgen.h>
#include <string.h>
@@ -733,9 +733,10 @@ int main(int argc, char **argv) {
exit(0);
}
}
- ],
+ ]])],
+ [ ac_cv_have_broken_dirname="no" ],
+ [ ac_cv_have_broken_dirname="yes" ],
[ ac_cv_have_broken_dirname="no" ],
- [ ac_cv_have_broken_dirname="yes" ]
)
LIBS="$save_LIBS"
])
@@ -942,12 +943,12 @@ AC_ARG_WITH(skey,
SKEY_MSG="yes"
AC_MSG_CHECKING([for s/key support])
- AC_TRY_RUN(
- [
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([[
#include <stdio.h>
#include <skey.h>
int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
- ],
+ ]])],
[AC_MSG_RESULT(yes)],
[
AC_MSG_RESULT(no)
@@ -1306,15 +1307,15 @@ fi
dnl see whether mkstemp() requires XXXXXX
if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
AC_MSG_CHECKING([for (overly) strict mkstemp])
-AC_TRY_RUN(
- [
+AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <stdlib.h>
main() { char template[]="conftest.mkstemp-test";
if (mkstemp(template) == -1)
exit(1);
unlink(template); exit(0);
}
- ],
+ ]])],
[
AC_MSG_RESULT(no)
],
@@ -1332,8 +1333,8 @@ fi
dnl make sure that openpty does not reacquire controlling terminal
if test ! -z "$check_for_openpty_ctty_bug"; then
AC_MSG_CHECKING(if openpty correctly handles controlling tty)
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <stdio.h>
#include <sys/fcntl.h>
#include <sys/types.h>
@@ -1365,13 +1366,16 @@ main()
exit(0); /* Did not acquire ctty: OK */
}
}
- ],
+ ]])],
[
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
AC_DEFINE(SSHD_ACQUIRES_CTTY)
+ ],
+ [
+ AC_MSG_RESULT(cross-compiling, assuming yes)
]
)
fi
@@ -1379,8 +1383,8 @@ fi
if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
AC_MSG_CHECKING(if getaddrinfo seems to work)
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <stdio.h>
#include <sys/socket.h>
#include <netdb.h>
@@ -1434,13 +1438,16 @@ main(void)
}
exit(0);
}
- ],
+ ]])],
[
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BROKEN_GETADDRINFO)
+ ],
+ [
+ AC_MSG_RESULT(cross-compiling, assuming yes)
]
)
fi
@@ -1448,8 +1455,8 @@ fi
if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
AC_MSG_CHECKING(if getaddrinfo seems to work)
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <stdio.h>
#include <sys/socket.h>
#include <netdb.h>
@@ -1491,7 +1498,7 @@ main(void)
}
exit(0);
}
- ],
+ ]])],
[
AC_MSG_RESULT(yes)
AC_DEFINE(AIX_GETNAMEINFO_HACK, [],
@@ -1500,6 +1507,8 @@ main(void)
[
AC_MSG_RESULT(no)
AC_DEFINE(BROKEN_GETADDRINFO)
+ ],
+ AC_MSG_RESULT(cross-compiling, assuming no)
]
)
fi
@@ -2962,16 +2971,19 @@ AC_ARG_ENABLE(etc-default-login,
else
etc_default_login=yes
fi ],
- [ etc_default_login=yes ]
+ [ if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
+ then
+ AC_MSG_WARN([cross compiling: not checking /etc/default/login])
+ etc_default_login=no
+ else
+ etc_default_login=yes
+ fi ]
)
if test "x$etc_default_login" != "xno"; then
AC_CHECK_FILE("/etc/default/login",
[ external_path_file=/etc/default/login ])
- if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
- then
- AC_MSG_WARN([cross compiling: Disabling /etc/default/login test])
- elif test "x$external_path_file" = "x/etc/default/login"; then
+ if test "x$external_path_file" = "x/etc/default/login"; then
AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
fi
fi
@@ -3009,8 +3021,8 @@ $external_path_file .])
If PATH is defined in $external_path_file, ensure the path to scp is included,
otherwise scp will not work.])
fi
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
/* find out what STDPATH is */
#include <stdio.h>
#ifdef HAVE_PATHS_H
@@ -3042,7 +3054,8 @@ main()
exit(0);
}
- ], [ user_path=`cat conftest.stdpath` ],
+ ]])],
+ [ user_path=`cat conftest.stdpath` ],
[ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
[ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
)