The TELEMAC-MASCARET system is only compatible with the 1.2.0 version of the AED2 library, which you can download from here:
Uncompress the file, go to the aed2_1.2 directory and enter the following command to build AED2 as a shared library:
Then, to install the library to a specific folder, e.g. $HOME/opt/aed2-1.2, you need to do the following: