Bugzilla – Attachment 656 Details for
Bug 321
configure does not work when cross compiling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Update to -current
openssh-crosscompile.patch (text/plain), 6.40 KB, created by
Darren Tucker
on 2004-06-22 22:35:13 AEST
(
hide
)
Description:
Update to -current
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2004-06-22 22:35:13 AEST
Size:
6.40 KB
patch
obsolete
>Index: configure.ac >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v >retrieving revision 1.221 >diff -u -p -r1.221 configure.ac >--- configure.ac 20 Jun 2004 17:37:32 -0000 1.221 >+++ configure.ac 22 Jun 2004 12:29:37 -0000 >@@ -503,7 +503,7 @@ AC_ARG_WITH(libs, > ) > > AC_MSG_CHECKING(compiler and flags for sanity) >-AC_TRY_RUN([ >+AC_RUN_IFELSE([ > #include <stdio.h> > int main(){exit(0);} > ], >@@ -511,7 +511,8 @@ int main(){exit(0);} > [ > AC_MSG_RESULT(no) > AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***]) >- ] >+ ], >+ [ AC_MSG_WARN([cross compiling: not checking compiler sanity]) ] > ) > > # Checks for header files. >@@ -716,7 +717,7 @@ AC_EGREP_CPP(FOUNDIT, > ) > > AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) >-AC_TRY_RUN( >+AC_RUN_IFELSE( > [ > #include <sys/types.h> > #include <dirent.h> >@@ -726,6 +727,10 @@ int main(void){struct dirent d;exit(size > [ > AC_MSG_RESULT(no) > AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) >+ ], >+ [ >+ AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME]) >+ AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) > ] > ) > >@@ -924,7 +929,7 @@ AC_CHECK_FUNC(getpagesize, > # Check for broken snprintf > if test "x$ac_cv_func_snprintf" = "xyes" ; then > AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) >- AC_TRY_RUN( >+ AC_RUN_IFELSE( > [ > #include <stdio.h> > int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');} >@@ -934,7 +939,8 @@ int main(void){char b[5];snprintf(b,5,"1 > AC_MSG_RESULT(no) > AC_DEFINE(BROKEN_SNPRINTF) > AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) >- ] >+ ], >+ [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ] > ) > fi > >@@ -1195,7 +1201,7 @@ AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAV > > # Determine OpenSSL header version > AC_MSG_CHECKING([OpenSSL header version]) >-AC_TRY_RUN( >+AC_RUN_IFELSE( > [ > #include <stdio.h> > #include <string.h> >@@ -1222,12 +1228,15 @@ int main(void) { > [ > AC_MSG_RESULT(not found) > AC_MSG_ERROR(OpenSSL version header not found.) >+ ], >+ [ >+ AC_MSG_WARN([cross compiling: not checking]) > ] > ) > > # Determine OpenSSL library version > AC_MSG_CHECKING([OpenSSL library version]) >-AC_TRY_RUN( >+AC_RUN_IFELSE( > [ > #include <stdio.h> > #include <string.h> >@@ -1255,12 +1264,15 @@ int main(void) { > [ > AC_MSG_RESULT(not found) > AC_MSG_ERROR(OpenSSL library not found.) >+ ], >+ [ >+ AC_MSG_WARN([cross compiling: not checking]) > ] > ) > > # Sanity check OpenSSL headers > AC_MSG_CHECKING([whether OpenSSL's headers match the library]) >-AC_TRY_RUN( >+AC_RUN_IFELSE( > [ > #include <string.h> > #include <openssl/opensslv.h> >@@ -1274,6 +1286,9 @@ int main(void) { exit(SSLeay() == OPENSS > AC_MSG_ERROR([Your OpenSSL headers do not match your library. > Check config.log for details. > Also see contrib/findssl.sh for help identifying header/library mismatches.]) >+ ], >+ [ >+ AC_MSG_WARN([cross compiling: not checking]) > ] > ) > >@@ -1294,7 +1309,7 @@ fi > > # Check wheter OpenSSL seeds itself > AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) >-AC_TRY_RUN( >+AC_RUN_IFELSE( > [ > #include <string.h> > #include <openssl/rand.h> >@@ -1309,6 +1324,12 @@ int main(void) { exit(RAND_status() == 1 > # Default to use of the rand helper if OpenSSL doesn't > # seed itself > USE_RAND_HELPER=yes >+ ], >+ [ >+ AC_MSG_WARN([cross compiling: assuming yes]) >+ # This is safe, since all recent OpenSSL versions will >+ # complain at runtime if not seeded correctly. >+ OPENSSL_SEEDS_ITSELF=yes > ] > ) > >@@ -1875,7 +1896,7 @@ if test "x$ac_cv_have_int64_t" = "xno" - > exit 1; > else > dnl test snprintf (broken on SCO w/gcc) >- AC_TRY_RUN( >+ AC_RUN_IFELSE( > [ > #include <stdio.h> > #include <string.h> >@@ -1899,7 +1920,8 @@ main() > #else > main() { exit(0); } > #endif >- ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ] >+ ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ], >+ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) > ) > fi > >@@ -2004,13 +2026,14 @@ fi > dnl make sure we're using the real structure members and not defines > AC_CACHE_CHECK([for msg_accrights field in struct msghdr], > ac_cv_have_accrights_in_msghdr, [ >- AC_TRY_RUN( >+ AC_COMPILE_IFELSE( > [ > #include <sys/types.h> > #include <sys/socket.h> > #include <sys/uio.h> > int main() { > #ifdef msg_accrights >+#error "msg_accrights is a macro" > exit(1); > #endif > struct msghdr m; >@@ -2028,13 +2051,14 @@ fi > > AC_CACHE_CHECK([for msg_control field in struct msghdr], > ac_cv_have_control_in_msghdr, [ >- AC_TRY_RUN( >+ AC_COMPILE_IFELSE( > [ > #include <sys/types.h> > #include <sys/socket.h> > #include <sys/uio.h> > int main() { > #ifdef msg_control >+#error "msg_control is a macro" > exit(1); > #endif > struct msghdr m; >@@ -2368,6 +2392,10 @@ if test ! -z "$MAIL" ; then > AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") > fi > >+if test ! -z "$cross_compiling"; then >+ AC_MSG_WARN([cross compiling: Disabling /dev/ptmx test]) >+ disable_ptmx_check=yes >+fi > if test -z "$no_dev_ptmx" ; then > if test "x$disable_ptmx_check" != "xyes" ; then > AC_CHECK_FILE("/dev/ptmx", >@@ -2378,12 +2406,17 @@ if test -z "$no_dev_ptmx" ; then > ) > fi > fi >-AC_CHECK_FILE("/dev/ptc", >- [ >- AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) >- have_dev_ptc=1 >- ] >-) >+ >+if test -z "$cross_compiling"; then >+ AC_CHECK_FILE("/dev/ptc", >+ [ >+ AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) >+ have_dev_ptc=1 >+ ] >+ ) >+else >+ AC_MSG_WARN([cross compiling: Disabling /dev/ptc test]) >+fi > > # Options from here on. Some of these are preset by platform above > AC_ARG_WITH(mantype, >@@ -2479,14 +2512,17 @@ fi > > # check for /etc/default/login and use it if present. > AC_ARG_ENABLE(etc-default-login, >- [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],, >-[ >-AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ]) >- >-if test "x$external_path_file" = "x/etc/default/login"; then >- AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN) >-fi >-]) >+ [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],, >+ [ AC_CHECK_FILE("/etc/default/login", >+ [ external_path_file=/etc/default/login ]) >+ >+ if test ! -z "$cross_compiling"; then >+ AC_MSG_WARN([cross compiling: Disabling /etc/default/login test]) >+ elif test "x$external_path_file" = "x/etc/default/login"; then >+ AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN) >+ fi >+ ] >+) > > dnl BSD systems use /etc/login.conf so --with-default-path= has no effect > if test $ac_cv_func_login_getcapbool = "yes" -a \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 321
:
123
|
124
|
655
| 656 |
657
|
710