From: Vincent Bernat Date: Mon, 29 Dec 2014 21:42:56 +0000 (+0100) Subject: configure: let define pkg-config directory with `--with-pkgconfigdir` X-Git-Tag: 0.7.13~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=135ff0f7fabb8f6192e86acbf72e20f50a0bd0e7;p=thirdparty%2Flldpd.git configure: let define pkg-config directory with `--with-pkgconfigdir` This needs a recent version of pkg.m4. However, we provide a fallback if not present. Closes: #87 --- diff --git a/configure.ac b/configure.ac index bb1b6486..5d41df3c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 63dc27d9..a5b219bb 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -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