Commit 714bd045 authored by dscho's avatar dscho

link to libmp3lame only if exists

parent 89148d77
...@@ -4,8 +4,12 @@ LDADD = ../libvncclient/libvncclient.a @WSOCKLIB@ ...@@ -4,8 +4,12 @@ LDADD = ../libvncclient/libvncclient.a @WSOCKLIB@
if WITH_FFMPEG if WITH_FFMPEG
FFMPEG_HOME=@with_ffmpeg@ FFMPEG_HOME=@with_ffmpeg@
if HAVE_MP3LAME
MP3LAME_LIB=-lmp3lame
endif
vnc2mpg_CFLAGS=-I$(FFMPEG_HOME)/libavformat -I$(FFMPEG_HOME)/libavcodec vnc2mpg_CFLAGS=-I$(FFMPEG_HOME)/libavformat -I$(FFMPEG_HOME)/libavcodec
vnc2mpg_LDADD=$(LDADD) $(FFMPEG_HOME)/libavformat/libavformat.a $(FFMPEG_HOME)/libavcodec/libavcodec.a -lmp3lame -lm vnc2mpg_LDADD=$(LDADD) $(FFMPEG_HOME)/libavformat/libavformat.a $(FFMPEG_HOME)/libavcodec/libavcodec.a $(MP3LAME_LIB) -lm
FFMPEG_CLIENT=vnc2mpg FFMPEG_CLIENT=vnc2mpg
endif endif
......
...@@ -34,7 +34,10 @@ AC_ARG_WITH(ffmpeg, ...@@ -34,7 +34,10 @@ AC_ARG_WITH(ffmpeg,
[ --with-ffmpeg=dir set ffmpeg home directory],,) [ --with-ffmpeg=dir set ffmpeg home directory],,)
AC_SUBST(with_ffmpeg) AC_SUBST(with_ffmpeg)
AM_CONDITIONAL(WITH_FFMPEG, test ! -z "$with_ffmpeg") AM_CONDITIONAL(WITH_FFMPEG, test ! -z "$with_ffmpeg")
if test ! -z "$with_ffmpeg"; then
AC_CHECK_LIB(mp3lame, lame_init, HAVE_MP3LAME="true", HAVE_MP3LAME="false" )
fi
AM_CONDITIONAL(HAVE_MP3LAME, test "$HAVE_MP3LAME" = "true")
# Seem to need this dummy here to induce the 'checking for egrep... grep -E', etc. # Seem to need this dummy here to induce the 'checking for egrep... grep -E', etc.
# before it seemed to be inside the with_jpeg conditional. # before it seemed to be inside the with_jpeg conditional.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment