]> git.tue.mpg.de Git - paraslash.git/commitdiff
configure: add command line options for libmad
authorAndre Noll <maan@sipadan.fml.local>
Sun, 13 Aug 2006 11:59:55 +0000 (13:59 +0200)
committerAndre Noll <maan@sipadan.fml.local>
Sun, 13 Aug 2006 11:59:55 +0000 (13:59 +0200)
like for libfaad: --enable-mad-libs and --enable-mad-headers

Makefile.in
configure.ac

index 80a19ea3c2edcb6341899a0e5831690f658c8103..6572235cb982a1eb300ba6d3dcde82aed0e54584 100644 (file)
@@ -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@ $<
 
index 77534de2fd6bc1d09931bff9cdaf857a1945ea8f..6b1439293fa334831c73c4e87f991f8302c3c8f5 100644 (file)
@@ -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:
 ~~~~~~~~~~~~~~~~~~~~~~~~