aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac56
1 files changed, 14 insertions, 42 deletions
diff --git a/configure.ac b/configure.ac
index 66bf7a1..d199130 100644
--- a/configure.ac
+++ b/configure.ac
@@ -581,51 +581,23 @@ AC_CHECK_LIB(smf, smf_load_from_memory,
581CFLAGS="$CFLAGS_OLD" 581CFLAGS="$CFLAGS_OLD"
582CPPFLAGS="$CPPFLAGS_OLD" 582CPPFLAGS="$CPPFLAGS_OLD"
583 583
584# check for gtk >= 2.6.0 584# check for gdk-pixbuf >= 2.4
585AC_MSG_CHECKING(for gtk) 585AC_MSG_CHECKING(for gdk-pixbuf)
586check_for_3=3.0.0 586PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.4], [have_gdk_pixbuf=yes], [have_gdk_pixbuf=no])
587check_for_2=2.6.0
588AC_ARG_WITH(gtk_version,
589 [ --with-gtk-version=VERSION version number of gtk to use (>=3.0.0 by default)],
590 [AC_MSG_RESULT([$with_gtk_version])
591 case $with_gtk_version in
592 *)
593 if test "x${with_gtk_version:0:1}" == "x2"
594 then
595 check_for_3=false
596 check_for_2=$with_gtk_version
597 elif test "x${with_gtk_version:0:1}" == "x3"
598 then
599 check_for_3=$with_gtk_version
600 check_for_2=false
601 fi
602 ;;
603 esac
604 ],
605 [AC_MSG_RESULT([--with-gtk-version not specified])])
606
607without_gtk=true
608if test "x$check_for_3" != "xfalse"
609then
610 AM_PATH_GTK_3_0([$check_for_3],without_gtk=false,without_gtk=true)
611fi
612
613if test "x$without_gtk" == "xtrue" -a "x$check_for_2" != "xfalse"
614then
615 AM_PATH_GTK_2_0([$check_for_2],without_gtk=false,without_gtk=true)
616fi
617 587
618AM_CONDITIONAL(HAVE_GTK, test x$without_gtk != xtrue) 588AM_CONDITIONAL(HAVE_GDK_PIXBUF, test x$have_gdk_pixbuf != xno)
619if test $without_gtk != true 589if test $have_gdk_pixbuf != no
620then 590then
621 AC_DEFINE_UNQUOTED([HAVE_GTK], 1, [We have GTK]) 591 have_gdk_pixbuf=1
622else 592else
623 AC_MSG_NOTICE([Cannot find GTK: Is pkg-config in path?]) 593 have_gdk_pixbuf=0
594 AC_MSG_NOTICE([Cannot find Gdk-pixbuf: Is pkg-config in path?])
624fi 595fi
596AC_DEFINE_UNQUOTED([HAVE_GDK_PIXBUF], [$have_gdk_pixbuf], [We have Gdk-pixbuf])
625 597
626CFLAGS="$CFLAGS $GTK_CFLAGS" 598CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
627CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" 599CPPFLAGS="$CPPFLAGS $GDK_PIXBUF_CFLAGS"
628LIBS="$LIBS $GTK_LIBS" 600LIBS="$LIBS $GDK_PIXBUF_LIBS"
629 601
630 602
631AC_ARG_WITH([gstreamer], AS_HELP_STRING([--with-gstreamer], [Build with the GStreamer plugin]), [], [with_gstreamer=yes]) 603AC_ARG_WITH([gstreamer], AS_HELP_STRING([--with-gstreamer], [Build with the GStreamer plugin]), [], [with_gstreamer=yes])
@@ -813,9 +785,9 @@ then
813 AC_MSG_NOTICE([NOTICE: FFmpeg/opus audio preview plugin disabled, It needs libav >= 10, or a FFmpeg with --enable-libavresample]) 785 AC_MSG_NOTICE([NOTICE: FFmpeg/opus audio preview plugin disabled, It needs libav >= 10, or a FFmpeg with --enable-libavresample])
814fi 786fi
815 787
816if test "x$without_gtk" = "xtrue" 788if test "x$have_gdk_pixbuf" = "x0"
817then 789then
818 AC_MSG_NOTICE([NOTICE: libgtk3+ not found, gtk thumbnail support disabled]) 790 AC_MSG_NOTICE([NOTICE: libgdk-pixbuf not found, gtk thumbnail support disabled])
819fi 791fi
820 792
821if test "x$HAVE_VORBISFILE_TRUE" = "x#" 793if test "x$HAVE_VORBISFILE_TRUE" = "x#"