Closed jtanx closed 9 years ago
Hi Jeremy, Some of the older distros do better with AC_CHECK instead of AC_SEARCH Seeing that you are also testing for math.h, I assume you are testing HEAD, and running into the opposite problem where AC_SEARCH is better than AC_CHECK
See if this works in configure.ac, replace: AC_CHECK_LIB([m],[cos],[AC_CHECK_HEADER([math.h],[have_libm=yes])])
with: AC_SEARCH_LIBS([cos],[m],[AC_CHECK_HEADER([math.h],[have_libm=yes])])
You can probably re-enable the hypot check in this case, since SEARCH seems to find it, while CHECK didn't. Try:
to: AC_CHECK_FUNCS(hypot, ,[AC_MSG_FAILURE([ERROR: hypot() required but not found.],[1])])
@JoesCat thanks, that worked.
Glad to know it's good. I'll assume you fixed both lines ("search" and removing the #).
I'll patch the fix in on the next update.
Yep, I switched to AC_SEARCH_LIBS and uncommented the hypot test
Standard Ubuntu 14.04 distribution, gcc-4.8.2-19ubuntu1
https://gist.github.com/jtanx/706a6000e4c667ff8115