[Scummvm-git-logs] scummvm master -> 8efe46dceeaf08984477003d07efd5d80865cde5

bgK bastien.bouclet at gmail.com
Fri Nov 16 18:38:29 CET 2018


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4d36606b27 BUILD: Free the a52 state in the configure compilation test
8efe46dcee BUILD: Set PKG_CONFIG_LIBDIR only when needed when running configure


Commit: 4d36606b27f82c8daa5c3f1ea95a279803cb14d1
    https://github.com/scummvm/scummvm/commit/4d36606b27f82c8daa5c3f1ea95a279803cb14d1
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-11-16T18:34:59+01:00

Commit Message:
BUILD: Free the a52 state in the configure compilation test

So ASan does not print a leak report in the middle of the configure
output when it is enabled.

Changed paths:
    configure


diff --git a/configure b/configure
index b888e47..161551e 100755
--- a/configure
+++ b/configure
@@ -4459,7 +4459,8 @@ extern "C" {
 }
 
 int main(void) {
-	a52_init(0);
+	a52_state_t *state = a52_init(0);
+	a52_free(state);
 	return 0;
 }
 EOF


Commit: 8efe46dceeaf08984477003d07efd5d80865cde5
    https://github.com/scummvm/scummvm/commit/8efe46dceeaf08984477003d07efd5d80865cde5
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-11-16T18:34:59+01:00

Commit Message:
BUILD: Set PKG_CONFIG_LIBDIR only when needed when running configure

Remember if PKG_CONFIG_LIBDIR is set when running configure manually,
when automatically running configure, only set PKG_CONFIG_LIBDIR if it
was set during the manual run.

Fixes #10807.

Changed paths:
    Makefile
    configure


diff --git a/Makefile b/Makefile
index bbba24f..56ebfc7 100644
--- a/Makefile
+++ b/Makefile
@@ -82,20 +82,30 @@ EXECUTABLE  := $(EXEPRE)scummvm$(EXEEXT)
 
 include $(srcdir)/Makefile.common
 
-# check if configure has been run or has been changed since last run
 ENGINE_SUBDIRS_CONFIGURE := $(wildcard $(srcdir)/engines/*/configure.engine)
+
+config.h:
+SAVED_ENV_VARS = AR AS ASFLAGS CPPFLAGS CXX CXXFLAGS LD LDFLAGS RANLIB SDL_CONFIG STRIP WINDRES WINDRESFLAGS
+
+# The environment variable PKG_CONFIG_LIBDIR has a different meaning
+# for pkg-config when it is empty and when it is not defined.
+# When PKG_CONFIG_LIBDIR is defined but empty, the .pc files cannot
+# be found because the search path is empty.
+# Here we make sure not to define PKG_CONFIG_LIBDIR when automatically
+# running configure and it was not set for the previous run
+# so pkg-config uses the system default search path for the .pc files.
+ifneq ($(SAVED_PKG_CONFIG_LIBDIR),unset)
+	SAVED_ENV_VARS += PKG_CONFIG_LIBDIR
+endif
+
+# check if configure has been run or has been changed since last run
 config.h: $(srcdir)/configure $(ENGINE_SUBDIRS_CONFIGURE)
 ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk"
 	@echo "Running $(srcdir)/configure with the last specified parameters"
 	@sleep 2
-	AR="$(SAVED_AR)" AS="$(SAVED_AS)" ASFLAGS="$(SAVED_ASFLAGS)" \
-		CPPFLAGS="$(SAVED_CPPFLAGS)" CXX="$(SAVED_CXX)" \
-		CXXFLAGS="$(SAVED_CXXFLAGS)" LD="$(SAVED_LD)" \
-		LDFLAGS="$(SAVED_LDFLAGS)" PKG_CONFIG_LIBDIR="$(SAVED_PKG_CONFIG_LIBDIR)" \
-		RANLIB="$(SAVED_RANLIB)" SDL_CONFIG="$(SAVED_SDL_CONFIG)" \
-		STRIP="$(SAVED_STRIP)" WINDRES="$(SAVED_WINDRES)" \
-		WINDRESFLAGS="$(SAVED_WINDRESFLAGS)" \
-			$(srcdir)/configure $(SAVED_CONFIGFLAGS)
+
+	$(foreach VAR,$(SAVED_ENV_VARS),$(VAR)="$(SAVED_$(VAR))") \
+		$(srcdir)/configure $(SAVED_CONFIGFLAGS)
 else
 	$(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters)
 endif
diff --git a/configure b/configure
index 161551e..1d050f0 100755
--- a/configure
+++ b/configure
@@ -38,7 +38,7 @@ SAVED_CXXFLAGS=$CXXFLAGS
 SAVED_DWP=$DWP
 SAVED_LD=$LD
 SAVED_LDFLAGS=$LDFLAGS
-SAVED_PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR
+SAVED_PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-unset}
 SAVED_RANLIB=$RANLIB
 SAVED_SDL_CONFIG=$SDL_CONFIG
 SAVED_STRIP=$STRIP





More information about the Scummvm-git-logs mailing list