From: Andre Date: Wed, 10 May 2006 22:59:19 +0000 (+0200) Subject: add configure options for libfaad X-Git-Tag: v0.2.14~141 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=18e45e829467d615860462e46fa8de3be90ca2b8;p=paraslash.git add configure options for libfaad This patch also fixes two issues in the mysql part of configure.ac. --- diff --git a/Makefile.in b/Makefile.in index 776f3cec..ee0cca6e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -139,6 +139,9 @@ grab_client.cmdline.h grab_client.cmdline.c: grab_client.ggo esac; \ gengetopt $$O --conf-parser --file-name=$(*F).cmdline --set-package="para_$(subst .cmdline,,$(*F))" --set-version="$V" < $< +aacdec.o: aacdec.c + $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< + para_recv: @recv_objs@ $(CC) @recv_objs@ -o $@ @recv_ldflags@ diff --git a/configure.ac b/configure.ac index cdef1db2..91cd2842 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,7 @@ if test -n "$enable_mysql_headers"; then fi AC_ARG_ENABLE(mysql_libs, [AC_HELP_STRING(--enable-mysql-libs=dir, [look for libmysqlclient also in dir])]) -if test -n "$enable_mysql_headers"; then +if test -n "$enable_mysql_libs"; then mysql_libs="-L$enable_mysql_libs" LDFLAGS="$LDFLAGS $mysql_libs" fi @@ -184,6 +184,7 @@ if test "$have_mysql" = "yes"; then server_ldflags="$server_ldflags $mysql_libs -lmysqlclient" server_errlist_objs="$server_errlist_objs mysql_selector" AC_SUBST(mysql_cppflags) + AC_SUBST(mysql_libs) AC_DEFINE(HAVE_MYSQL, 1, [define to 1 to turn on mysql support]) else AC_MSG_WARN([cannot build mysql-based audio file selector]) @@ -216,14 +217,28 @@ else fi ########################################################################### faad have_faad=yes +AC_ARG_ENABLE(faad_headers, [AC_HELP_STRING(--enable-faad-headers=dir, + [look for neaacdec.h also in dir])]) +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, + [look for libfaad also in dir])]) +if test -n "$enable_faad_libs"; then + faad_libs="-L$enable_faad_libs" + LDFLAGS="$LDFLAGS $faad_libs" +fi AC_CHECK_HEADER(neaacdec.h, [], have_faad=no) AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no) if test "$have_faad" = "yes"; then AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter) filter_errlist_objs="$filter_errlist_objs aacdec" audiod_errlist_objs="$audiod_errlist_objs aacdec" - filter_ldflags="$filter_ldflags -lfaad" - audiod_ldflags="$audiod_ldflags -lfaad" + filter_ldflags="$filter_ldflags $faad_libs -lfaad" + audiod_ldflags="$audiod_ldflags $faad_libs -lfaad" + AC_SUBST(faad_cppflags) + AC_SUBST(faad_libs) else AC_MSG_WARN([no aac support in para_audiod/para_filter]) fi @@ -376,7 +391,7 @@ AC_SUBST(gui_objs, add_dot_o($gui_objs)) AC_OUTPUT AC_MSG_NOTICE([creating Makefile.deps]) -gcc -MM -MG $mysql_cppflags *.c > Makefile.deps +gcc -MM -MG $mysql_cppflags $faad_cppflags *.c > Makefile.deps AC_MSG_NOTICE([ paraslash configuration: ~~~~~~~~~~~~~~~~~~~~~~~~