From: Andre Noll Date: Sun, 13 Aug 2006 11:59:55 +0000 (+0200) Subject: configure: add command line options for libmad X-Git-Tag: v0.2.14~55 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=34dd40a9067df6ca4fe18424b73e0a968be65f6c;p=paraslash.git configure: add command line options for libmad like for libfaad: --enable-mad-libs and --enable-mad-headers --- diff --git a/Makefile.in b/Makefile.in index 80a19ea3..6572235c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -148,6 +148,9 @@ grab_client.cmdline.h grab_client.cmdline.c: grab_client.ggo --set-package="para_$(subst .cmdline,,$(*F))" \ --set-version="$V" < $< +mp3dec.o: mp3dec.c + $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $< + aacdec.o: aacdec.c $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< diff --git a/configure.ac b/configure.ac index 77534de2..6b143929 100644 --- a/configure.ac +++ b/configure.ac @@ -258,7 +258,7 @@ if test -n "$enable_faad_headers"; then faad_cppflags="-I$enable_faad_headers" CPPFLAGS="$CPPFLAGS $faad_cppflags" fi -AC_ARG_ENABLE(faad_libs, [AC_HELP_STRING(--enable-fadd-libs=dir, +AC_ARG_ENABLE(faad_libs, [AC_HELP_STRING(--enable-faad-libs=dir, [look for libfaad also in dir])]) if test -n "$enable_faad_libs"; then faad_libs="-L$enable_faad_libs" @@ -281,6 +281,18 @@ else fi ########################################################################### mad have_mad="yes" +AC_ARG_ENABLE(mad_headers, [AC_HELP_STRING(--enable-mad-headers=dir, + [look for mad.h also in dir])]) +if test -n "$enable_mad_headers"; then + mad_cppflags="-I$enable_mad_headers" + CPPFLAGS="$CPPFLAGS $mad_cppflags" +fi +AC_ARG_ENABLE(mad_libs, [AC_HELP_STRING(--enable-mad-libs=dir, + [look for libmad also in dir])]) +if test -n "$enable_mad_libs"; then + mad_libs="-L$enable_mad_libs" + LDFLAGS="$LDFLAGS $mad_libs" +fi AC_CHECK_HEADERS([mad.h], [], [ have_mad="no" ]) @@ -291,8 +303,10 @@ if test "$have_mad" = "yes"; then AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter) filter_errlist_objs="$filter_errlist_objs mp3dec" audiod_errlist_objs="$audiod_errlist_objs mp3dec" - filter_ldflags="$filter_ldflags -lmad" - audiod_ldflags="$audiod_ldflags -lmad" + filter_ldflags="$filter_ldflags $mad_libs -lmad" + audiod_ldflags="$audiod_ldflags $mad_libs -lmad" + AC_SUBST(mad_cppflags) + AC_SUBST(mad_libs) else AC_MSG_WARN([no mp3dec support in para_audiod/para_filter]) fi @@ -444,7 +458,7 @@ AC_SUBST(gui_objs, add_dot_o($gui_objs)) AC_OUTPUT AC_MSG_NOTICE([creating Makefile.deps]) -gcc -MM -MG $mysql_cppflags $faad_cppflags *.c > Makefile.deps +gcc -MM -MG $mysql_cppflags $faad_cppflags $mad_cppflags *.c > Makefile.deps AC_MSG_NOTICE([ paraslash configuration: ~~~~~~~~~~~~~~~~~~~~~~~~