fontforge / libspiro

Spiro is the creation of Raph Levien. It simplifies the drawing of beautiful curves. (Migrated here from libspiro.sourceforge.net on 2013-04-20)
GNU General Public License v3.0
107 stars 25 forks source link

Fails to link to the math libraries #10

Closed jtanx closed 9 years ago

jtanx commented 9 years ago

Standard Ubuntu 14.04 distribution, gcc-4.8.2-19ubuntu1

https://gist.github.com/jtanx/706a6000e4c667ff8115

JoesCat commented 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:

AC_CHECK_FUNCS(hypot, ,[AC_MSG_FAILURE([ERROR: hypot() required but not found.],[1])])

to: AC_CHECK_FUNCS(hypot, ,[AC_MSG_FAILURE([ERROR: hypot() required but not found.],[1])])

jtanx commented 9 years ago

@JoesCat thanks, that worked.

JoesCat commented 9 years ago

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.

jtanx commented 9 years ago

Yep, I switched to AC_SEARCH_LIBS and uncommented the hypot test