From 4ce5e22ed2dc24e9211c4874c1dd6b05faad2a87 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 5 Jan 2020 12:25:31 +0400 Subject: [PATCH] Add support for pkg-config --- Makefile.am | 2 ++ configure.ac | 4 +++- tgvoip.pc.in | 10 ++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tgvoip.pc.in diff --git a/Makefile.am b/Makefile.am index 03c8866..a9c9715 100644 --- a/Makefile.am +++ b/Makefile.am @@ -755,6 +755,8 @@ libtgvoip_la_SOURCES = $(SRC) $(TGVOIP_HDRS) tgvoipincludedir = $(includedir)/tgvoip nobase_tgvoipinclude_HEADERS = $(TGVOIP_HDRS) +pkgconfig_DATA = tgvoip.pc + CXXFLAGS += -std=gnu++0x $(CFLAGS) if TARGET_OS_OSX OBJCFLAGS = $(CFLAGS) diff --git a/configure.ac b/configure.ac index 222f541..e2df927 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,8 @@ AM_INIT_AUTOMAKE([subdir-objects]) AM_SILENT_RULES([yes]) LT_INIT +PKG_INSTALLDIR + # Checks for programs. AC_PROG_CXX AC_PROG_CC @@ -109,5 +111,5 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([clock_gettime floor gettimeofday inet_ntoa memmove memset select socket sqrt strcasecmp strchr strerror strncasecmp strstr strtol strtoul uname]) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile tgvoip.pc]) AC_OUTPUT diff --git a/tgvoip.pc.in b/tgvoip.pc.in new file mode 100644 index 0000000..1ca7758 --- /dev/null +++ b/tgvoip.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: tgvoip +Description: VoIP library for Telegram clients +Version: 2.4.4 +Libs: -L${libdir} -ltgvoip +Cflags: -I${includedir}/tgvoip