This Python script (get_autodetect_options.py) helps with the building of a minimal, static FFMPEG.
Simply place get_autodetect_options.py within your FFMPEG source directory, e.g. ~/ffmpeg/ffmpeg-3.2.4/.
See the wiki for more details!
Alternatively, if you prefer to relax and let the building happen by itself, run the automated build script, my_tiny_ffmpeg.sh!