[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Library directory missing in pkg-config files
From: |
Michał Liszcz |
Subject: |
Library directory missing in pkg-config files |
Date: |
Tue, 4 Oct 2022 16:29:33 +0200 |
Hi,
I'm using 6.3.20211021. I configured ncurses with a custom --prefix, I also
specified --enable-pc-files and --with-pkg-config-libdir pointing to some
directory inside the installation prefix.
Below is a generated pkg-config file installed into prefix:
# pkg-config file generated by gen-pkgconfig
# vile:makemode
prefix=prefix-ncurses
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/ncurses
abi_version=6
major_version=6
version=6.3.20211021
Name: ncurses
Description: ncurses 6.3 library
Version: ${version}
URL: https://invisible-island.net/ncurses
Requires.private:
Libs: -lncurses -ltinfo
Libs.private:
Cflags: -D_GNU_SOURCE -I${includedir} -I/prefix-ncurses/include
I am not able to link my application with ncurses because the custom library
directory is not exposed to pkg-config, i.e. this commands:
env PKG_CONFIG_PATH=/prefix-ncurses/pkgconfig pkg-config --libs ncurses
Prints:
-lncurses -ltinfo
While I think it should print:
-L/prefix-ncurses/lib -lncurses -ltinfo
I managed to fix this locally by changing misc/gen-pkgconfig.in:
- Libs: $lib_flags $LIBS
+ Libs: -L$show_libdir $lib_flags $LIBS
Could you please consider changing gen-pkgconfig.in as proposed above?
Thanks,
Michal
- Library directory missing in pkg-config files,
Michał Liszcz <=