On solaris 11.4, the system libc has a definition of sqrt leading configure to believe that linking libm is unnecessary. Applying a patch locally to change AC_SEARCH_LIBS([sqrt], [m]) to AC_SEARCH_LIBS([atan], [m]) fixes the problem. atan was picked at random from the symbols that couldn't be found in building temacs.