X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=misc%2Fgen-pkgconfig.in;h=62d09ff61905b8ccfee6443dcd37efdb354065f0;hp=ecd8523ab66aa61b17eb349306f10e0b38cd9971;hb=93ed44d781ca36f55021e0ad55f1ce33de62f7ba;hpb=be512fa073c00c2d52567c973d16b121414870da diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in index ecd8523a..62d09ff6 100644 --- a/misc/gen-pkgconfig.in +++ b/misc/gen-pkgconfig.in @@ -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.29 2015/07/04 20:37:01 tom Exp $ ############################################################################## # Copyright (c) 2009-2014,2015 Free Software Foundation, Inc. # # # @@ -66,16 +66,16 @@ FORM_LIBRARY="${FORM_NAME}@USE_ARG_SUFFIX@" CFLAGS="@PKG_CFLAGS@" if test "$includedir" != "/usr/include" ; then - includetop=`echo "$includedir" | sed -e 's,/include/[^/]*$,/include/,'` + includetop=`echo "$includedir" | sed -e 's,/include/[^/]*$,/include,'` test "$includetop" = "/usr/include" && includetop="$includedir" - if test "x$includetop" != "$includedir" + if test "x$includetop" != "x$includedir" then CFLAGS="$CFLAGS -I${includetop}" fi CFLAGS="$CFLAGS -I\${includedir}" fi -LDFLAGS="@LDFLAGS@" +LDFLAGS= if test "$libdir" != "/usr/lib" ; then LDFLAGS="$LDFLAGS -L\${libdir}" fi @@ -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