1 dnl Process this file with autoconf to produce a configure script.
2 dnl Created by Anjuta application wizard.
6 AM_INIT_AUTOMAKE([1.7.9 foreign dist-bzip2 dist-zip])
7 AM_CONFIG_HEADER(config.h)
16 if test x"$CC_FOR_BUILD" = x; then
17 if test x"$cross_compiling" = x"yes"; then
18 AC_CHECK_PROGS(CC_FOR_BUILD, gcc, cc)
24 AC_SUBST(CC_FOR_BUILD)
26 # introduce the optional configure parameter for the path of libXXX.a
30 [try this for the hb-library prefix install directory]
36 if test $hb_PATHSET = 1 ; then
39 HBINC="-I$with_hb/libhb -I$with_hb/contrib/include"
40 LDFLAGS="$LDFLAGS -L$with_hb/libhb -L$with_hb/contrib/lib"
41 AC_SUBST(HB_DIR, "$with_hb")
44 HBINC='-I$(top_srcdir)/'"$with_hb/libhb "'-I$(top_srcdir)/'"$with_hb/contrib/include"
45 LDFLAGS="$LDFLAGS "'-L$(top_srcdir)/'"$with_hb/libhb "'-L$(top_srcdir)/'"$with_hb/contrib/lib"
46 AC_SUBST(HB_DIR, '$(top_srcdir)/'"$with_hb")
50 HBINC='-I$(top_srcdir)/'"../libhb "'-I$(top_srcdir)/'"../contrib/include"
51 LDFLAGS="$LDFLAGS "'-L$(top_srcdir)/'"../libhb "'-L$(top_srcdir)/'"../contrib/lib"
52 AC_SUBST(HB_DIR, '$(top_srcdir)/'"..")
56 AS_HELP_STRING([--enable-dl], [enable libdl]),
57 use_libdl=yes, use_libdl=no)
59 AC_ARG_ENABLE(pthread,
60 AS_HELP_STRING([--enable-pthread], [enable libpthread]),
61 use_libpthread=yes, use_libpthread=no)
63 AC_ARG_ENABLE(fdk-aac,
64 AS_HELP_STRING([--enable-fdk-aac], [enable fdk aac encoder]),
65 use_fdk_aac=yes, use_fdk_aac=no)
68 AS_HELP_STRING([--enable-x265], [enable x265 encoder]),
69 use_x265=yes, use_x265=no)
72 AS_HELP_STRING([--enable-qsv], [enable QSV encoder]),
73 use_qsv=yes, use_qsv=no)
76 AS_HELP_STRING([--disable-gst], [disable gstreamer (live preview)]),
77 gst_disable=yes, gst_disable=no)
79 AC_ARG_ENABLE(update-checks,
80 AS_HELP_STRING([--disable-update-checks], [disable update checks]),
81 update_checks=no, update_checks=yes)
83 # overwrite global variable (used for Makefile generation)
84 AC_SUBST(GLOBALCXXFLAGS, $CXXFLAGS )
85 AC_SUBST(GLOBALLDFLAGS, $LDFLAGS )
89 dnl ***************************************************************************
90 dnl Internatinalization
91 dnl ***************************************************************************
93 AC_SUBST(GETTEXT_PACKAGE)
94 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
96 IT_PROG_INTLTOOL([0.35.0])
104 GHB_PACKAGES="gthread-2.0 gio-2.0 gmodule-2.0"
110 pkg_gudev="gudev-1.0"
113 GHB_PACKAGES="gthread-2.0 gio-2.0 libnotify dbus-glib-1 gmodule-2.0 $pkg_gudev"
119 GHB_PACKAGES="gtk+-3.0 $GHB_PACKAGES"
121 GST1_MODULES="gstreamer-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 gstreamer-pbutils-1.0"
123 if test "x$gst_disable" = "xno" ; then
124 PKG_CHECK_MODULES(GStreamer1, [$GST1_MODULES], use_gst1=yes, use_gst1=no)
125 if test "x$use_gst1" = "xyes" ; then
126 GHB_PACKAGES="$GHB_PACKAGES $GST1_MODULES"
132 if test "x$gst_disable" = "xno" ; then
133 CXXFLAGS="$CXXFLAGS -D_ENABLE_GST"
134 CFLAGS="$CFLAGS -D_ENABLE_GST"
137 if test "x$update_checks" = "xyes" ; then
138 PKG_CHECK_MODULES(WebKitGtk3, webkitgtk-3.0, use_webkitgtk3=yes, use_webkitgtk3=no)
139 if test "x$use_webkitgtk3" = "xyes" ; then
140 GHB_PACKAGES="$GHB_PACKAGES webkitgtk-3.0"
143 CFLAGS="$CFLAGS -D_NO_UPDATE_CHECK"
146 CFLAGS="$CFLAGS -D_NO_UPDATE_CHECK"
149 PKG_CHECK_MODULES([GHB_GTK_3_14], [gtk+-3.0 >= 3.14], [HAVE_GTK_314=1], [HAVE_GTK_314=0])
150 PKG_CHECK_MODULES([GHB_GTK_3_12], [gtk+-3.0 >= 3.12], [HAVE_GTK_312=1], [HAVE_GTK_312=0])
151 AM_CONDITIONAL([GHB_GTK_3_14], [test "$HAVE_GTK_314" -eq 1])
152 AM_CONDITIONAL([GHB_GTK_3_12], [test "$HAVE_GTK_312" -eq 1])
154 AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"])
156 PKG_CHECK_MODULES(GHB, [$GHB_PACKAGES])
158 GHB_CFLAGS="$HBINC $GHB_CFLAGS"
160 HB_LIBS="-lhandbrake -lavresample -lavformat -lavcodec -lavutil -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson"
164 if test "x$use_libdl" = "xyes" ; then
167 if test "x$use_libpthread" = "xyes" ; then
168 HB_LIBS+=" -lpthread"
170 HB_LIBS+=" -lpthreadGC2"
172 HB_LIBS+=" -lregex -luuid"
175 HB_LIBS+=" -ldl -lpthread"
179 if test "x$use_fdk_aac" = "xyes" ; then
180 HB_LIBS+=" -lfdk-aac"
183 if test "x$use_x265" = "xyes" ; then
187 if test "x$use_qsv" = "xyes" ; then