                                 die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
  enabled libcaca           && require_pkg_config caca caca.h caca_create_canvas
  enabled libfaac           && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
--enabled libfdk_aac        && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
+-enabled libfdk_aac        && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
+-                             { check_cpp_condition fdk-aac/aacenc_lib.h "AACENCODER_LIB_VL0 >= 3 && AACENCODER_LIB_VL1 >= 4 && AACENCODER_LIB_VL2 >= 12" ||
+-                               die "ERROR: libfdk_aac must be installed and version must be >= 3.4.12."; }
 +enabled libfdk_aac        && require_pkg_config fdk-aac fdk-aac/aacenc_lib.h aacEncOpen
  flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
  enabled libflite          && require2 libflite "flite/flite.h" flite_init $flite_libs

 enabled libopencv         && require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader
 enabled libopenjpeg       && { check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg ||
                                check_lib openjpeg.h opj_version -lopenjpeg ||
@@ -4451,11 +4453,11 @@ enabled libschroedinger   && require_pkg_config schroedinger-1.0 schroedinger/sc
 enabled libshine          && require_pkg_config shine shine/layer3.h shine_encode_buffer
 enabled libsoxr           && require libsoxr soxr.h soxr_create -lsoxr
 enabled libssh            && require_pkg_config libssh libssh/sftp.h sftp_init

 enabled libvpx            && {
     enabled libvpx_vp8_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx ||
                                     die "ERROR: libvpx decoder version must be >=0.9.1"; }
@@ -4497,10 +4497,7 @@ enabled opencl            && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl
                              { check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
                                check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
                                die "ERROR: opencl must be installed and version must be 1.2 or compatible"; }
