Bugzilla – Attachment 657 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]
Updated patch for -current, which handles the zlib test
cross.patch (text/plain), 6.24 KB, created by
Peter Ãstrand
on 2004-06-22 23:58:41 AEST
(
hide
)
Description:
Updated patch for -current, which handles the zlib test
Filename:
MIME Type:
Creator:
Peter Ãstrand
Created:
2004-06-22 23:58:41 AEST
Size:
6.24 KB
patch
obsolete
>Index: configure.ac >=================================================================== >RCS file: /cvs/openssh/configure.ac,v >retrieving revision 1.221 >diff -u -r1.221 configure.ac >--- configure.ac 20 Jun 2004 17:37:32 -0000 1.221 >+++ configure.ac 22 Jun 2004 13:56:46 -0000 >@@ -503,7 +503,7 @@ > ) > > 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 @@ > [ > 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. >@@ -637,7 +638,7 @@ > ) > > AC_MSG_CHECKING(for zlib 1.1.4 or greater) >-AC_TRY_RUN([ >+AC_RUN_IFELSE([ > #include <zlib.h> > int main() > { >@@ -662,7 +663,8 @@ > else > AC_MSG_WARN([zlib version may have security problems]) > fi >- ] >+ ], >+ [ AC_MSG_WARN([cross compiling: not checking zlib version]) ] > ) > > dnl UnixWare 2.x >@@ -716,7 +718,7 @@ > ) > > 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 +728,10 @@ > [ > 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 +930,7 @@ > # 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 +940,8 @@ > 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 +1202,7 @@ > > # Determine OpenSSL header version > AC_MSG_CHECKING([OpenSSL header version]) >-AC_TRY_RUN( >+AC_RUN_IFELSE( > [ > #include <stdio.h> > #include <string.h> >@@ -1222,12 +1229,15 @@ > [ > 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 +1265,15 @@ > [ > 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 +1287,9 @@ > 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 +1310,7 @@ > > # 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 +1325,12 @@ > # 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 +1897,7 @@ > 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 +1921,8 @@ > #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 +2027,14 @@ > 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 +2052,14 @@ > > 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 +2393,10 @@ > 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 +2407,17 @@ > ) > 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 +2513,17 @@ > > # 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
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 321
:
123
|
124
|
655
|
656
| 657 |
710