summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2020-02-05 19:38:25 +0100
committerSlávek Banko <[email protected]>2020-02-05 19:39:32 +0100
commit2d07cb8bc6d20653d272ef3299482679740d74ee (patch)
tree1df30d019cc4cc8631133ad92eafaac44d0b361a
parentc814fecf3e1cc98856fd909b3e52bf4e38a72bc8 (diff)
downloadkipi-plugins-2d07cb8bc6d20653d272ef3299482679740d74ee.tar.gz
kipi-plugins-2d07cb8bc6d20653d272ef3299482679740d74ee.zip
Add gphoto2 detection using pkg-config.
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 1377b2dbf017087e4ef8f8d4e40f34e844c1717b)
-rw-r--r--kipi-plugins/configure.in.in29
-rw-r--r--kipi-plugins/kameraklient/Makefile.am2
2 files changed, 21 insertions, 10 deletions
diff --git a/kipi-plugins/configure.in.in b/kipi-plugins/configure.in.in
index 49f350a..3581f0c 100644
--- a/kipi-plugins/configure.in.in
+++ b/kipi-plugins/configure.in.in
@@ -308,19 +308,30 @@ fi
have_gphoto=no
if test "x$build_gphoto" != "xno"; then
- AC_PATH_PROG(GPHOTO_CONFIG,gphoto2-config)
- AC_PATH_PROG(GPHOTO_PORT_CONFIG,gphoto2-port-config)
- if test -n "${GPHOTO_CONFIG}"; then
- GPHOTO_CFLAGS="`$GPHOTO_CONFIG --cflags`"
- AC_SUBST(GPHOTO_CFLAGS)
- LIB_GPHOTO="`$GPHOTO_CONFIG --libs` `$GPHOTO_PORT_CONFIG --libs`"
- AC_SUBST(LIB_GPHOTO)
- have_gphoto=yes
+
+ KDE_PKG_CHECK_MODULES(GPHOTO, libgphoto2,
+ have_gphoto=yes, have_gphoto=no)
+
+ if test "x$have_gphoto" != "xyes"; then
+ AC_PATH_PROG(GPHOTO_CONFIG,gphoto2-config)
+ AC_PATH_PROG(GPHOTO_PORT_CONFIG,gphoto2-port-config)
+ if test -n "${GPHOTO_CONFIG}"; then
+ GPHOTO_CFLAGS="`$GPHOTO_CONFIG --cflags`"
+ AC_SUBST(GPHOTO_CFLAGS)
+ GPHOTO_LIBS="`$GPHOTO_CONFIG --libs` `$GPHOTO_PORT_CONFIG --libs`"
+ AC_SUBST(GPHOTO_LIBS)
+ have_gphoto=yes
+ fi
+ fi
+
+ if test "x$have_gphoto" = "xyes"; then
AC_CHECK_LIB(gphoto2_port, gp_port_info_get_name, have_gphoto2_5=yes, have_gphoto2_5=no)
if test "x$have_gphoto2_5" != "xno"; then
AC_DEFINE(HAVE_GPHOTO2_5, 1, [have gphoto 2.5])
fi
- else
+ fi
+
+ if test "x$have_gphoto" != "xyes"; then
AC_MSG_WARN([gPhoto2 not found, some plugins will not be compiled.])
fi
fi
diff --git a/kipi-plugins/kameraklient/Makefile.am b/kipi-plugins/kameraklient/Makefile.am
index b01cd0d..1bfe00a 100644
--- a/kipi-plugins/kameraklient/Makefile.am
+++ b/kipi-plugins/kameraklient/Makefile.am
@@ -6,7 +6,7 @@ METASOURCES = AUTO
kde_module_LTLIBRARIES = kipiplugin_kameraklient.la
kipiplugin_kameraklient_la_DEPENDENCIES = $(LIBKIPI_LIBS_DEP)
-kipiplugin_kameraklient_la_LIBADD = $(LIB_GPHOTO) $(LIBKIPI_LIBS) $(LIB_TDEIO) $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_QT)
+kipiplugin_kameraklient_la_LIBADD = $(GPHOTO_LIBS) $(LIBKIPI_LIBS) $(LIB_TDEIO) $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_QT)
kipiplugin_kameraklient_la_LDFLAGS = $(KIPI_PLUGINS_COMMON_LDFLAGS) -module $(KDE_PLUGIN) $(all_libraries) -lkipiplugins