Patch for SDL configure.in

I think it would be easier to use AC_CHECK_LIB to
see if -lm is needed. This would remove an ugly
"case $platform" block which is always a good thing.
Here is a patch to do just that for the 1.1 CVS.

Mo DeJong
Red Hat Inc

Index: configure.in===================================================================
RCS file: /cvs/smpeg/configure.in,v
retrieving revision 1.30
diff -u -r1.30 configure.in
configure.in 2000/05/26 17:54:37 1.30
+++ configure.in 2000/06/04 01:47:53
@@ -56,19 +56,8 @@
;;
esac

-dnl Figure out which math library to use
-case “$target” in

  • --mingw32*)
  •    MATHLIB=""
    
  •    ;;
    
  • --beos*)
  •    MATHLIB=""
    
  •    ;;
    
  • *)
  •    MATHLIB="-lm"
    
  •    ;;
    

-esac
-LIBS="$LIBS $MATHLIB"
+dnl See if we need to pass -lm for the math library
+AC_CHECK_LIB(m, sqrt, LIBS="$LIBS -lm")

dnl Check for SDL
SDL_VERSION=1.1.3

I think it would be easier to use AC_CHECK_LIB to
see if -lm is needed. This would remove an ugly
"case $platform" block which is always a good thing.
Here is a patch to do just that for the 1.1 CVS.

Actually, patches to smpeg should go to smpeg at lokigames.com

I’ve applied it.

Thanks!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software