OSDN Git Service

LinGui: make Help->Guide work on windows/mingw
[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(dl,
49         AS_HELP_STRING([--enable-dl], [enable libdl]),
50         use_libdl=yes, use_libdl=no)
51
52 AC_ARG_ENABLE(gst,
53         AS_HELP_STRING([--enable-gst], [enable gstreamer on Win32]),
54         w32_gst=yes, w32_gst=no)
55
56 AC_ARG_ENABLE(update-checks,
57         AS_HELP_STRING([--disable-update-checks], [disable update checks]),
58         update_checks=no, update_checks=yes)
59
60 # overwrite global variable (used for Makefile generation)
61 AC_SUBST(GLOBALCXXFLAGS, $CXXFLAGS )
62 AC_SUBST(GLOBALLDFLAGS, $LDFLAGS )
63
64
65
66 dnl ***************************************************************************
67 dnl Internatinalization
68 dnl ***************************************************************************
69 GETTEXT_PACKAGE=ghb
70 AC_SUBST(GETTEXT_PACKAGE)
71 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
72 AM_GLIB_GNU_GETTEXT
73 IT_PROG_INTLTOOL([0.35.0])
74
75 AM_PROG_LIBTOOL
76
77 case $host in
78   *-*-mingw*)
79     if test "x$w32_gst" = "xyes" ; then
80                 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"
81         else
82         GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0"
83         fi
84         mingw_flag=yes
85     ;;
86   *)
87         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"
88         mingw_flag=no
89     ;;
90 esac
91
92 if test "x$w32_gst" = "xyes" -o  "x$mingw_flag" != "xyes" ; then
93         CXXFLAGS="$CXXFLAGS -D_ENABLE_GST"
94         CFLAGS="$CFLAGS -D_ENABLE_GST"
95 fi
96
97 PKG_PROG_PKG_CONFIG
98 if test "x$update_checks" = "xyes" ; then
99         PKG_CHECK_MODULES(OldWebKitGtk, WebKitGtk, old_webkit=yes, old_webkit=no)
100         if test "x$old_webkit" = "xyes" ; then
101                 if test "x$mingw_flag" = "xno" ; then
102                         GHB_PACKAGES="$GHB_PACKAGES WebKitGtk"
103                         CXXFLAGS="$CXXFLAGS -D_OLD_WEBKIT"
104                         CFLAGS="$CFLAGS -D_OLD_WEBKIT"
105                 fi
106         else
107                 if test "x$mingw_flag" = "xno" ; then
108                         GHB_PACKAGES="$GHB_PACKAGES webkit-1.0"
109                 fi
110         fi
111 else
112         CFLAGS="$CFLAGS -D_NO_UPDATE_CHECK"
113 fi
114
115 AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"])
116
117 PKG_CHECK_MODULES(GHB, [$GHB_PACKAGES])
118
119 case $host in
120   *-*-mingw*)
121     if test "x$use_libdl" = "xyes" ; then
122                 GHB_LIBS="$GHB_LIBS -ldl"
123         fi
124     ;;
125 esac
126
127 AC_SUBST(GHB_CFLAGS)
128 AC_SUBST(GHB_LIBS)
129
130 AC_OUTPUT([
131 Makefile
132 src/Makefile
133 po/Makefile.in
134 ])