Re: libpng dependency

David Juran <[email protected]>
Newsgroups gmane.comp.video.transcode.devel
Message-ID <[email protected]>
On Wed, 2007-10-17 at 10:29 +0200, Francesco Romani wrote:
> On 10/17/07, Jacob Meuser <[email protected]> wrote:
>         ultimately, lqt_png.so should probably be linked against
>         libpng,
>         but some platforms may not allow linking shared libs into
>         modules,
>         or may not be able to resolve recursive inter-library
>         dependencies
>         at run time (a needs b needs c needs d). 
>         
>         this should really be an issue for 'lqt-config --libs' or
>         'pkg-config --libs libquicktime', and whoever builds the
>         libquicktime
>         package, to make sure those commands give the needed linking
>         arguments.
> 
> Sounds good.
> I'll see what I can do on this track for 1.0.5 RC3

I went over the configure.in and added pkg-config in a few places, see
the attached patch.

-- 
David Juran
Sr. Consultant
Red Hat
+358-504-146348
pkg-config.patch (text/x-patch, 3.1 KB)
Index: configure.in
===================================================================
RCS file: /cvstc/transcode/configure.in,v
retrieving revision 1.129.2.30
diff -u -r1.129.2.30 configure.in
--- configure.in	15 Oct 2007 21:01:47 -0000	1.129.2.30
+++ configure.in	20 Oct 2007 11:53:22 -0000
@@ -610,7 +610,7 @@
     *) AC_MSG_ERROR(bad value ${enableval} for --enable-libavcodec-static) ;;
   esac],
   [enable_libavcodec_static=no])
-LIBAVCODEC_EXTRA_LIBS="$LIBAVCODEC_EXTRA_LIBS -lm -lz $PTHREAD_LIBS"
+LIBAVCODEC_EXTRA_LIBS="$LIBAVCODEC_EXTRA_LIBS $($PKG_CONFIG --libs libavcodec)"
 TC_PKG_CHECK(libavcodec, required, LIBAVCODEC, no, [ffmpeg/avcodec.h],
  avcodec, avcodec_thread_init, FFMpeg, [http://www.ffmpeg.org/])
 if test x"$have_libavcodec" = x"yes" ; then
@@ -672,7 +672,7 @@
 dnl
 dnl libmpeg2
 dnl
-LIBMPEG2_EXTRA_LIBS="$LIBMPEG2_EXTRA_LIBS -lmpeg2convert"
+LIBMPEG2_EXTRA_LIBS="$LIBMPEG2_EXTRA_LIBS $($PKG_CONFIG --libs libmpeg2convert)"
 TC_PKG_CHECK(libmpeg2, required, LIBMPEG2, no, mpeg2dec/mpeg2.h,
   mpeg2, mpeg2_init, mpeg2dec, [http://libmpeg2.sourceforge.net/])
 TC_PKG_HAVE(libmpeg2, LIBMPEG2)
@@ -924,7 +924,7 @@
 dnl
 dnl vorbis
 dnl
-VORBIS_EXTRA_LIBS="$VORBIS_EXTRA_LIBS $OGG_LIBS -lm"
+VORBIS_EXTRA_LIBS="$VORBIS_EXTRA_LIBS $($PKG_CONFIG --libs vorbis)"
 TC_PKG_CHECK(vorbis, no, VORBIS, no, [vorbis/codec.h], vorbis,
  vorbis_info_init, vorbis, [http://www.xiph.org/ogg/vorbis/])
 TC_PKG_HAVE(vorbis, VORBIS)
@@ -932,7 +932,7 @@
 dnl
 dnl theora
 dnl
-THEORA_EXTRA_LIBS="$THEORA_EXTRA_LIBS $OGG_LIBS -lm"
+THEORA_EXTRA_LIBS="$THEORA_EXTRA_LIBS $(PKG_CONFIG --libs theora)"
 TC_PKG_CHECK(theora, no, THEORA, theora-config, [theora/theora.h], theora,
  theora_info_init, theora, [http://www.theora.org/])
 TC_PKG_HAVE(theora, THEORA)
@@ -1009,7 +1009,7 @@
 dnl
 dnl libdv
 dnl
-LIBDV_EXTRA_LIBS="$LIBDV_EXTRA_LIBS $PTHREAD_LIBS -lm"
+LIBDV_EXTRA_LIBS="$LIBDV_EXTRA_LIBS $($PKG_CONFIG --libs libdv)"
 TC_PKG_CHECK(libdv, no, LIBDV, no, [libdv/dv.h], dv, dv_encoder_new,
  libdv, [http://libdv.sourceforge.net/])
 if test x"$have_libdv" = x"yes" ; then
@@ -1036,7 +1036,7 @@
 dnl
 dnl libquicktime
 dnl
-LIBQUICKTIME_EXTRA_LIBS="$LIBQUICKTIME_EXTRA_LIBS -lpng -lz $PTHREAD_LIBS -lm $LIBDV_LIBS"
+LIBQUICKTIME_EXTRA_LIBS="$LIBQUICKTIME_EXTRA_LIBS $($PKG_CONFIG --libs libquicktime)"
 TC_PKG_CHECK(libquicktime, no, LIBQUICKTIME, lqt-config, [quicktime.h],
  quicktime, lqt_rows_alloc, libquicktime,
  [http://libquicktime.sourceforge.net/])
@@ -1086,7 +1086,7 @@
 dnl
 dnl libmpeg3
 dnl
-LIBMPEG3_EXTRA_LIBS="$LIBMPEG3_EXTRA_LIBS $A52_LIBS -lm $PTHREAD_LIBS"
+LIBMPEG3_EXTRA_LIBS="$LIBMPEG3_EXTRA_LIBS $($PKG_CONFIG --libs libmpeg3)"
 TC_PKG_CHECK(libmpeg3, no, LIBMPEG3, no, none, mpeg3, mpeg3_open,
  libmpeg3, [http://heroinewarrior.com/libmpeg3/])
 if test x"$have_libmpeg3" = x"yes" ; then
@@ -1145,7 +1145,7 @@
 dnl
 dnl libxml2
 dnl
-LIBXML2_EXTRA_LIBS="$LIBXML2_EXTRA_LIBS -lz -lm"
+LIBXML2_EXTRA_LIBS="$LIBXML2_EXTRA_LIBS $($PKG_CONFIG --libs libxml-2.0)"
 TC_PKG_CHECK(libxml2, no, LIBXML2, xml2-config, [libxml/parser.h],
  xml2, xmlStrcmp, libxml-2.0, [http://xmlsoft.org])
 TC_PKG_HAVE(libxml2, LIBXML2)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.