--- ./src/Makefile.am.orig
+++ ./src/Makefile.am
@@ -76,7 +76,7 @@
 	skeleton.h
 
 recordmydesktop_CPPFLAGS = -D_THREAD_SAFE -pthread -Wall
-recordmydesktop_LDFLAGS  = @X_LIBS@ @X_EXTRA_LIBS@ @X_PRE_LIBS@
+recordmydesktop_LDFLAGS  = -lm @X_LIBS@ @X_EXTRA_LIBS@ @X_PRE_LIBS@
 
 
 # RectInsert test
