comparison configure.in @ 3334:61ea9005fddf

Use gcc's built-in dependency generation, thanks to Adam Strzelecki
author Sam Lantinga <slouken@libsdl.org>
date Sun, 04 Oct 2009 03:38:01 +0000
parents da1cb54d74ef
children 8e0182c236d8
comparison
equal deleted inserted replaced
3333:b334b4f7dfa0 3334:61ea9005fddf
2553 # SDL 1.3 is unicode, and unicows emulates this on Windows 98/ME 2553 # SDL 1.3 is unicode, and unicows emulates this on Windows 98/ME
2554 # You can get this here: http://libunicows.sourceforge.net/ 2554 # You can get this here: http://libunicows.sourceforge.net/
2555 #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows" 2555 #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows"
2556 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm" 2556 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm"
2557 # The Win32 platform requires special setup 2557 # The Win32 platform requires special setup
2558 SOURCES="$SOURCES $srcdir/src/main/win32/*.rc" 2558 VERSION_SOURCES="$srcdir/src/main/win32/*.rc"
2559 SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c" 2559 SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
2560 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" 2560 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
2561 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" 2561 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
2562 ;; 2562 ;;
2563 *-*-beos* | *-*-haiku*) 2563 *-*-beos* | *-*-haiku*)
2767 fi 2767 fi
2768 if test x$SDLMAIN_SOURCES = x; then 2768 if test x$SDLMAIN_SOURCES = x; then
2769 SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c" 2769 SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
2770 fi 2770 fi
2771 2771
2772 OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'` 2772 OBJECTS=`echo $SOURCES`
2773 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'` 2773 DEPENDS=`echo $SOURCES`
2774 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'` 2774 for EXT in asm cc m c S; do
2775 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` 2775 OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
2776 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.S,$(objects)/\1.lo,g'` 2776 DEPENDS=`echo "$DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.'$EXT',\\
2777 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'` 2777 $(objects)/\2.lo: \1/\2.'$EXT'\\
2778 2778 \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -MMD -MT \$@ -c \$< -o \$@,g'`
2779 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.o,g'` 2779 done
2780 SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` 2780
2781 VERSION_OBJECTS=`echo $VERSION_SOURCES`
2782 VERSION_DEPENDS=`echo $VERSION_SOURCES`
2783 VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
2784 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.rc,\\
2785 $(objects)/\2.o: \1/\2.rc\\
2786 \$(WINDRES) \$< \$@,g'`
2787
2788 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
2789 SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
2790 SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
2791 SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
2792 $(objects)/\2.o: \1/\2.c\\
2793 \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -MMD -MT \$@ -c \$< -o \$@,g'`
2781 2794
2782 # Set runtime shared library paths as needed 2795 # Set runtime shared library paths as needed
2783 2796
2784 if test "x$enable_rpath" = "xyes"; then 2797 if test "x$enable_rpath" = "xyes"; then
2785 if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then 2798 if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then
2827 AC_SUBST(ENABLE_STATIC_FALSE) 2840 AC_SUBST(ENABLE_STATIC_FALSE)
2828 2841
2829 dnl Expand the sources and objects needed to build the library 2842 dnl Expand the sources and objects needed to build the library
2830 AC_SUBST(ac_aux_dir) 2843 AC_SUBST(ac_aux_dir)
2831 AC_SUBST(INCLUDE) 2844 AC_SUBST(INCLUDE)
2832 AC_SUBST(SOURCES)
2833 AC_SUBST(OBJECTS) 2845 AC_SUBST(OBJECTS)
2834 AC_SUBST(SDLMAIN_SOURCES) 2846 AC_SUBST(DEPENDS)
2847 AC_SUBST(VERSION_OBJECTS)
2848 AC_SUBST(VERSION_DEPENDS)
2835 AC_SUBST(SDLMAIN_OBJECTS) 2849 AC_SUBST(SDLMAIN_OBJECTS)
2850 AC_SUBST(SDLMAIN_DEPENDS)
2836 AC_SUBST(BUILD_CFLAGS) 2851 AC_SUBST(BUILD_CFLAGS)
2837 AC_SUBST(EXTRA_CFLAGS) 2852 AC_SUBST(EXTRA_CFLAGS)
2838 AC_SUBST(BUILD_LDFLAGS) 2853 AC_SUBST(BUILD_LDFLAGS)
2839 AC_SUBST(EXTRA_LDFLAGS) 2854 AC_SUBST(EXTRA_LDFLAGS)
2840 AC_SUBST(WINDRES) 2855 AC_SUBST(WINDRES)
2841 2856
2842 AC_OUTPUT([ 2857 AC_OUTPUT([
2843 Makefile sdl-config SDL.spec sdl.pc 2858 Makefile sdl-config SDL.spec sdl.pc
2844 ], [
2845 : >build-deps
2846 if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend
2847 ]) 2859 ])