summaryrefslogtreecommitdiff
path: root/libgphoto2_port
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2021-10-19 05:48:21 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2021-10-25 00:18:23 +0200
commitb6e9e97fe8a12fde1aa3486be563c3362005de8e (patch)
tree199f4e44d97d3c33a657f30a3e56f20523259ddc /libgphoto2_port
parentb75bca666a9a4c4ad51c3b119c044c7f62462d85 (diff)
downloadlibgphoto2-b6e9e97fe8a12fde1aa3486be563c3362005de8e.tar.gz
sync gp-check-library.m4 between gphoto-m4 dirs
The gphoto-m4 gp-check-library.m4 has been using PKG_PROG_PKG_CONFIG since commit c1ab67b7288359066b4884d3058e712f6170da35 (2017-08-29), so this makes the libgphoto2_port/gphoto-m4 use the same code. As PKG_PROG_PKG_CONFIG provided by pkg-config's pkg.po, this means we now require that to be present - and we should better check at autoreconf time that the PKG_PROG_PKG_CONFIG macro is actually defined.
Diffstat (limited to 'libgphoto2_port')
-rw-r--r--libgphoto2_port/gphoto-m4/Makefile-files1
-rw-r--r--libgphoto2_port/gphoto-m4/gp-check-library.m49
-rw-r--r--libgphoto2_port/gphoto-m4/gp-pkg-config.m442
3 files changed, 8 insertions, 44 deletions
diff --git a/libgphoto2_port/gphoto-m4/Makefile-files b/libgphoto2_port/gphoto-m4/Makefile-files
index 737f3ad68..2a89dd2d8 100644
--- a/libgphoto2_port/gphoto-m4/Makefile-files
+++ b/libgphoto2_port/gphoto-m4/Makefile-files
@@ -23,7 +23,6 @@ EXTRA_DIST += %reldir%/gp-manual-gtk-doc.m4
EXTRA_DIST += %reldir%/gp-manual-pstoimg.m4
EXTRA_DIST += %reldir%/gp-manual-w3m.m4
EXTRA_DIST += %reldir%/gp-packaging.m4
-EXTRA_DIST += %reldir%/gp-pkg-config.m4
EXTRA_DIST += %reldir%/gp-references.m4
EXTRA_DIST += %reldir%/gp-subpackage.m4
EXTRA_DIST += %reldir%/gp-udev.m4
diff --git a/libgphoto2_port/gphoto-m4/gp-check-library.m4 b/libgphoto2_port/gphoto-m4/gp-check-library.m4
index bc97e19b0..ee9ef004b 100644
--- a/libgphoto2_port/gphoto-m4/gp-check-library.m4
+++ b/libgphoto2_port/gphoto-m4/gp-check-library.m4
@@ -95,6 +95,12 @@ else
fi
])dnl
dnl
+dnl
+m4_ifndef([PKG_PROG_PKG_CONFIG], [dnl
+ m4_fatal([PKG_PROG_PKG_CONFIG not found, do you have pkg-config installed with pkg.m4?])
+])
+dnl
+dnl
AC_DEFUN([_GP_CHECK_LIBRARY],[
# ----------------------------------------------------------------------
# [GP_CHECK_LIBRARY]([$1],[$2],[$3],
@@ -105,8 +111,9 @@ m4_ifval([$9],[dnl
])dnl
# ----------------------------------------------------------------------
dnl
+dnl
AC_REQUIRE([GP_CONFIG_MSG])dnl
-AC_REQUIRE([GP_PKG_CONFIG])dnl
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_REQUIRE([_GP_CHECK_LIBRARY_SOEXT])dnl
# Use _CFLAGS and _LIBS given to configure.
# This makes it possible to set these vars in a configure script
diff --git a/libgphoto2_port/gphoto-m4/gp-pkg-config.m4 b/libgphoto2_port/gphoto-m4/gp-pkg-config.m4
deleted file mode 100644
index 531bfe476..000000000
--- a/libgphoto2_port/gphoto-m4/gp-pkg-config.m4
+++ /dev/null
@@ -1,42 +0,0 @@
-dnl @synopsis GP_PKG_CONFIG
-dnl
-dnl If you want to set the PKG_CONFIG_PATH, best do so before
-dnl calling GP_PKG_CONFIG
-AC_DEFUN([GP_PKG_CONFIG],[
-#
-# [GP_PKG_CONFIG]
-#
-AC_ARG_VAR([PKG_CONFIG],[pkg-config package config utility])
-export PKG_CONFIG
-AC_ARG_VAR([PKG_CONFIG_PATH],[directory where pkg-config looks for *.pc files])
-export PKG_CONFIG_PATH
-
-AC_MSG_CHECKING([PKG_CONFIG_PATH])
-if test "x${PKG_CONFIG_PATH}" = "x"; then
- AC_MSG_RESULT([empty])
-else
- AC_MSG_RESULT([${PKG_CONFIG_PATH}])
-fi
-
-dnl AC_REQUIRE([PKG_CHECK_MODULES])
-AC_PATH_PROG([PKG_CONFIG],[pkg-config],[false])
-if test "$PKG_CONFIG" = "false"; then
-AC_MSG_ERROR([
-*** Build requires pkg-config
-***
-*** Possible solutions:
-*** - set PKG_CONFIG to where your pkg-config is located
-*** - set PATH to include the directory where pkg-config is installed
-*** - get it from http://freedesktop.org/software/pkgconfig/ and install it
-])
-fi
-])dnl
-
-dnl Please do not remove this:
-dnl filetype: d87b877b-80ec-447c-b042-21ec4a27c6f0
-dnl I use this to find all the different instances of this file which
-dnl are supposed to be synchronized.
-
-dnl Local Variables:
-dnl mode: autoconf
-dnl End: