summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-02-05 19:38:25 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-02-05 19:38:25 +0100
commit1377b2dbf017087e4ef8f8d4e40f34e844c1717b (patch)
tree6c408a12f90869b12239b8e057d1091e2e00bccc
parent59f924fd3822e5887777a7d3b3f5c5d315ef49ce (diff)
downloadkipi-plugins-1377b2db.zip
kipi-plugins-1377b2db.tar.gz
Add gphoto2 detection using pkg-config.HEADmaster
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-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 7963aee..809f2e1 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 e6ff049..b5b6c5c 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_TQT)
+kipiplugin_kameraklient_la_LIBADD = $(GPHOTO_LIBS) $(LIBKIPI_LIBS) $(LIB_TDEIO) $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_TQT)
kipiplugin_kameraklient_la_LDFLAGS = $(KIPI_PLUGINS_COMMON_LDFLAGS) -module $(KDE_PLUGIN) $(all_libraries) -lkipiplugins