diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-06-15 22:39:32 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-06-15 22:39:32 +0300 |
commit | ac0ef52fe407b89c7968b927c7b2b513cc13963a (patch) | |
tree | 37a0286d3c59f80229815a6d9e7925de44954d31 | |
parent | 2685230246500f96fd4d594f9b470688c562c7b9 (diff) | |
download | egawk-ac0ef52fe407b89c7968b927c7b2b513cc13963a.tar.gz egawk-ac0ef52fe407b89c7968b927c7b2b513cc13963a.tar.bz2 egawk-ac0ef52fe407b89c7968b927c7b2b513cc13963a.zip |
Configuration/Build fix for Gentoo/FreeBSD.
-rwxr-xr-x | configure | 41 | ||||
-rw-r--r-- | m4/ChangeLog | 4 | ||||
-rw-r--r-- | m4/readline.m4 | 2 |
3 files changed, 45 insertions, 2 deletions
@@ -10825,7 +10825,46 @@ $as_echo "$_found_readline" >&6; } if test $_found_readline = yes ; then case $host_os in - *bsd* ) _combo="$_combo -ltermcap" + *bsd* ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 +$as_echo_n "checking for tgetent in -ltermcap... " >&6; } +if ${ac_cv_lib_termcap_tgetent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltermcap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_termcap_tgetent=yes +else + ac_cv_lib_termcap_tgetent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 +$as_echo "$ac_cv_lib_termcap_tgetent" >&6; } +if test "x$ac_cv_lib_termcap_tgetent" = xyes; then : + _combo="$_combo -ltermcap" +fi + ;; esac diff --git a/m4/ChangeLog b/m4/ChangeLog index 62d2a6ee..9130a978 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2015-06-15 Yuta SATOH <nigoro@gentoo.gr.jp> + + * readline.m4: Add check for libtermcap on Gentoo/FreeBSD. + 2015-05-19 Arnold D. Robbins <arnold@skeeve.com> * 4.1.3: Release tar ball made. diff --git a/m4/readline.m4 b/m4/readline.m4 index 740b9c7b..5c0bb1ea 100644 --- a/m4/readline.m4 +++ b/m4/readline.m4 @@ -92,7 +92,7 @@ dnl action if not found: if test $_found_readline = yes ; then case $host_os in - *bsd* ) _combo="$_combo -ltermcap" + *bsd* ) AC_CHECK_LIB(termcap, tgetent, _combo="$_combo -ltermcap") ;; esac AC_DEFINE(HAVE_LIBREADLINE,1, |