File pinfo-0.6.10-tinfo.patch of Package pinfo

--- macros/curses.m4
+++ macros/curses.m4	2011-11-25 15:20:33.555146338 +0000
@@ -175,27 +175,38 @@ dnl
 AC_DEFUN([AC_SEARCH_CURSES_H], [
 	AC_MSG_CHECKING([location of curses.h file])
 
+	lib_path=$(LC_ALL=C $CC -print-search-dirs 2>/dev/null | sed -n -e 's,^libraries:[[:blank:]]*=,,p')
 	stop_searching=false
 	found_curses_h=false
+	cf_stdscr=""
+	cf_lib="lib"
+
+	case ":${lib_path}:" in
+	*:/*/lib64/*:)
+		cf_lib="lib64" ;;
+	esac
+	for lib in tinfo terminfo ncurses ncursesw ; do
+		AC_CHECK_LIB($lib, stdscr, [cf_stdscr="-l$lib"; break])
+	done
 
 	dnl  if a particular location was specified
 	if test "x$curses_location" != "xfalse"
 	then
 		dnl  check this particular location
 		AC_SEARCH_CURSES_FILE($curses_location/include, ncursesw/ncurses.h, 
-					-L$curses_location/lib -lncursesw, 
+					-L$curses_location/$cf_lib -lncursesw $cf_stdscr, 
 					-I$curses_location/include )
 		AC_SEARCH_CURSES_FILE($curses_location/include, ncursesw.h, 
-					-L$curses_location/lib -lncursesw, 
+					-L$curses_location/$cf_lib -lncursesw $cf_stdscr, 
 					-I$curses_location/include )
 		AC_SEARCH_CURSES_FILE($curses_location/include, ncurses/ncurses.h, 
-					-L$curses_location/lib -lncurses, 
+					-L$curses_location/$cf_lib -lncurses $cf_stdscr, 
 					-I$curses_location/include )
 		AC_SEARCH_CURSES_FILE($curses_location/include, ncurses.h, 
-					-L$curses_location/lib -lncurses, 
+					-L$curses_location/$cf_lib -lncurses $cf_stdscr, 
 					-I$curses_location/include )
 		AC_SEARCH_CURSES_FILE($curses_location/include, curses.h, 
-					-L$curses_location/lib -lncurses, 
+					-L$curses_location/$cf_lib -lncurses $cf_stdscr, 
 					-I$curses_location/include )
 	
 	else
@@ -203,47 +216,47 @@ AC_DEFUN([AC_SEARCH_CURSES_H], [
 
 		dnl  first preference is ncursesw
 		AC_SEARCH_CURSES_FILE(/usr/local/include, ncursesw/ncurses.h, 
-					-L/usr/local/lib -lncursesw, 
+					-L/usr/local/$cf_lib -lncursesw, 
 					-I/usr/local/include )
 		AC_SEARCH_CURSES_FILE(/usr/local/include/, ncursesw.h, 
-					-L/usr/local/lib -lncursesw, 
+					-L/usr/local/$cf_lib -lncursesw, 
 					-I/usr/local/include )
 	
 		AC_SEARCH_CURSES_FILE(/usr/include, ncursesw/ncurses.h, 
-					-L/usr/lib -lncursesw, 
+					-L/usr/$cf_lib -lncursesw, 
 					-I/usr/include )
 		AC_SEARCH_CURSES_FILE(/usr/include/, ncursesw.h, 
-					-L/usr/lib -lncursesw, 
+					-L/usr/$cf_lib -lncursesw, 
 					-I/usr/include )
 			
 		dnl  after that, look for normal ncurses
 		AC_SEARCH_CURSES_FILE(/usr/local/include, ncurses.h, 
-					-L/usr/local/lib -lncurses, 
+					-L/usr/local/$cf_lib -lncurses, 
 					-I/usr/local/include )
 		AC_SEARCH_CURSES_FILE(/usr/local/include, ncurses/ncurses.h, 
-					-L/usr/local/lib -lncurses, 
+					-L/usr/local/$cf_lib -lncurses, 
 					-I/usr/local/include )
 	
 		AC_SEARCH_CURSES_FILE(/usr/include, ncurses.h, 
-					-L/usr/lib -lncurses,
+					-L/usr/$cf_lib -lncurses,
 					-I/usr/include )
 		AC_SEARCH_CURSES_FILE(/usr/include, ncurses/ncurses.h, 
-					-L/usr/lib -lncurses, 
+					-L/usr/$cf_lib -lncurses, 
 					-I/usr/include )
 
 		dnl  after that, look for curses
 		AC_SEARCH_CURSES_FILE(/usr/local/include, curses.h, 
-					-L/usr/local/lib -lncurses, 
+					-L/usr/local/$cf_lib -lncurses, 
 					-I/usr/local/include )
 		AC_SEARCH_CURSES_FILE(/usr/local/include, curses/curses.h, 
 					-L/usr/local/lib -lncurses, 
 					-I/usr/local/include )
 	
 		AC_SEARCH_CURSES_FILE(/usr/include, curses.h, 
-					-L/usr/lib -lncurses,
+					-L/usr/$cf_lib -lncurses,
 					-I/usr/include )
 		AC_SEARCH_CURSES_FILE(/usr/include, curses/curses.h, 
-					-L/usr/lib -lncurses, 
+					-L/usr/$cf_lib -lncurses, 
 					-I/usr/include )
 	fi