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
|
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
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
|
AC_MSG_ERROR(cannot compile - please install either Kornshell93, BASH or ZShell first.)
fi
fi
# Check if we need to build any GUI
FLTK="false"
USEGTK="false"
GTK4="false"
GTK3="false"
GTK2="false"
AC_ARG_ENABLE([gui-gtk],
[AS_HELP_STRING([--enable-gui-gtk],[Build a GTK version of BaconGUI])],
[USEGTK="true"])
AC_ARG_ENABLE([gui-fltk],
[AS_HELP_STRING([--enable-gui-fltk],[Build the FLTK version of BaconGUI])],
[FLTK="true"])
# Default is GTK version of BaConGUI
if test "$USEGTK" = true -o "$FLTK" = false; then
AC_CHECK_PROG(PKG_CONFIG, pkg-config, found, missing)
if test "$PKG_CONFIG" = missing; then
USEGTK="false"
else
AC_MSG_CHECKING(if GTK4 and supporting GtkSourceView5 and Webkit5 libraries are installed)
GTK4=`pkg-config --silence-errors --libs gtk4`
SRC4=`pkg-config --silence-errors --libs gtksourceview-5`
WEB4=`pkg-config --silence-errors --libs webkit2gtk-5.0`
if test -z "$GTK4" -o -z "$SRC4" -o -z "$WEB4"; then
AC_MSG_RESULT(not found.)
GTK4="false"
AC_MSG_CHECKING(if GTK3 and supporting GtkSourceView4 and Webkit4 libraries are installed)
GTK3=`pkg-config --silence-errors --libs gtk+-3.0`
SRC3=`pkg-config --silence-errors --libs gtksourceview-4`
WEB3=`pkg-config --silence-errors --libs webkit2gtk-4.0`
if test -z "$GTK3" -o -z "$SRC3" -o -z "$WEB3"; then
AC_MSG_RESULT(not found.)
GTK3="false"
AC_MSG_CHECKING(if GTK2 and supporting GtkSourceView3 and Webkit2 libraries are installed)
GTK2=`pkg-config --silence-errors --libs gtk+-2.0`
SRC2=`pkg-config --silence-errors --libs gtksourceview-2.0`
WEB2=`pkg-config --silence-errors --libs webkitgtk-1.0`
if test -z "$GTK2" -o -z "$SRC2"; then
AC_MSG_RESULT(not found.)
GTK2="false"
USEGTK="false"
else
AC_MSG_RESULT(found.)
AC_MSG_CHECKING(if GTK3 and supporting GtkSourceView4 and Webkit4 libraries are installed)
GTK3=`pkg-config --silence-errors --libs gtk+-3.0`
SRC3=`pkg-config --silence-errors --libs gtksourceview-4`
WEB3=`pkg-config --silence-errors --libs webkit2gtk-4.0`
if test -z "$GTK3" -o -z "$SRC3" -o -z "$WEB3"; then
AC_MSG_RESULT(not found.)
GTK3="false"
AC_MSG_CHECKING(if GTK2 and supporting GtkSourceView3 and Webkit2 libraries are installed)
GTK2=`pkg-config --silence-errors --libs gtk+-2.0`
SRC2=`pkg-config --silence-errors --libs gtksourceview-2.0`
WEB2=`pkg-config --silence-errors --libs webkitgtk-3.0`
if test -z "$GTK2" -o -z "$SRC2"; then
AC_MSG_RESULT(not found.)
GTK2="false"
USEGTK="false"
else
AC_MSG_RESULT(found.)
AC_SEARCH_LIBS(gtk_init, [gtk-x11-2.0], [GTK2="true" USEGTK="true"], [GTK2="false" USEGTK="false"], [])
if test "$GTK2" = true; then
GTK2="true"
AC_SEARCH_LIBS(gtk_source_view_new, [gtksourceview-2.0], [GTK2="true" USEGTK="true"], [GTK2="false" USEGTK="false"], [])
if test "$GTK2" = true; then
AC_SEARCH_LIBS(webkit_web_view_new, [webkitgtk-1.0], [GTK2="true" USEGTK="true"], [GTK2="false" USEGTK="false"], [])
fi
USEGTK="true"
fi
fi
fi
else
AC_MSG_RESULT(found.)
AC_SEARCH_LIBS(gtk_init, [gtk-3], [GTK3="true" USEGTK="true"], [GTK3="false" USEGTK="false"], [])
if test "$GTK3" = true; then
AC_SEARCH_LIBS(gtk_source_view_new, [gtksourceview-4], [GTK3="true" USEGTK="true"], [GTK3="false" USEGTK="false"], [])
if test "$GTK3" = true; then
AC_SEARCH_LIBS(webkit_web_view_new, [webkit2gtk-4.0], [GTK3="true" USEGTK="true"], [GTK3="false" USEGTK="false"], [])
else
AC_MSG_RESULT(found.)
AC_SEARCH_LIBS(gtk_init, [gtk-3], [GTK3="true" USEGTK="true"], [GTK3="false" USEGTK="false"], [])
if test "$GTK3" = true; then
AC_SEARCH_LIBS(gtk_source_view_new, [gtksourceview-4], [GTK3="true" USEGTK="true"], [GTK3="false" USEGTK="false"], [])
if test "$GTK3" = true; then
AC_SEARCH_LIBS(webkit_web_view_new, [webkit2gtk-4.0], [GTK3="true" USEGTK="true"], [GTK3="false" USEGTK="false"], [])
fi
fi
fi
else
AC_MSG_RESULT(found.)
AC_SEARCH_LIBS(gtk_init, [gtk-4], [GTK4="true" USEGTK="true"], [GTK4="false" USEGTK="false"], [])
if test "$GTK4" = true; then
AC_SEARCH_LIBS(gtk_source_view_new, [gtksourceview-5], [GTK4="true" USEGTK="true"], [GTK4="false" USEGTK="false"], [])
if test "$GTK4" = true; then
AC_SEARCH_LIBS(webkit_web_view_new, [webkit2gtk-5.0], [GTK4="true" USEGTK="true"], [GTK4="false" USEGTK="false"], [])
fi
fi
fi
fi
fi
# No GTK found? Then verify presence of FLTK library
|