Skip to content
This repository
Browse code

* configure.ac: remove gtk+2 support (only gtk+3)

  • Loading branch information...
commit cfb4db1a9b884a5c7d7bd39af2a2404641a01db9 1 parent 84477bc
Dirk-Jan C. Binnema authored March 17, 2013

Showing 1 changed file with 27 additions and 87 deletions. Show diff stats Hide diff stats

  1. 114  configure.ac
114  configure.ac
@@ -110,6 +110,11 @@ AC_SUBST(GLIB_CFLAGS)
110 110
 AC_SUBST(GLIB_LIBS)
111 111
 glib_version="`$PKG_CONFIG --modversion glib-2.0`"
112 112
 
  113
+PKG_CHECK_MODULES(GIO,gio-2.0,[have_gio=yes],[have_gio=no])
  114
+AC_SUBST(GIO_CFLAGS)
  115
+AC_SUBST(GIO_LIBS)
  116
+gio_version="`$PKG_CONFIG --modversion gio-2.0`"
  117
+
113 118
 # gmime 2.4 or 2.6?
114 119
 PKG_CHECK_MODULES(GMIME,gmime-2.6,[have_gmime_26=yes],[have_gmime_26=no])
115 120
 AS_IF([test "x$have_gmime_26" = "xno"],[
@@ -169,82 +174,28 @@ AC_DEFINE(MU_STORE_SCHEMA_VERSION,["9.9"], ['Schema' version of the database])
169 174
 
170 175
 
171 176
 ###############################################################################
172  
-# we need gtk (2 or 3) for some of the graphical tools
173  
-#
174  
-AC_ARG_WITH([gui],
175  
-   [AS_HELP_STRING([--with-gui=gtk2|gtk3|none])],
176  
-   [gui=$withval],[gui=auto])
177  
-
178  
-AS_IF([test "x$gui" != "xgtk2" -a "x$gui" != "xgtk3" -a "x$gui" != "xnone" \
179  
-	-a "x$gui" != "xauto"],
180  
-      AC_MSG_ERROR([the argument for --with-gui= must be either \
181  
-      			gtk2|gtk3|auto|no ($gui)]))
182  
-AS_IF([test "x$gui" != "xnone"],[
183  
-   # check for gtk3
184  
-   AS_IF([test "x$gui" != "xgtk2"],[
185  
-     PKG_CHECK_MODULES(GTK,gtk+-3.0,[have_gtk3=yes],[have_gtk3=no])
  177
+# we need GTK+3 for some of the graphical tools
  178
+# use --without-gtk to disable it
  179
+AC_ARG_ENABLE([gtk],AS_HELP_STRING([--disable-gtk],[Disable GTK+]))
  180
+AS_IF([test "x$enable_gtk" != "xno"],[
  181
+     PKG_CHECK_MODULES(GTK,gtk+-3.0,[have_gtk=yes],[have_gtk=no])
186 182
      AC_SUBST(GTK_CFLAGS)
187 183
      AC_SUBST(GTK_LIBS)
188  
-     gtk_version="`$PKG_CONFIG --modversion gtk+-3.0`"
189  
-   ])
190  
-   AS_IF([test "x$gui"="gtk3" -a "x$have_gtk3" = "xno"],
191  
-      AC_MSG_ERROR([GTK+ 3.x not found]))
192  
-
193  
-   # check for gtk2 if we did not find gtk3 already
194  
-   # (gtk3 is only sought if asked for it explicitly)
195  
-   AS_IF([test "x$gui" != "xnone" -a "x$have_gtk3" != "xyes"],[
196  
-     PKG_CHECK_MODULES(GTK,gtk+-2.0,[have_gtk2=yes],[have_gtk2=no])
197  
-     AC_SUBST(GTK_CFLAGS)
198  
-     AC_SUBST(GTK_LIBS)
199  
-     gtk_version="`$PKG_CONFIG --modversion gtk+-2.0`"
200  
-   ])
201  
-   # only an error if we explicitly asked for it
202  
-   AS_IF([test "x$have_gtk2" = "xno" -a "x$gui" != "xauto"],
203  
-      AC_MSG_ERROR([GTK+ 2.x not found]))
204  
-])
205  
-
206  
-AM_CONDITIONAL(HAVE_GTK,[test "x$have_gtk2" = "xyes" -o "x$have_gtk3" = "xyes"])
207  
-AS_IF([test "x$have_gtk2" = "xyes" -o "x$have_gtk3" = "xyes"],[buildgui=yes],
208  
-    	    [buildgui=no])
209  
-AS_IF([test "x$have_gtk3" = "xyes"],
210  
-    [AC_DEFINE_UNQUOTED([HAVE_GTK3],1,[Whether we have GTK+ 3.x])])
  184
+     gtk_version="`$PKG_CONFIG --modversion gtk+-3.0`"])
  185
+AM_CONDITIONAL(HAVE_GTK,[test "x$have_gtk" = "xyes"])
211 186
 
212 187
 # webkit? needed for the fancy web widget
213 188
 # use --disable-webkit to disable it, even if you have it
214  
-# note; gtk2 and gtk3 imply different webkit versions
215  
-build_webkit=no
216  
-AC_ARG_ENABLE([webkit],
217  
-   AS_HELP_STRING([--disable-webkit],[Disable webkit]))
218  
-AS_IF([test "x$enable_webkit" != "xno"], [
219  
-   AS_IF([test "x$have_gtk2" = "xyes"],[
220  
-       PKG_CHECK_MODULES(WEBKIT,webkit-1.0 >= 1.0.3,[build_webkit=yes],[build_webkit=no])
221  
-       AS_IF([test "x$build_webkit" = "xyes"],[
222  
-	    webkit_version="`$PKG_CONFIG --modversion webkit-1.0`"])
223  
-       AC_SUBST(WEBKIT_CFLAGS)
224  
-       AC_SUBST(WEBKIT_LIBS)])
225  
-
226  
-   AS_IF([test "x$have_gtk3" = "xyes"],[
227  
-       PKG_CHECK_MODULES(WEBKIT,webkitgtk-3.0 >= 1.8.0, [build_webkit=yes],[build_webkit=no])
228  
-       AS_IF([test "x$build_webkit" = "xyes"],[
  189
+AC_ARG_ENABLE([webkit],AS_HELP_STRING([--disable-webkit],[Disable webkit]))
  190
+AS_IF([test "x$enable_webkit" != "xno"],[
  191
+       PKG_CHECK_MODULES(WEBKIT,webkitgtk-3.0 >= 1.8.0,[have_webkit=yes],[have_webkit=no])
  192
+       AS_IF([test "x$have_webkit" = "xyes"],[
229 193
 	    webkit_version="`$PKG_CONFIG --modversion webkitgtk-3.0`"])
230 194
        AC_SUBST(WEBKIT_CFLAGS)
231  
-       AC_SUBST(WEBKIT_LIBS)])
232  
-])
233  
-AM_CONDITIONAL(BUILD_WEBKIT, [test "x$build_webkit" = "xyes"])
234  
-
235  
-
236  
-# gio is needed for some widget/ things
237  
-AS_IF([test "x$buildgui"="xyes"],[
238  
-   PKG_CHECK_MODULES(GIO,gio-2.0,[have_gio=yes],[have_gio=no])
239  
-   AS_IF([test "x$have_gio" = "xyes"],[
240  
-	    gio_version="`$PKG_CONFIG --modversion gio-2.0`"])
241  
-   AC_SUBST(GIO_CFLAGS)
242  
-   AC_SUBST(GIO_LIBS)
  195
+       AC_SUBST(WEBKIT_LIBS)
243 196
 ])
244  
-AM_CONDITIONAL(HAVE_GIO, [test "x$have_gio" = "xyes"])
245  
-
246  
-# should we build the gui toys?
247  
-AM_CONDITIONAL(BUILD_GUI, [test "x$build_webkit" = "xyes" -a "x$have_gio" = "xyes"])
  197
+AM_CONDITIONAL(HAVE_WEBKIT, [test "x$have_webkit" = "xyes"])
  198
+AM_CONDITIONAL(BUILD_GUI,[test "x$have_webkit" = "xyes" -a "x$have_gtk" = "xyes"])
248 199
 ###############################################################################
249 200
 
250 201
 
@@ -344,21 +295,10 @@ echo "Xapian version                       : $xapian_version"
344 295
 echo "GLib version                         : $glib_version"
345 296
 echo "GMime version                        : $gmime_version"
346 297
 
347  
-if test "x$buildgui" = "xyes"; then
  298
+AM_COND_IF([BUILD_GUI],[
348 299
 echo "GTK+ version                         : $gtk_version"
349  
-fi
350  
-
351  
-if test "x$have_gio" = "xyes"; then
352  
-echo "GIO version                          : $gio_version"
353  
-fi
354  
-
355  
-if test "x$build_webkit" = "xyes"; then
356 300
 echo "Webkit version                       : $webkit_version"
357  
-fi
358  
-
359  
-if test "x$build_guile" = "xyes"; then
360  
-echo "Guile version                        : $guile_version"
361  
-fi
  301
+])
362 302
 
363 303
 if test "x$build_mu4e" = "xyes"; then
364 304
 echo "Emacs version                        : $emacs_version"
@@ -368,7 +308,11 @@ echo
368 308
 echo "Have wordexp                         : $ac_cv_header_wordexp_h"
369 309
 echo "Build mu4e emacs frontend            : $build_mu4e"
370 310
 echo "Build crypto support (gmime >= 2.6)  : $have_gmime_26"
371  
-echo "Build 'mug' toy-ui (gtk+/webkit)     : $buildgui"
  311
+AM_COND_IF([BUILD_GUI],[
  312
+echo "Build 'mug' toy-ui (gtk+/webkit)     : yes"],[
  313
+echo "Build 'mug' toy-ui (gtk+/webkit)     : no"
  314
+])
  315
+
372 316
 echo "McCabe's Cyclomatic Complexity tool  : $have_pmccabe"
373 317
 echo
374 318
 
@@ -395,10 +339,6 @@ if test "x$buildgui" = "xyes"; then
395 339
      echo
396 340
 fi
397 341
 
398  
-# the unit tests
399  
-echo "* You can run 'make check' to run the unit tests"
400  
-echo
401  
-
402 342
 # wordexp
403 343
 if test "x$ac_cv_header_wordexp_h" != "xyes"; then
404 344
    echo "* Your system does not seem to have the 'wordexp' function."
@@ -410,5 +350,5 @@ if test "x$ac_cv_header_wordexp_h" != "xyes"; then
410 350
 fi
411 351
 
412 352
 echo
413  
-echo "Now, type 'make' to build mu."
  353
+echo "Now, type 'make' to build mu (or 'make check' to run the unit tests, too)"
414 354
 echo

0 notes on commit cfb4db1

Please sign in to comment.
Something went wrong with that request. Please try again.