aboutsummaryrefslogtreecommitdiff
blob: e7f5e2f325862b6b4e87014c80a671045a1a684e (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
diff -ru frama-c-Beryllium-20090601-beta1/configure frama-c-Beryllium-20090601-beta1.ok/configure
--- frama-c-Beryllium-20090601-beta1/configure	2009-06-23 16:34:44.000000000 +0200
+++ frama-c-Beryllium-20090601-beta1.ok/configure	2009-06-29 09:51:01.000000000 +0200
@@ -686,7 +686,6 @@
 JCCMO
 WHYDPBIN
 WHYBIN
-HAS_LABLGTK_CUSTOM_MODEL
 HAS_LEGACY_GTKSOURCEVIEW
 EXTERNAL_PLUGINS
 LOCAL_MACHDEP
@@ -823,7 +822,6 @@
 enable_wp
 enable_external
 with_whydir
-enable_custommodel
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1482,7 +1480,6 @@
   --enable-wp             support for wp plugin (default: yes)
 --enable-external=plugin allows to compile directly from Frama-C kernel
 some external plug-ins.
-  --enable-custommodel    use a custom tree model in the GUI. Need to have a recent lablgtk2 version
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -7546,46 +7543,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 #####################################################
 # Check for tools/libraries requirements of plugins #
 #####################################################
@@ -8697,37 +8654,107 @@
 
 # lablgtk2's custom tree model
 
-# Check whether --enable-custommodel was given.
-if test "${enable_custommodel+set}" = set; then
-  enableval=$enable_custommodel; ENABLE_CUSTOM_MODEL=$enableval; FORCE_CUSTOM_MODEL=yes
-else
-  ENABLE_CUSTOM_MODEL=yes
-
-fi
-
-
-HAS_LABLGTK_CUSTOM_MODEL=no
-if test "$ENABLE_CUSTOM_MODEL" == "yes"; then
-  { $as_echo "$as_me:$LINENO: checking for lablgtk2's custom tree model" >&5
-$as_echo_n "checking for lablgtk2's custom tree model... " >&6; }
+if test "$HAS_LABLGTK" == "yes"; then
   if echo "type ('a,'b,'c,'d) t = ('a,'b,'c,'d) GTree.custom_tree_model" > test_custommodel.ml && ocamlc -c -I +lablgtk2 test_custommodel.ml 2> /dev/null; \
   then
-    HAS_LABLGTK_CUSTOM_MODEL=yes
+    { $as_echo "$as_me:$LINENO: checking for lablgtk2's custom tree model" >&5
+$as_echo_n "checking for lablgtk2's custom tree model... " >&6; }
     { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
   else
-    { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-    if test "$FORCE_CUSTOM_MODEL" == "yes"; then
-      { { $as_echo "$as_me:$LINENO: error: lablgtk2's custom tree model requested but not available." >&5
-$as_echo "$as_me: error: lablgtk2's custom tree model requested but not available." >&2;}
+    # we don't have a good version of lablgtk2:
+    # configure a dummy library "customtree" in order to
+    # configure plug-ins depending on lablgtk2 in a proper way
+
+# No need to check the same thing multiple times.
+
+
+
+
+
+
+
+
+
+
+
+
+
+# [JS 2009/06/02] sh tests and m4 variables do not mix well together.
+# It works by chance but it is not robust enough.
+# Should be rewritten
+  if test -n "$REQUIRE_LABLGTK" -o -n "$USE_LABLGTK" -o "yes" == "yes"; then
+    HAS_LABLGTK=no
+    if test "$HAS_LABLGTK" != "yes"; then
+          { $as_echo "$as_me:$LINENO: checking for custom-tree-model" >&5
+$as_echo_n "checking for custom-tree-model... " >&6; }
+if test "${ac_cv_file_custom_tree_model+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  test "$cross_compiling" = yes &&
+  { { $as_echo "$as_me:$LINENO: error: cannot check for custom-tree-model existence when cross compiling" >&5
+$as_echo "$as_me: error: cannot check for custom-tree-model existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-    else
-      { { $as_echo "$as_me:$LINENO: error: lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12" >&5
-$as_echo "$as_me: error: lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12" >&2;}
+if test -r "custom-tree-model"; then
+  ac_cv_file_custom_tree_model=yes
+else
+  ac_cv_file_custom_tree_model=no
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_file_custom_tree_model" >&5
+$as_echo "$ac_cv_file_custom_tree_model" >&6; }
+if test "x$ac_cv_file_custom_tree_model" = x""yes; then
+  HAS_LABLGTK=yes
+else
+  HAS_LABLGTK=no
+fi
+
+          if test "$HAS_LABLGTK" == "yes"; then SELECTED_LABLGTK=custom-tree-model
+          fi
+       fi
+
+    if test "$HAS_LABLGTK" == "no"; then
+      { $as_echo "$as_me:$LINENO: WARNING: lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12." >&5
+$as_echo "$as_me: WARNING: lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12." >&2;}
+      if test "$REQUIRE_LABLGTK" != ""; then
+        echo "plug-ins disabled:
+ $REQUIRE_LABLGTK"
+        for p in $REQUIRE_LABLGTK; do
+	  fp=FORCE_`upper "$p"`
+	  if eval test "\$$fp" == "yes"; then
+	    { { $as_echo "$as_me:$LINENO: error: $p requested but custom-tree-model missing." >&5
+$as_echo "$as_me: error: $p requested but custom-tree-model missing." >&2;}
    { (exit 1); exit 1; }; }
+	  fi
+          ep=ENABLE_`upper "$p"`
+	  eval $ep="no\ \(see\ warning\ about\ custom-tree-model\)"
+        done
+      fi
+      if test "$USE_LABLGTK" != ""; then
+        echo "plug-ins not fully functional:
+ $USE_LABLGTK"
+        for p in $USE_LABLGTK; do
+          ep=ENABLE_`upper "$p"`
+	  eval eep="\$$ep"
+	  if test "`echo $eep | sed -e 's/ .*//' `" != "no"; then
+	    eval $ep="partial\ \(see\ warning\ about\ custom-tree-model\)"
+          fi
+        done
+      fi
+      echo
     fi
   fi
+
+
+
+
+
+
+
+
+
+
+  fi
   rm -f test_custommodel.*
 fi
 
@@ -9142,7 +9169,6 @@
 
 
 
-
 # m4_foreach_w is not supported in some old autoconf versions.
 # Sadly AC_FOREACH is deprecated now...
 
diff -ru frama-c-Beryllium-20090601-beta1/configure.in frama-c-Beryllium-20090601-beta1.ok/configure.in
--- frama-c-Beryllium-20090601-beta1/configure.in	2009-06-23 15:50:50.000000000 +0200
+++ frama-c-Beryllium-20090601-beta1.ok/configure.in	2009-06-29 09:50:50.000000000 +0200
@@ -804,27 +804,21 @@
 
 # lablgtk2's custom tree model
 
-AC_ARG_ENABLE(
-  [custommodel],
-[  --enable-custommodel    use a custom tree model in the GUI. Need to have a recent lablgtk2 version],
-  ENABLE_CUSTOM_MODEL=$enableval; FORCE_CUSTOM_MODEL=yes,
-  ENABLE_CUSTOM_MODEL=yes
-)
-
-HAS_LABLGTK_CUSTOM_MODEL=no
-if test "$ENABLE_CUSTOM_MODEL" == "yes"; then
-  AC_MSG_CHECKING([for lablgtk2's custom tree model])
+if test "$HAS_LABLGTK" == "yes"; then
   if echo "type ('a,'b,'c,'d) t = ('a,'b,'c,'d) GTree.custom_tree_model" > test_custommodel.ml && ocamlc -c -I +lablgtk2 test_custommodel.ml 2> /dev/null; \
   then
-    HAS_LABLGTK_CUSTOM_MODEL=yes
+    AC_MSG_CHECKING([for lablgtk2's custom tree model])
     AC_MSG_RESULT([yes])
   else
-    AC_MSG_RESULT([no])
-    if test "$FORCE_CUSTOM_MODEL" == "yes"; then
-      AC_MSG_ERROR([lablgtk2's custom tree model requested but not available.])
-    else
-      AC_MSG_ERROR([lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12])
-    fi
+    # we don't have a good version of lablgtk2:
+    # configure a dummy library "customtree" in order to
+    # configure plug-ins depending on lablgtk2 in a proper way
+    configure_library(
+      [LABLGTK],
+      [custom-tree-model],
+      [lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12.],
+     yes)
+    check_frama_c_dependencies()
   fi
   rm -f test_custommodel.*
 fi
@@ -1137,7 +1131,6 @@
 
 AC_SUBST(HAS_USABLE_NATIVE_DYNLINK)
 AC_SUBST(HAS_LEGACY_GTKSOURCEVIEW)
-AC_SUBST(HAS_LABLGTK_CUSTOM_MODEL)
 AC_SUBST(WHYBIN)
 AC_SUBST(WHYDPBIN)
 
diff -ru frama-c-Beryllium-20090601-beta1/src/gui/design.ml frama-c-Beryllium-20090601-beta1.ok/src/gui/design.ml
--- frama-c-Beryllium-20090601-beta1/src/gui/design.ml	2009-06-23 10:35:28.000000000 +0200
+++ frama-c-Beryllium-20090601-beta1.ok/src/gui/design.ml	2009-06-29 11:29:52.000000000 +0200
@@ -917,11 +917,9 @@
 	     s
        | e ->
 	   error
-	     "unexpected error %s@\n%s@\n\
+	     "unexpected error %s@\n\
 please report as `crash' at http://bts.frama-c.com" 
-	     (Printexc.to_string e)
-	     (if Parameters.Debug.get () > 0 then Printexc.get_backtrace ()
-	      else ""));
+	     (Printexc.to_string e));
       self#unlock ()
     in
     let run = GButton.button ~label:"Run analysis" ~stock:`EXECUTE ~packing:buttons#pack ()
diff -ru frama-c-Beryllium-20090601-beta1/src/kernel/boot.ml frama-c-Beryllium-20090601-beta1.ok/src/kernel/boot.ml
--- frama-c-Beryllium-20090601-beta1/src/kernel/boot.ml	2009-06-23 11:08:08.000000000 +0200
+++ frama-c-Beryllium-20090601-beta1.ok/src/kernel/boot.ml	2009-06-29 08:48:53.000000000 +0200
@@ -69,7 +69,6 @@
 
 (* Main: let's go! *)
 let () =
-  if Parameters.Debug.get () > 0 then Printexc.record_backtrace true;
   Kind.version := Config.version;
   boot_cil ();
   Sys.catch_break true;