From 7850aeb03a54a15d07b6c243b61033cd379c39d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Thu, 14 Apr 2011 07:25:43 +0400 Subject: Escape slashes in paths passed to mingw-gcc Avoids Msys path mangling that turns *nix paths (such as /usr/include) into DOS-style absolute paths (such as c:/mingw/msys/1.0/include). Allows mingw-built pkg-config to pass check-cflags. --- Makefile.am | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index b1f51ee..5b30ce8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,12 +21,21 @@ EXTRA_DIST = $(m4_DATA) $(man_MANS) README.win32 bin_PROGRAMS = pkg-config AM_CFLAGS=@WARN_CFLAGS@ +if NATIVE_WIN32 +INCLUDES= \ + -DPKG_CONFIG_PC_PATH="\"$(subst /,\/,$(pc_path))\"" \ + -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(subst /,\/,$(system_include_path))\"" \ + -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(subst /,\/,$(system_library_path))\"" \ + @GLIB_CFLAGS@ \ + $(popt_includes) +else INCLUDES= \ -DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" \ -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(system_include_path)\"" \ -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(system_library_path)\"" \ @GLIB_CFLAGS@ \ $(popt_includes) +endif pkg_config_SOURCES= \ pkg.h \ -- cgit v1.2.1