tools/configure: fix pkg-config install path for FreeBSD
PATCH 1/1 tools/configure: fix pkg-config install path for FreeBSD
pkg-config from FreeBSD ports doesn't have ${prefix}/share/pkgconfig in the default search path, fix this by having a PKG_INSTALLDIR variable that can be changed on a per-OS basis.
It would be best to use PKG_INSTALLDIR as defined by the pkg.m4 macro, but sadly this also reports a wrong value on FreeBSD (${libdir}/pkgconfig, which expands to /usr/local/lib/pkgconfig by default, and is also _not_ part of the default pkg-config search path).
This patch should not change the behavior for Linux installs.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Alexander Nusov <[email protected]>
--- config/FreeBSD.mk | 1 + config/Paths.mk.in | 2 ++ config/Tools.mk.in | 2 ++ tools/configure.ac | 3 +++ tools/libxl/Makefile | 4 ++-- 5 files changed, 10 insertions(+), 2 deletions(-)
config/FreeBSD.mk +1 -0
@@ -2,3 +2,4 @@ include $(XEN_ROOT)/config/StdGNU.mk # No wget on FreeBSD base system WGET = ftp +PKG_INSTALLDIR = ${prefix}/libdata/pkgconfig
config/Paths.mk.in +2 -0
@@ -56,3 +56,5 @@ XENFIRMWAREDIR := @XENFIRMWAREDIR@ XEN_CONFIG_DIR := @XEN_CONFIG_DIR@ XEN_SCRIPT_DIR := @XEN_SCRIPT_DIR@ + +PKG_INSTALLDIR := ${SHAREDIR}/pkgconfig
config/Tools.mk.in +2 -0
@@ -37,6 +37,8 @@ PTHREAD_LIBS := @PTHREAD_LIBS@ PTYFUNCS_LIBS := @PTYFUNCS_LIBS@ +PKG_INSTALLDIR := @pkgconfigdir@ + LIBNL3_LIBS := @LIBNL3_LIBS@ LIBNL3_CFLAGS := @LIBNL3_CFLAGS@ XEN_TOOLS_RPATH := @rpath@
tools/configure.ac +3 -0
@@ -436,6 +436,9 @@ AS_IF([test "x$libnl3_lib" = "xn" ], [ AC_SUBST(LIBNL3_LIBS) AC_SUBST(LIBNL3_CFLAGS) +# Replace pkg-config config dir +PKG_INSTALLDIR + fi # ! $rump AX_AVAILABLE_SYSTEMD()
tools/libxl/Makefile +2 -2
@@ -297,8 +297,8 @@ install: all $(INSTALL_DATA) libxlutil.a $(DESTDIR)$(libdir) $(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(includedir) $(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh - $(INSTALL_DATA) xenlight.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/ - $(INSTALL_DATA) xlutil.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/ + $(INSTALL_DATA) xenlight.pc $(PKG_INSTALLDIR) + $(INSTALL_DATA) xlutil.pc $(PKG_INSTALLDIR) .PHONY: clean clean:
Signature · 7 lines
2.7.4 (Apple Git-66) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 62 lines · Roger Pau Monne
pkg-config from FreeBSD ports doesn't have ${prefix}/share/pkgconfig in the default search path, fix this by having a
PKG_INSTALLDIRvariable that can be changed on a per-OS basis.It would be best to use
PKG_INSTALLDIRas defined by the pkg.m4 macro, but sadly this also reports a wrong value on FreeBSD (${libdir}/pkgconfig, which expands to/usr/local/lib/pkgconfigby default, and is also _not_ part of the default pkg-config search path).This patch should not change the behavior for Linux installs.
Signed-off-by Roger Pau Monné <[email protected]>Reported-by Alexander Nusov <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Alexander Nusov <[email protected]>--- config/FreeBSD.mk | 1 + config/Paths.mk.in | 2 ++ config/Tools.mk.in | 2 ++ tools/configure.ac | 3 +++ tools/libxl/Makefile | 4 ++-- 5 files changed, 10 insertions(+), 2 deletions(-)config/FreeBSD.mk +1
-0@@ -2,3 +2,4 @@ include $(XEN_ROOT)/config/StdGNU.mk # No wget on FreeBSD base system WGET = ftp +PKG_INSTALLDIR = ${prefix}/libdata/pkgconfigconfig/Paths.mk.in +2
-0@@ -56,3 +56,5 @@ XENFIRMWAREDIR := @XENFIRMWAREDIR@ XEN_CONFIG_DIR := @XEN_CONFIG_DIR@ XEN_SCRIPT_DIR := @XEN_SCRIPT_DIR@ + +PKG_INSTALLDIR := ${SHAREDIR}/pkgconfigconfig/Tools.mk.in +2
-0@@ -37,6 +37,8 @@ PTHREAD_LIBS := @PTHREAD_LIBS@ PTYFUNCS_LIBS := @PTYFUNCS_LIBS@ +PKG_INSTALLDIR := @pkgconfigdir@ + LIBNL3_LIBS := @LIBNL3_LIBS@ LIBNL3_CFLAGS := @LIBNL3_CFLAGS@ XEN_TOOLS_RPATH := @rpath@tools/configure.ac +0
-0
tools/configure.ac AS_IF([test "x$libnl3_lib" = "xn" ], [ · line 441
Quoted 6 lines
tools/configure.ac +3
-0@@ -436,6 +436,9 @@ AS_IF([test "x$libnl3_lib" = "xn" ], [ AC_SUBST(LIBNL3_LIBS) AC_SUBST(LIBNL3_CFLAGS) +# Replace pkg-config config dir +PKG_INSTALLDIR +
Hm, this extra chunk is wrong, I will have to resend the patch, sorry.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel