fix typo in w32-vcc.mk allow direct setting of X11_PATH for unusual X11 paths.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
diff --git a/config/win32/w32-vcc.mk b/config/win32/w32-vcc.mk
index da1ef48..4f0a4a3 100644
--- a/config/win32/w32-vcc.mk
+++ b/config/win32/w32-vcc.mk
@@ -1,5 +1,5 @@
#
-# FreeType 2 Configuration rules for Win32 + LCC
+# FreeType 2 Configuration rules for Win32 + Visual C/C++
#
diff --git a/demos/graph/x11/rules.mk b/demos/graph/x11/rules.mk
index a1641fd..e1dc2b3 100644
--- a/demos/graph/x11/rules.mk
+++ b/demos/graph/x11/rules.mk
@@ -9,25 +9,37 @@
#
# Try to detect an X11 setup.
#
-# We simply try to detect a `X11R6/bin', `X11R5/bin' or `X11/bin' in
-# the current path.
+# We try to detect the following directories (in that order) in the current
+# path:
#
-ifneq ($(findstring X11R6$(SEP)bin,$(PATH)),)
- xversion := X11R6
-else
- ifneq ($(findstring X11R5$(SEP)bin,$(PATH)),)
- xversion := X11R5
+# X11 (usually a symlink to the current release)
+# X11R6
+# X11R5
+#
+# If the variable X11_PATH is set (to specify unusual locations of X11), no
+# other directory is searched. More than one directory must be separated
+# with spaces. Example:
+#
+# make X11_PATH="/usr/openwin /usr/local/X11R6"
+#
+ifndef X11_PATH
+ ifneq ($(findstring X11$(SEP)bin,$(PATH)),)
+ xversion := X11
else
- ifneq ($(findstring X11$(SEP)bin,$(PATH)),)
- xversion := X11
+ ifneq ($(findstring X11R6$(SEP)bin,$(PATH)),)
+ xversion := X11R6
+ else
+ ifneq ($(findstring X11R5$(SEP)bin,$(PATH)),)
+ xversion := X11R5
+ endif
endif
endif
-endif
-ifdef xversion
- X11_PATH := $(subst ;, ,$(PATH)) $(subst :, ,$(PATH))
- X11_PATH := $(filter %$(xversion)$(SEP)bin,$(X11_PATH))
- X11_PATH := $(X11_PATH:%$(SEP)bin=%)
+ ifdef xversion
+ X11_PATH := $(subst ;, ,$(PATH)) $(subst :, ,$(PATH))
+ X11_PATH := $(filter %$(xversion)$(SEP)bin,$(X11_PATH))
+ X11_PATH := $(X11_PATH:%$(SEP)bin=%)
+ endif
endif
##########################################################################