+LDFLAGS=
+if [ "$libdir" != "/usr/lib" ]; then
+ LDFLAGS="$LDFLAGS -L\${libdir}"
+fi
+if [ "x@EXTRA_LDFLAGS@" != "x" ]; then
+ LDFLAGS="$LDFLAGS @EXTRA_LDFLAGS@"
+fi
+
+# Check if we should specify the tinfo library explicitly so that terminfo
+# functions or curses variables (which also reside in tinfo) can be linked
+# using the -lncurses option.
+NEED_TINFO=no
+if [ "x@TINFO_LIBS@" != "x" ] && \
+ [ "x$TINFO_ARG_SUFFIX" != "x$MAIN_LIBRARY" ]
+then
+ NEED_TINFO=yes