From a7533580cd092e6a71c4ed722e830da4eb884d06 Mon Sep 17 00:00:00 2001 From: Alexey Sheplyakov Date: Aug 16 2021 07:25:41 +0000 Subject: libnewt.pc: add data for static linking With this patch I can statically link a binary with libnewt without listing the required libraries manually: gcc -o test_static test.c `pkg-config --libs --cflags --static libnewt` Without this patch static linking fails due to multiple undefined references: /usr/bin/ld: /tmp/test.AcRBJp.ltrans0.ltrans.o: in function `buttonDrawIt': :(.text+0x2f0): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x307): undefined reference to `SLtt_Use_Ansi_Colors' /usr/bin/ld: :(.text+0x31b): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x338): undefined reference to `SLsmg_write_char' /usr/bin/ld: :(.text+0x341): undefined reference to `SLsmg_write_string' /usr/bin/ld: :(.text+0x34b): undefined reference to `SLsmg_write_char' /usr/bin/ld: :(.text+0x3ae): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x3cd): undefined reference to `SLsmg_write_char' /usr/bin/ld: :(.text+0x3d5): undefined reference to `SLsmg_write_string' /usr/bin/ld: :(.text+0x3df): undefined reference to `SLsmg_write_char' /usr/bin/ld: :(.text+0x3f9): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x422): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x45d): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x476): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x486): undefined reference to `SLsmg_set_color' /usr/bin/ld: /tmp/test.AcRBJp.ltrans0.ltrans.o::(.text+0x4d6): more undefined references to `SLsmg_set_color' follow [287 lines skipped] collect2: error: ld returned 1 exit status Closes: #17 --- diff --git a/libnewt.pc.in b/libnewt.pc.in index 89dc934..8ca79e1 100644 --- a/libnewt.pc.in +++ b/libnewt.pc.in @@ -6,5 +6,6 @@ includedir=@includedir@ Name: libnewt Description: A development library for text mode user interfaces Version: @VERSION@ +Requires.private: slang Libs: -L${libdir} -lnewt Cflags: -I${includedir}