]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - misc/gen-pkgconfig.in
ncurses 5.9 - patch 20150509
[ncurses.git] / misc / gen-pkgconfig.in
index ecd8523ab66aa61b17eb349306f10e0b38cd9971..586f9949e38b30369c557f4d95a4655e1d01df60 100644 (file)
@@ -1,5 +1,5 @@
 #!@SHELL@
-# $Id: gen-pkgconfig.in,v 1.26 2015/05/02 15:50:27 tom Exp $
+# $Id: gen-pkgconfig.in,v 1.27 2015/05/04 09:15:46 tom Exp $
 ##############################################################################
 # Copyright (c) 2009-2014,2015 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -87,7 +87,8 @@ fi
 # functions or curses variables (which also reside in tinfo) can be linked
 # using the -lncurses option.
 NEED_TINFO=no
-if test "x@TINFO_LIBS@" != "x"
+if test "x@TINFO_LIBS@" != "x" && \
+   test "x$TINFO_ARG_SUFFIX" != "x$MAIN_LIBRARY"
 then
        case "x$LDFLAGS" in
        (*--as-needed*)
@@ -113,7 +114,7 @@ do
 
        if test $name = $MAIN_LIBRARY ; then
                desc="$desc library"
-               test $NEED_TINFO = yes && LIBS="$LIBS -l$TINFO_NAME"
+               test $NEED_TINFO = yes && LIBS="$LIBS -l$TINFO_ARG_SUFFIX"
        elif test $name = $SUB_LIBRARY ; then
                desc="$desc terminal interface library"
        elif expr $name : ".*${CXX_NAME}.*" >/dev/null ; then