Mercurial > sdl-ios-xcode
comparison configure.in @ 5066:3afb71c202b2
Fixed bug #945
The configure script was breaking the substitutions into multiple fragments, breaking them across the substitution for the build rules. This of course totally hosed the process.
I switched to using a more modern usage of AC_OUTPUT and added a post-process step that appends the build rules to the Makefile.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 21 Jan 2011 12:43:25 -0800 |
parents | e8916fe9cfc8 |
children | 231dbbc3e31c |
comparison
equal
deleted
inserted
replaced
5065:7e4c7790700e | 5066:3afb71c202b2 |
---|---|
2725 OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'` | 2725 OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'` |
2726 DEPENDS=`echo "$DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT,\\\\ | 2726 DEPENDS=`echo "$DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT,\\\\ |
2727 \\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\ | 2727 \\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\ |
2728 \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` | 2728 \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` |
2729 done | 2729 done |
2730 DEPENDS=`echo "$DEPENDS" | sed 's,\\$,\\\\$,g'` | |
2730 | 2731 |
2731 VERSION_OBJECTS=`echo $VERSION_SOURCES` | 2732 VERSION_OBJECTS=`echo $VERSION_SOURCES` |
2732 VERSION_DEPENDS=`echo $VERSION_SOURCES` | 2733 VERSION_DEPENDS=`echo $VERSION_SOURCES` |
2733 VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'` | 2734 VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'` |
2734 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\ | 2735 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\ |
2735 \\$(objects)/\\2.o: \\1/\\2.rc\\\\ | 2736 \\$(objects)/\\2.o: \\1/\\2.rc\\\\ |
2736 \\$(WINDRES) \\$< \\$@,g"` | 2737 \\$(WINDRES) \\$< \\$@,g"` |
2738 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\\$,\\\\$,g'` | |
2737 | 2739 |
2738 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES` | 2740 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES` |
2739 SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES` | 2741 SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES` |
2740 SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` | 2742 SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` |
2741 SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ | 2743 SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ |
2742 \\$(objects)/\\2.o: \\1/\\2.c\\\\ | 2744 \\$(objects)/\\2.o: \\1/\\2.c\\\\ |
2743 \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` | 2745 \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` |
2746 SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed 's,\\$,\\\\$,g'` | |
2744 | 2747 |
2745 # Set runtime shared library paths as needed | 2748 # Set runtime shared library paths as needed |
2746 | 2749 |
2747 if test "x$enable_rpath" = "xyes"; then | 2750 if test "x$enable_rpath" = "xyes"; then |
2748 if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then | 2751 if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then |
2791 | 2794 |
2792 dnl Expand the sources and objects needed to build the library | 2795 dnl Expand the sources and objects needed to build the library |
2793 AC_SUBST(ac_aux_dir) | 2796 AC_SUBST(ac_aux_dir) |
2794 AC_SUBST(INCLUDE) | 2797 AC_SUBST(INCLUDE) |
2795 AC_SUBST(OBJECTS) | 2798 AC_SUBST(OBJECTS) |
2796 AC_SUBST(DEPENDS) | |
2797 AC_SUBST(VERSION_OBJECTS) | 2799 AC_SUBST(VERSION_OBJECTS) |
2798 AC_SUBST(VERSION_DEPENDS) | |
2799 AC_SUBST(SDLMAIN_OBJECTS) | 2800 AC_SUBST(SDLMAIN_OBJECTS) |
2800 AC_SUBST(SDLMAIN_DEPENDS) | |
2801 AC_SUBST(BUILD_CFLAGS) | 2801 AC_SUBST(BUILD_CFLAGS) |
2802 AC_SUBST(EXTRA_CFLAGS) | 2802 AC_SUBST(EXTRA_CFLAGS) |
2803 AC_SUBST(BUILD_LDFLAGS) | 2803 AC_SUBST(BUILD_LDFLAGS) |
2804 AC_SUBST(EXTRA_LDFLAGS) | 2804 AC_SUBST(EXTRA_LDFLAGS) |
2805 AC_SUBST(WINDRES) | 2805 AC_SUBST(WINDRES) |
2806 | 2806 |
2807 AC_OUTPUT([ | 2807 AC_CONFIG_FILES([ |
2808 Makefile sdl-config SDL.spec sdl.pc | 2808 Makefile sdl-config SDL.spec sdl.pc |
2809 ]) | 2809 ]) |
2810 AC_CONFIG_COMMANDS([default], | |
2811 [cat >>Makefile <<__EOF__ | |
2812 | |
2813 # Build rules for objects | |
2814 -include \$(OBJECTS:.lo=.d) | |
2815 $DEPENDS | |
2816 $VERSION_DEPENDS | |
2817 $SDLMAIN_DEPENDS | |
2818 __EOF__ | |
2819 ], [ | |
2820 DEPENDS="$DEPENDS" | |
2821 VERSION_DEPENDS="$VERSION_DEPENDS" | |
2822 SDLMAIN_DEPENDS="$SDLMAIN_DEPENDS" | |
2823 ]) | |
2824 AC_OUTPUT |