Fixed bug 3208 - Minor improvements to the configure script
authorSam Lantinga <slouken@libsdl.org>
Sat, 12 Aug 2017 15:00:33 -0700
changeset 11245283194179512
parent 11244 cbc9323b7167
child 11246 1667e6dafc85
Fixed bug 3208 - Minor improvements to the configure script

Rafal Muzylo

"if we're already using libtool, why aren't we using it ?"; they've been inspired by the fact, that at that mark, neither libSDL2_test.a nor libSDL2main.a were being built correctly (not sure if it's fully broken or just because I've tested the out-of-tree build)
Makefile.in
configure
configure.in
     1.1 --- a/Makefile.in	Sat Aug 12 13:05:26 2017 -0700
     1.2 +++ b/Makefile.in	Sat Aug 12 15:00:33 2017 -0700
     1.3 @@ -36,10 +36,10 @@
     1.4  GEN_OBJECTS = @GEN_OBJECTS@
     1.5  VERSION_OBJECTS = @VERSION_OBJECTS@
     1.6  
     1.7 -SDLMAIN_TARGET = libSDL2main.a
     1.8 +SDLMAIN_TARGET = libSDL2main.la
     1.9  SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
    1.10  
    1.11 -SDLTEST_TARGET = libSDL2_test.a
    1.12 +SDLTEST_TARGET = libSDL2_test.la
    1.13  SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
    1.14  
    1.15  WAYLAND_SCANNER = @WAYLAND_SCANNER@
    1.16 @@ -145,12 +145,10 @@
    1.17  	$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
    1.18  
    1.19  $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
    1.20 -	$(RUN_CMD_AR)$(AR) cru $@ $(SDLMAIN_OBJECTS)
    1.21 -	$(RUN_CMD_RANLIB)$(RANLIB) $@
    1.22 +	$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(DESTDIR)$(libdir)
    1.23  
    1.24  $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
    1.25 -	$(RUN_CMD_AR)$(AR) cru $@ $(SDLTEST_OBJECTS)
    1.26 -	$(RUN_CMD_RANLIB)$(RANLIB) $@
    1.27 +	$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(DESTDIR)$(libdir)
    1.28  
    1.29  install: all install-bin install-hdrs install-lib install-data
    1.30  install-bin:
    1.31 @@ -171,10 +169,8 @@
    1.32  install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
    1.33  	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
    1.34  	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
    1.35 -	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
    1.36 -	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
    1.37 -	$(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
    1.38 -	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
    1.39 +	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
    1.40 +	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
    1.41  install-data:
    1.42  	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
    1.43  	$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
     2.1 --- a/configure	Sat Aug 12 13:05:26 2017 -0700
     2.2 +++ b/configure	Sat Aug 12 15:00:33 2017 -0700
     2.3 @@ -24456,16 +24456,16 @@
     2.4  
     2.5  SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
     2.6  SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
     2.7 -SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.o,g'`
     2.8 +SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
     2.9  SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\\\
    2.10 -\\$(objects)/\\2.o: \\1/\\2.c\\\\
    2.11 +\\$(objects)/\\2.lo: \\1/\\2.c\\\\
    2.12  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    2.13  
    2.14  SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
    2.15  SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
    2.16 -SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.o,g'`
    2.17 +SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
    2.18  SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\\\
    2.19 -\\$(objects)/\\2.o: \\1/\\2.c\\\\
    2.20 +\\$(objects)/\\2.lo: \\1/\\2.c\\\\
    2.21  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    2.22  
    2.23  # Set runtime shared library paths as needed
     3.1 --- a/configure.in	Sat Aug 12 13:05:26 2017 -0700
     3.2 +++ b/configure.in	Sat Aug 12 15:00:33 2017 -0700
     3.3 @@ -276,7 +276,7 @@
     3.4      AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
     3.5      AC_CHECK_FUNCS(iconv)
     3.6  
     3.7 -    AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [Description])], ,[#include <signal.h>])
     3.8 +    AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
     3.9  fi
    3.10  
    3.11  dnl AC_CHECK_SIZEOF(void*)
    3.12 @@ -3877,16 +3877,16 @@
    3.13  
    3.14  SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
    3.15  SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
    3.16 -SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
    3.17 +SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
    3.18  SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
    3.19 -\\$(objects)/\\2.o: \\1/\\2.c\\\\
    3.20 +\\$(objects)/\\2.lo: \\1/\\2.c\\\\
    3.21  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    3.22  
    3.23  SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
    3.24  SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
    3.25 -SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
    3.26 +SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
    3.27  SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
    3.28 -\\$(objects)/\\2.o: \\1/\\2.c\\\\
    3.29 +\\$(objects)/\\2.lo: \\1/\\2.c\\\\
    3.30  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    3.31  
    3.32  # Set runtime shared library paths as needed