aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2003-08-15 14:31:23 +0000
committernyamatongwe <unknown>2003-08-15 14:31:23 +0000
commitafe228d3a71d8dbdec04427015db45bccda6da06 (patch)
tree99deab0f7a1c752261e2b19202534e2359e1b0f1
parent609054ff3822a1c148500b78ec2fb6cd39b77c3f (diff)
downloadscintilla-mirror-afe228d3a71d8dbdec04427015db45bccda6da06.tar.gz
Automatic detection of GTK+ 2 and override allowed with GTK1.
-rw-r--r--gtk/makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/gtk/makefile b/gtk/makefile
index f0b0de6c8..32bccbddb 100644
--- a/gtk/makefile
+++ b/gtk/makefile
@@ -3,7 +3,9 @@
# The License.txt file describes the conditions under which this software may be distributed.
# This makefile assumes GCC 2.95.2 is used and changes will be needed to use other compilers.
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
-# To build for GTK+ 2, define GTK2 on the make command line.
+# Builds for GTK+ 2 if available else GTK+ 1.
+# To force GTK+ 2 build, define GTK2 on the make command line.
+# To force GTK+ 1 build, define GTK1 on the make command line.
.SUFFIXES: .cxx .o .h .a
CC = g++
@@ -36,10 +38,20 @@ else
CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
endif
+# If explicit setting of GTK1 or GTK2 then use that else look for
+# pkg-config which is an OK indication that GTK2 is available
ifdef GTK2
CONFIGFLAGS=pkg-config --cflags gtk+-2.0
else
+ifdef GTK1
CONFIGFLAGS=gtk-config --cflags
+else
+ifneq (,$(findstring /,$(shell whereis -b pkg-config)))
+CONFIGFLAGS=pkg-config --cflags gtk+-2.0
+else
+CONFIGFLAGS=gtk-config --cflags
+endif
+endif
endif
.cxx.o: