diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-10-30 20:49:19 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-10-30 20:49:19 +0200 |
commit | e982e87ced45d48d23ffc86fa0b6cf6fabfbef8d (patch) | |
tree | 769a5bc0e1ed969333e2e794710ff51759e8396b /configure | |
parent | 3b13df110f42b26417de73151eb4a03657e85de4 (diff) | |
download | egawk-e982e87ced45d48d23ffc86fa0b6cf6fabfbef8d.tar.gz egawk-e982e87ced45d48d23ffc86fa0b6cf6fabfbef8d.tar.bz2 egawk-e982e87ced45d48d23ffc86fa0b6cf6fabfbef8d.zip |
Enable cross-compiling for readline during configuring.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 34 |
1 files changed, 33 insertions, 1 deletions
@@ -10439,7 +10439,39 @@ fi $as_echo_n "checking whether readline via \"$_combo\" is present and sane... " >&6; } if test "$cross_compiling" = yes; then : - _found_readline=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +#include <readline/readline.h> +#include <readline/history.h> +int +main () +{ + + int fd; + char *line; + + close(0); + close(1); + fd = open("/dev/null", 2); /* should get fd 0 */ + dup(fd); + line = readline("giveittome> "); + + /* some printfs don't handle NULL for %s */ + printf("got <%s>\n", line ? line : "(NULL)"); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + _found_readline=yes +else + _found_readline=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext |