[FFmpeg-devel] [PATCH] build: check for perl presence and compile POD pages only in that case

Stefano Sabatini stefasab at gmail.com
Fri Aug 10 00:00:30 CEST 2012


On date Thursday 2012-08-09 23:48:09 +0200, Clément Bœsch encoded:
> On Thu, Aug 09, 2012 at 11:39:44PM +0200, Stefano Sabatini wrote:
> > perl is required by the texi2pod.pl script. Should avoid FATE failure on
> > Haiku, where perl is apparently not available.
> > ---
> >  configure    |    5 ++++-
> >  doc/Makefile |   10 ++++++++--
> >  2 files changed, 12 insertions(+), 3 deletions(-)
> > 
> > diff --git a/configure b/configure
> > index 6c4047f..6dc983f 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1285,6 +1285,7 @@ HAVE_LIST="
> >      mmap
> >      nanosleep
> >      PeekNamedPipe
> > +    perl
> >      pod2man
> >      poll_h
> >      posix_memalign
> > @@ -1838,7 +1839,7 @@ ffprobe_deps="avcodec avformat"
> >  ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
> >  ffserver_extralibs='$ldl'
> >  
> > -doc_deps_any="texi2html makeinfo pod2man"
> > +doc_deps_any="texi2html makeinfo perl pod2man"
> >  
> >  # tests
> >  colormatrix1_test_deps="colormatrix_filter"
> > @@ -3515,6 +3516,7 @@ enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
> >  
> >  texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
> >  makeinfo --version > /dev/null 2>&1 && enable makeinfo  || disable makeinfo
> > +perl --version > /dev/null 2>&1 && enable perl || disable perl
> >  pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
> >  
> >  check_header linux/fb.h
> > @@ -3857,6 +3859,7 @@ echo "openssl enabled           ${openssl-no}"
> >  echo "zlib enabled              ${zlib-no}"
> >  echo "bzlib enabled             ${bzlib-no}"
> >  echo "texi2html enabled         ${texi2html-no}"
> > +echo "perl enabled              ${perl-no}"
> >  echo "pod2man enabled           ${pod2man-no}"
> >  echo "makeinfo enabled          ${makeinfo-no}"
> >  test -n "$random_seed" &&
> > diff --git a/doc/Makefile b/doc/Makefile
> > index 845f5f7..16c13fc 100644
> > --- a/doc/Makefile
> > +++ b/doc/Makefile
> > @@ -11,9 +11,15 @@ HTMLPAGES   = $(PROGS-yes:%=doc/%.html)                                 \
> >  
> >  TXTPAGES    = doc/fate.txt                                              \
> >  
> > +ifdef HAVE_PERL
> > +ifdef HAVE_POD2MAN
> > +HAVE_MANPAGES=yes
> > +endif
> > +endif
> >  
> 
> Can't this be nicer?

Sure.
 
> Certainly something like adding "manpages" in the CONFIG_LIST, and add a
> manpages_deps or something like that. Which might BTW add some automatic
> magic such as --disable-manpages configure switch or something.
> 
> I'm not familiar with the build system but what you propose looks wrong.

I'm just following the current logic, with no attempt at improving it,
and it fixes the dependency problem from what I see.

If you add --enable-manpages then you'll have to add enable-htmlpages
and possibly --enable-podpages and review the current logic, which I'm
not willing to do.
-- 
FFmpeg = Freak and Fundamentalist Mastodontic Powered Eretic Gadget


More information about the ffmpeg-devel mailing list