#!@SHELL@
-# $Id: gen-pkgconfig.in,v 1.26 2015/05/02 15:50:27 tom Exp $
+# $Id: gen-pkgconfig.in,v 1.33 2018/01/01 22:51:23 tom Exp $
##############################################################################
-# Copyright (c) 2009-2014,2015 Free Software Foundation, Inc. #
+# Copyright (c) 2009-2015,2018 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
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
# 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*)
- NEED_TINFO=yes
- ;;
- esac
- case "x$LDFLAGS" in
- (*,-rpath,*)
- ;;
- (*)
- NEED_TINFO=yes
- ;;
- esac
+ NEED_TINFO=yes
fi
for name in @PC_MODULES_TO_MAKE@
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
Name: ${name}${suffix}
Description: $desc
Version: \${version}
-URL: http://invisible-island.net/ncurses
+URL: https://invisible-island.net/ncurses
Requires.private: $reqs
Libs: $LDFLAGS $LIBS
-Libs.private: @LIBS@
+Libs.private: @LIBS@ @PTHREAD@
Cflags: $CFLAGS
EOF