gphoto2.ds: On Solaris Blastwave's libgphoto2.so needs libintl.so.
Francois Gouget
fgouget at codeweavers.com
Sun Jul 20 15:45:33 CDT 2008
---
Blastwave's 'gphoto2-config --libs' does not say that we need to link
with libintl.so when linking with libgphoto2.so. In a way it's normal as
this dependency does not come from libgphoto2 itself, but from one of
the libraries it links with. I don't think libintl is available
everywhere so I made this patch that first tries to link without it, and
then again with.
configure | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 8 +++++-
2 files changed, 82 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 20b9b40..8ecad9c 100755
--- a/configure
+++ b/configure
@@ -13553,6 +13553,81 @@ _ACEOF
GPHOTO2INCL="$ac_gphoto2_incl"
+else
+ unset ac_cv_lib_gphoto2_gp_camera_new
+ { echo "$as_me:$LINENO: checking for gp_camera_new in -lgphoto2" >&5
+echo $ECHO_N "checking for gp_camera_new in -lgphoto2... $ECHO_C" >&6; }
+if test "${ac_cv_lib_gphoto2_gp_camera_new+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgphoto2 $GPHOTO2LIBS -lintl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gp_camera_new ();
+int
+main ()
+{
+return gp_camera_new ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_gphoto2_gp_camera_new=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_gphoto2_gp_camera_new=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_gphoto2_gp_camera_new" >&5
+echo "${ECHO_T}$ac_cv_lib_gphoto2_gp_camera_new" >&6; }
+if test $ac_cv_lib_gphoto2_gp_camera_new = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GPHOTO2 1
+_ACEOF
+
+ GPHOTO2LIBS="$ac_gphoto2_libs -lintl"
+
+ GPHOTO2INCL="$ac_gphoto2_incl"
+
+fi
+
fi
fi
diff --git a/configure.ac b/configure.ac
index 23cff81..ae6c1b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -950,7 +950,13 @@ then
[AC_CHECK_LIB(gphoto2,gp_camera_new,
[AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have libgphoto2 development environment])
AC_SUBST(GPHOTO2LIBS,"$ac_gphoto2_libs")
- AC_SUBST(GPHOTO2INCL,"$ac_gphoto2_incl")],,
+ AC_SUBST(GPHOTO2INCL,"$ac_gphoto2_incl")],
+ [unset ac_cv_lib_gphoto2_gp_camera_new
+ AC_CHECK_LIB(gphoto2,gp_camera_new,
+ [AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have libgphoto2 development environment])
+ AC_SUBST(GPHOTO2LIBS,"$ac_gphoto2_libs -lintl")
+ AC_SUBST(GPHOTO2INCL,"$ac_gphoto2_incl")],,
+ [$GPHOTO2LIBS -lintl])],
[$GPHOTO2LIBS])])
CPPFLAGS="$ac_save_CPPFLAGS"
fi
--
1.5.6.2
More information about the wine-patches
mailing list