diff options
-rw-r--r-- | digikam/configure.in.in | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/digikam/configure.in.in b/digikam/configure.in.in index 4a83df0d..bff2fd95 100644 --- a/digikam/configure.in.in +++ b/digikam/configure.in.in @@ -124,18 +124,35 @@ AC_SUBST(LCMS_LIBS) # #------------------------------------------------------------------ -AC_PATH_PROG(GPHOTO_CONFIG,gphoto2-config) -AC_PATH_PROG(GPHOTO_PORT_CONFIG,gphoto2-port-config) -if test -n "${GPHOTO_CONFIG}"; then - GPHOTO_VERSION="`$GPHOTO_CONFIG --version`" - case "${GPHOTO_VERSION}" in "libgphoto2 2.5"*) CXXFLAGS="$CXXFLAGS -DHAVE_GPHOTO25";; esac - GPHOTO_CFLAGS="`$GPHOTO_CONFIG --cflags`" +KDE_PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.5, + [have_libgphoto2=yes, have_gphoto25=yes], have_libgphoto2=no) +if test "x$have_libgphoto2" = "xno"; then + KDE_PKG_CHECK_MODULES(GPHOTO2, libgphoto2, + have_libgphoto2=yes, have_libgphoto2=no) +fi +if test "x$have_libgphoto2" = "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_VERSION="`$GPHOTO_CONFIG --version`" + case "${GPHOTO_VERSION}" in "libgphoto2 2.5"*) CXXFLAGS="$CXXFLAGS -DHAVE_GPHOTO25";; esac + GPHOTO_CFLAGS="`$GPHOTO_CONFIG --cflags`" + AC_SUBST(GPHOTO_CFLAGS) + LIB_GPHOTO="`$GPHOTO_CONFIG --libs` `$GPHOTO_PORT_CONFIG --libs`" + AC_SUBST(LIB_GPHOTO) + else + AC_MSG_WARN([gPhoto2 not found.]) + DO_NOT_COMPILE="digikam $DO_NOT_COMPILE" + fi +else + if test "x$have_gphoto25" = "xyes"; then + GPHOTO_CFLAGS="$GPHOTO2_CFLAGS -DHAVE_GPHOTO25" + else + GPHOTO_CFLAGS="$GPHOTO2_CFLAGS" + fi + LIB_GPHOTO="$GPHOTO2_LIBS" AC_SUBST(GPHOTO_CFLAGS) - LIB_GPHOTO="`$GPHOTO_CONFIG --libs` `$GPHOTO_PORT_CONFIG --libs`" AC_SUBST(LIB_GPHOTO) -else - AC_MSG_WARN([gPhoto2 not found.]) - DO_NOT_COMPILE="digikam $DO_NOT_COMPILE" fi CXXFLAGS="$CXXFLAGS -DQT_CLEAN_NAMESPACE" |