OSDN Git Service

LinGui: drop dependency on hal, use udev instead
[handbrake-jp/handbrake-jp-git.git] / gtk / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 dnl Created by Anjuta application wizard.
3
4 AC_INIT(ghb, 0.1)
5
6 AM_INIT_AUTOMAKE([1.7.9 foreign dist-bzip2 dist-zip])
7 AM_CONFIG_HEADER(config.h)
8 AM_MAINTAINER_MODE
9
10 AC_ISC_POSIX
11 AC_PROG_CC
12 AC_PROG_CXX
13 AM_PROG_CC_STDC
14 AC_HEADER_STDC
15
16 # introduce the optional configure parameter for the path of libXXX.a
17 AC_ARG_WITH(hb,
18         AC_HELP_STRING(
19             [--with-hb=prefix],
20             [try this for the hb-library prefix install directory]
21           ),
22           hb_PATHSET=1,
23           hb_PATHSET=0
24 )
25
26 if test  $hb_PATHSET = 1 ; then
27     case ${with_hb} in
28     /*)
29                 CXXFLAGS="$CXXFLAGS -I$with_hb/libhb"
30                 CFLAGS="$CFLAGS -I$with_hb/libhb"
31                 LDFLAGS="$LDFLAGS -L$with_hb/libhb -L$with_hb/contrib/lib"
32                 AC_SUBST(HB_DIR, "$with_hb")
33         ;;
34     *)
35                 CXXFLAGS="$CXXFLAGS "'-I$(top_srcdir)/'"$with_hb/libhb"
36                 CFLAGS="$CFLAGS "'-I$(top_srcdir)/'"$with_hb/libhb"
37                 LDFLAGS="$LDFLAGS "'-L$(top_srcdir)/'"$with_hb/libhb "'-L$(top_srcdir)/'"$with_hb/contrib/lib"
38                 AC_SUBST(HB_DIR, '$(top_srcdir)/'"$with_hb")
39         ;;
40     esac
41 else
42         CXXFLAGS="$CXXFLAGS "'-I$(top_srcdir)/'"../libhb"
43         CFLAGS="$CFLAGS "'-I$(top_srcdir)/'"../libhb"
44         LDFLAGS="$LDFLAGS "'-L$(top_srcdir)/'"../libhb "'-L$(top_srcdir)/'"../contrib/lib"
45         AC_SUBST(HB_DIR, '$(top_srcdir)/'"..")
46 fi
47
48 AC_ARG_ENABLE(gst,
49         AS_HELP_STRING([--enable-gst], [enable gstreamer on Win32]),
50         w32_gst=yes, w32_gst=no)
51
52 # overwrite global variable (used for Makefile generation)
53 AC_SUBST(GLOBALCXXFLAGS, $CXXFLAGS )
54 AC_SUBST(GLOBALLDFLAGS, $LDFLAGS )
55
56
57
58 dnl ***************************************************************************
59 dnl Internatinalization
60 dnl ***************************************************************************
61 GETTEXT_PACKAGE=ghb
62 AC_SUBST(GETTEXT_PACKAGE)
63 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
64 AM_GLIB_GNU_GETTEXT
65 IT_PROG_INTLTOOL([0.35.0])
66
67 AM_PROG_LIBTOOL
68
69 case $host in
70   *-*-mingw*)
71     if test "x$w32_gst" = "xyes" ; then
72                 GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0"
73         else
74         GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0"
75         fi
76         mingw_flag=yes
77     ;;
78   *)
79         GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify gudev-1.0"
80         mingw_flag=no
81     ;;
82 esac
83
84 if test "x$w32_gst" = "xyes" -o  "x$mingw_flag" != "xyes" ; then
85         CXXFLAGS="$CXXFLAGS -D_ENABLE_GST"
86         CFLAGS="$CFLAGS -D_ENABLE_GST"
87 fi
88
89 PKG_CHECK_MODULES(OldWebKitGtk, WebKitGtk, old_webkit=yes, old_webkit=no)
90 if test "x$old_webkit" = "xyes" ; then
91         if test "x$mingw_flag" = "xno" ; then
92                 GHB_PACKAGES="$GHB_PACKAGES WebKitGtk"
93                 CXXFLAGS="$CXXFLAGS -D_OLD_WEBKIT"
94                 CFLAGS="$CFLAGS -D_OLD_WEBKIT"
95         fi
96 else
97         if test "x$mingw_flag" = "xno" ; then
98                 GHB_PACKAGES="$GHB_PACKAGES webkit-1.0"
99         fi
100 fi
101
102 AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"])
103
104 PKG_CHECK_MODULES(GHB, [$GHB_PACKAGES])
105
106 AC_SUBST(GHB_CFLAGS)
107 AC_SUBST(GHB_LIBS)
108
109 AC_OUTPUT([
110 Makefile
111 src/Makefile
112 po/Makefile.in
113 ])