Link with libm to fix unresolved symbols when linked with as-needed and add a soname to the standalone math library Patch by Sebastien Fabbro --- src/nmath/standalone/Makefile.in.orig 2010-03-17 14:43:22.000000000 +0000 +++ src/nmath/standalone/Makefile.in 2012-01-02 17:40:13.000000000 +0000 @@ -64,7 +64,8 @@ Rexeclibdir_LTLIBRARIES = $(libRmath_la) libRmath_la_SOURCES = $(SOURCES) libRmath_la_OBJECTS = $(OBJECTS:.o=.lo) -libRmath_la_LDFLAGS = +libRmath_la_LDFLAGS = -Wl,-soname=libRmath.so +libRmath_la_LIBADD = $(LIBM) CLEANFILES = Makedeps *.d *.o *.lo test $(SOURCES) DISTCLEANFILES = Makefile $(Rexeclibdir_LIBRARIES) $(Rexeclibdir_LTLIBRARIES) @@ -116,7 +117,7 @@ $(RANLIB) $@ $(libRmath_la): $(libRmath_la_OBJECTS) - $(DYLIB_LINK) -o $@ $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS) + $(DYLIB_LINK) $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS) $(libRmath_la_LIBADD) -o $@ test: $(srcdir)/test.c $(CC) -o $@ $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(srcdir)/test.c \