mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
Maciej W. Rozycki made this script use a cache variable for the writable
argv test. This way, the default can be overridden better (for cross-compiles etc)
This commit is contained in:
parent
a0a5668dbd
commit
0717e4690e
18
configure.ac
18
configure.ac
@ -365,18 +365,30 @@ dnl Check if the operating system allows programs to write to their own argv[]
|
|||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
|
|
||||||
AC_MSG_CHECKING([if argv can be written to])
|
AC_MSG_CHECKING([if argv can be written to])
|
||||||
|
AC_CACHE_VAL(curl_cv_writable_argv, [
|
||||||
AC_RUN_IFELSE([[
|
AC_RUN_IFELSE([[
|
||||||
int main(int argc, char ** argv) {
|
int main(int argc, char ** argv) {
|
||||||
argv[0][0] = ' ';
|
argv[0][0] = ' ';
|
||||||
return (argv[0][0] == ' ')?0:1;
|
return (argv[0][0] == ' ')?0:1;
|
||||||
}
|
}
|
||||||
]],
|
]],
|
||||||
|
curl_cv_writable_argv=yes,
|
||||||
|
curl_cv_writable_argv=no,
|
||||||
|
curl_cv_writable_argv=cross)
|
||||||
|
])
|
||||||
|
case $curl_cv_writable_argv in
|
||||||
|
yes)
|
||||||
AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
|
AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
|
||||||
AC_MSG_RESULT(yes),
|
AC_MSG_RESULT(yes)
|
||||||
AC_MSG_RESULT(no),
|
;;
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_WARN([the previous check could not be made default was used])
|
AC_MSG_WARN([the previous check could not be made default was used])
|
||||||
)
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Check for the presence of Kerberos4 libraries and headers
|
dnl Check for the presence of Kerberos4 libraries and headers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user