polynomial-c 15/06/30 20:31:53 Added: gawk-4.1.3-bsd_configure_readline.patch Log: Fixed build with readline support on bsd (bug #507468) (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
Revision Changes Path 1.1 sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/gawk/files/gawk-4.1.3-bsd_configure_readline.patch?rev=1.1&content-type=text/plain Index: gawk-4.1.3-bsd_configure_readline.patch =================================================================== http://git.savannah.gnu.org/cgit/gawk.git/commit/?id=ac0ef52fe407b89c7968b927c7b2b513cc13963a --- gawk-4.1.3/configure 2015-05-19 09:38:35.000000000 -0400 +++ gawk-4.1.3/configure 2015-05-19 09:38:35.000000000 -0400 @@ -10832,7 +10832,46 @@ 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 --- gawk-4.1.3/m4/readline.m4 2015-04-05 06:19:19.000000000 -0400 +++ gawk-4.1.3/m4/readline.m4 2015-04-05 06:19:19.000000000 -0400 @@ -92,7 +92,7 @@ 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,
