]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
configure: let define pkg-config directory with `--with-pkgconfigdir`
authorVincent Bernat <vincent@bernat.im>
Mon, 29 Dec 2014 21:42:56 +0000 (22:42 +0100)
committerVincent Bernat <vincent@bernat.im>
Mon, 29 Dec 2014 21:42:56 +0000 (22:42 +0100)
This needs a recent version of pkg.m4. However, we provide a fallback if
not present.

Closes: #87
configure.ac
src/lib/Makefile.am

index bb1b64868a777a8d9ee590e8de2b712d994383cb..5d41df3c3eae88a398e06cafb1b3b2dee3d59a4c 100644 (file)
@@ -146,6 +146,14 @@ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [have_check=yes], [have_check=no])
 # Libevent
 lldp_CHECK_LIBEVENT
 
+# Compatibility with pkg.m4 < 0.27
+m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR],
+         [AC_ARG_WITH([pkgconfigdir],
+                      [AS_HELP_STRING([--with-pkgconfigdir],
+                      [install directory for *.pc pkg-config file])],
+                      [],[with_pkgconfigdir='$(libdir)/pkgconfig'])
+          AC_SUBST([pkgconfigdir], [${with_pkgconfigdir}])])
+
 #######################
 ### Options
 
index 63dc27d935ef16547d33106d0710c676bfbb8c51..a5b219bb35e42253b32c4fda1a9e1638ec05fbd2 100644 (file)
@@ -13,7 +13,6 @@ liblldpctl_la_LDFLAGS = -export-symbols-regex '^lldpctl_' -version-info 8:0:4
 # -version-info format is `current`:`revision`:`age`. For more details, see:
 #   http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91
 
-pkgconfigdir   = $(libdir)/pkgconfig
 pkgconfig_DATA = lldpctl.pc
 
 TEMPLATES  = lldpctl.pc