summaryrefslogtreecommitdiff
blob: 9409ec91325703e3a2173e779c2389771417db7a (plain)
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
--- gtk-mist-engine-0.10/configure.in	2003-01-10 22:13:53.000000000 +0000
+++ gtk-mist-engine-0.10.new/configure.in	2003-10-04 18:29:19.049104896 +0100
@@ -26,17 +26,40 @@
 dnl Initialize libtool
 AM_PROG_LIBTOOL
 
-PKG_CHECK_MODULES(MIST, gtk+-2.0 >= 2.0.0,,
-			AC_MSG_ERROR([GTK+-2.0 is required to compile mist]))
-AC_SUBST(MIST_CFLAGS)
-AC_SUBST(MIST_LIBS)
+AC_ARG_ENABLE(gtk-1, [  --enable-gtk-1          try to compile for GTK+ 1.X], gtk_1=$enableval, gtk_1="no")
+AC_ARG_ENABLE(gtk-2, [  --enable-gtk-2          try to compile for GTK+ 2.X], gtk_2=$enableval, gtk_2="yes")
+
+if test $gtk_1 = "yes"; then
+  gtk_config_progs="gtk-config gtk12-config"
+  AC_PATH_PROGS(gtk_config, $gtk_config_progs, no, /usr/bin)
+  if test $gtk_config = "no"; then
+     AC_MSG_ERROR(Could not find installation of GTK+. Try ./configure --help)
+  fi
+  GTK_VERSION=`$gtk_config --version`
+  GTK1_CFLAGS=`$gtk_config --cflags`
+  GTK1_LIBS=`$gtk_config --libs`
+  BUILD_SUBDIRS="gtk1"
+  THEME_SUBDIRS="gtk"
+fi
 
-PKG_CHECK_MODULES(GTK1, gtk+ >= 1.2.10,,
-			AC_MSG_ERROR([GTK+-1.2.10 is required to compile mist]))
 AC_SUBST(GTK1_CFLAGS)
-AC_SUBST(GTK1_LIBS)
+AC_SUBST(GTK1_LIBS) 
 
-GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
+if test $gtk_2 = "yes"; then
+  PKG_CHECK_MODULES(SMOOTH_GTK2, gtk+-2.0 >= 2.0.0,,
+                          AC_MSG_ERROR([GTK+-2.0 is required]))
+                                                                       
+  GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
+  MIST_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
+  MIST_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
+  BUILD_SUBDIRS="$BUILD_SUBDIRS src"
+  THEME_SUBDIRS="$THEME_SUBDIRS gtk-2.0"
+fi
+
+AC_SUBST(MIST_CFLAGS)
+AC_SUBST(MIST_LIBS)
+AC_SUBST(BUILD_SUBDIRS)
+AC_SUBST(THEME_SUBDIRS)
 AC_SUBST(GTK_VERSION)
 
 # Checks for header files.
--- gtk-mist-engine-0.10/Makefile.am	2003-01-10 22:13:42.000000000 +0000
+++ gtk-mist-engine-0.10.new/Makefile.am	2003-10-04 17:48:37.822227792 +0100
@@ -1,3 +1,3 @@
-SUBDIRS = gtk1 src Theme
+SUBDIRS = @BUILD_SUBDIRS@ Theme
 
 EXTRA_DIST = autogen.sh
--- gtk-mist-engine-0.10/Theme/Makefile.am	2003-01-12 23:02:00.000000000 +0000
+++ gtk-mist-engine-0.10.new/Theme/Makefile.am	2003-10-04 18:11:22.363785944 +0100
@@ -1 +1 @@
-SUBDIRS = gtk gtk-2.0 metacity-1
+SUBDIRS = @THEME_SUBDIRS@ metacity-1