summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2017-03-20 11:32:32 -0500
committerDan Nicholson <dbn.lists@gmail.com>2017-03-20 11:34:02 -0500
commitdf6e4b6cf1fc25bf768fbc03cb7a8deed266eb25 (patch)
tree9c8f82435beb4f03786f6238c3e1b1876795bf26 /check
parent1dfe95b8b85a0d515d8c53d711dd26627859ed3f (diff)
downloadpkg-config-df6e4b6cf1fc25bf768fbc03cb7a8deed266eb25.tar.gz
pkg: Check INCLUDE environment variable for MSVC
On Windows builds when --msvc-syntax is in use, add paths in the INCLUDE environment variable to the system include search path and ignore the various GCC environment variables. See https://msdn.microsoft.com/en-us/library/73f9s62w.aspx for details. https://bugs.freedesktop.org/show_bug.cgi?id=94729
Diffstat (limited to 'check')
-rwxr-xr-xcheck/check-system-flags23
1 files changed, 21 insertions, 2 deletions
diff --git a/check/check-system-flags b/check/check-system-flags
index 831dd0e..632496c 100755
--- a/check/check-system-flags
+++ b/check/check-system-flags
@@ -39,9 +39,28 @@ run_test --cflags system
RESULT="-L/usr/lib -lsystem"
run_test --libs system
-# Now check that the various compiler environment variables also update
-# the system include path
+# Now check that the various GCC environment variables also update the
+# system include path
for var in CPATH C_INCLUDE_PATH CPP_INCLUDE_PATH; do
RESULT=""
eval $var=/usr/include run_test --cflags system
+
+ # Make sure these are not skipped in --msvc-syntax mode
+ if [ "$native_win32" = yes ]; then
+ RESULT="-I/usr/include"
+ eval $var=/usr/include run_test --cflags --msvc-syntax system
+ fi
+done
+
+# Check that the various MSVC environment variables also update the
+# system include path when --msvc-syntax is in use
+for var in INCLUDE; do
+ RESULT="-I/usr/include"
+ eval $var=/usr/include run_test --cflags system
+
+ # Make sure these are skipped in --msvc-syntax mode
+ if [ "$native_win32" = yes ]; then
+ RESULT=""
+ eval $var=/usr/include run_test --cflags --msvc-syntax system
+ fi
done