1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
From: Adrien Maglo <magsoft@videolan.org>
Date: Fri, 21 Jul 2017 19:53:37 +0200
Subject: Autoconf: do not hard-code the hidapi dependency in the pkg-config
file
Let autoconf generate the pkg-config file has hidapi has not the same on
the different platforms (hidapi or hidapi-libusb).
Origin: upstream, 0.3.0, commit:851bf6993ce9614c249933994000915a9889b3b6
---
configure.ac | 3 ++-
pkg-config/openhmd.pc | 11 -----------
pkg-config/openhmd.pc.in | 11 +++++++++++
3 files changed, 13 insertions(+), 12 deletions(-)
delete mode 100644 pkg-config/openhmd.pc
create mode 100644 pkg-config/openhmd.pc.in
diff --git a/configure.ac b/configure.ac
index 23a1ffb..19ec8e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,7 @@ PKG_PROG_PKG_CONFIG([0.24])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
hidapi="hidapi"
+AC_SUBST(hidapi)
AC_SUBST(PKG_CONFIG_EXTRA_PATH, "")
AC_SUBST(EXTRA_LD_FLAGS, "")
@@ -103,5 +104,5 @@ AC_PROG_CC
AC_PROG_CC_C99
AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile tests/unittests/Makefile examples/Makefile examples/opengl/Makefile examples/simple/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile tests/unittests/Makefile examples/Makefile examples/opengl/Makefile examples/simple/Makefile pkg-config/openhmd.pc])
AC_OUTPUT
diff --git a/pkg-config/openhmd.pc b/pkg-config/openhmd.pc
deleted file mode 100644
index 638e6e0..0000000
--- a/pkg-config/openhmd.pc
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=${pcfiledir}/../..
-libdir=${prefix}/lib
-includedir=${prefix}/include/openhmd
-
-Name: openhmd
-Description: API and drivers for immersive technology devices such as HMDs
-Version: 0.0.1
-Requires: hidapi-libusb
-Conflicts:
-Libs: -L${libdir} -lopenhmd
-Cflags: -I${includedir}
diff --git a/pkg-config/openhmd.pc.in b/pkg-config/openhmd.pc.in
new file mode 100644
index 0000000..00d7331
--- /dev/null
+++ b/pkg-config/openhmd.pc.in
@@ -0,0 +1,11 @@
+prefix=${pcfiledir}/../..
+libdir=${prefix}/lib
+includedir=${prefix}/include/openhmd
+
+Name: openhmd
+Description: API and drivers for immersive technology devices such as HMDs
+Version: 0.0.1
+Requires: @hidapi@
+Conflicts:
+Libs: -L${libdir} -lopenhmd -l@hidapi@
+Cflags: -I${includedir}
|