diff -urN faad2-2.7.orig/configure.in faad2-2.7/configure.in
--- faad2-2.7.orig/configure.in	2009-07-21 21:15:41.000000000 +0000
+++ faad2-2.7/configure.in	2009-07-21 21:16:37.000000000 +0000
@@ -24,6 +24,7 @@
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_CHECK_PROGS(RPMBUILD, rpmbuild, rpm)
+AC_CHECK_LIBM

-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADER(config.h)
 
@@ -91,7 +92,7 @@
   ac_cv_c99_lrintf,
 [
 lrintf_save_CFLAGS=$CFLAGS
-CFLAGS="-O -lm"
+CFLAGS="-O $LIBM"
 AC_TRY_LINK([
 #define         _ISOC9X_SOURCE  1
 #define         _ISOC99_SOURCE  1

