I did this on Fedora 21 to build mplayer with libdvdnav:
Download mplayer src from http://www.mplayerhq.hu/design7/dload.html and extract the tarball.
Install needed packages (you will need more if you need more features):
Here, pulse-audio makes sure mplayer can play sound with a system using pulse audio and libdvdnav is the feature we need here.
In the mplayer src directory:
If it reports other packages missing, you will need to install the required one.
Then build mplayer by
$ make -j4
-j number specifies how many files will make invoke to compile source files in parallel.
After it builds successfully, the
mplayer in the directory is the build mplayer. You can directly invoke it by
or install it to you system by
# make install.