diff --git a/Makefile b/Makefile
index 47ef0226076203625f762f7d49037aca13834d0f..4ded0e4513ff21661abd4b426352bc5d64ce42d2 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,14 @@ ifeq ($(CONFIG_VORBIS),yes)
 EXTRALIBS+=-logg -lvorbis -lvorbisenc
 endif
 
+ifeq ($(CONFIG_FAAD),yes)
+ifeq ($(CONFIG_FAADBIN),yes)
+# no libs needed
+else
+EXTRALIBS += -lfaad
+endif
+endif
+
 ifeq ($(BUILD_VHOOK),yes)
 VHOOK=videohook
 INSTALLVHOOK=install-vhook
diff --git a/configure b/configure
index ce0e0ac2e28615086efad8cc6832585c02fd3b30..3ff80a5436d2e4c428d7c8779121cc995ff18552 100755
--- a/configure
+++ b/configure
@@ -297,6 +297,10 @@ for opt do
   ;;
   --enable-vorbis) vorbis="yes"
   ;;
+  --enable-faad) faad="yes"
+  ;;
+  --enable-faadbin) faadbin="yes"
+  ;;
   --disable-vhook) vhook="no"
   ;;
   --disable-simple_idct) simpleidct="no"
@@ -654,6 +658,8 @@ echo "gprof enabled    $gprof"
 echo "zlib enabled     $zlib"
 echo "mp3lame enabled  $mp3lame"
 echo "vorbis enabled   $vorbis"
+echo "faad enabled     $faad"
+echo "faadbin enabled  $faadbin"
 echo "a52 support      $a52"
 echo "a52 dlopened     $a52bin"
 echo "pp support       $pp"
@@ -852,6 +858,7 @@ fi
 
 if test "$faadbin" = "yes" ; then
   echo "#define CONFIG_FAADBIN 1" >> $TMPH
+  echo "CONFIG_FAADBIN=yes" >> config.mak
 fi
 
 if test "$win32" = "yes" ; then
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index b7ba13095df2b1ea8643c6a246276f990e637e97..0ef7e17daa1073bf691b4a98ae36346b629c7bf9 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -38,6 +38,11 @@ endif
 
 ifeq ($(CONFIG_FAAD),yes)
 OBJS+= faad.o
+ifeq ($(CONFIG_FAADBIN),yes)
+# no libs needed
+else
+EXTRALIBS += -lfaad
+endif
 endif
 
 ifeq ($(CONFIG_PP),yes)