~gue5t/midori/suggestion-regression

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# This file is licensed under the terms of the expat license, see the file EXPAT.
# Register ourselves to autoconf
AC_INIT([midori], [0.0.21], [http://www.twotoasts.de/bugs])
AC_CONFIG_SRCDIR([midori/midori-stock.h])
AC_CONFIG_HEADER([config.h])

AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()])
AM_PROG_LIBTOOL

# Checks for programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_INTLTOOL

# Checks for header files
AC_HEADER_STDC

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks if we want debugging support
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/yes@:>@]
 , [Enable debugging @<:@default=yes@:>@])
 , [], [enable_debug=yes])
AC_MSG_CHECKING([whether to enable debugging support])
AC_MSG_RESULT([$enable_debug])
if test x"$enable_debug" = x"yes"; then
  # Check whether the compiler accepts -Wall
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Wall"
  AC_MSG_CHECKING([whether $CC accepts -Wall])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
  ], [
    AC_MSG_RESULT([no])
    CFLAGS="$save_CFLAGS"
  ])
fi

# Checks for Unique
PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= 0.9, have_unique=1, have_unique=0)
AC_SUBST(UNIQUE_CFLAGS)
AC_SUBST(UNIQUE_LIBS)
AC_DEFINE_UNQUOTED(HAVE_UNIQUE,$have_unique, [Whether Unique is available])

# Checks for GIO2
PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16, have_gio=1, have_gio=0)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
AC_DEFINE_UNQUOTED(HAVE_GIO,$have_gio, [Whether GIO is available])

# Checks for Gtk+2
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6, have_gtk=1, have_gtk=0)
if test "x${have_gtk}" = "xfalse" ; then
    AC_MSG_ERROR([No Gtk+2 package information found])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_DEFINE_UNQUOTED(HAVE_GTK,$have_gtk, [Whether Gtk is available])

# Checks for GtkSourceView
PKG_CHECK_MODULES(GTKSOURCEVIEW, gtksourceview-2.0, have_gtksourceview=1, have_gtksourceview=0)
AC_SUBST(GTKSOURCEVIEW_CFLAGS)
AC_SUBST(GTKSOURCEVIEW_LIBS)
AC_DEFINE_UNQUOTED(HAVE_GTKSOURCEVIEW,$have_gtksourceview, [Whether GtkSourceView is available])

# Checks for WebKit
PKG_CHECK_MODULES(WEBKIT, webkit-1.0, have_webkit=1, have_webkit=0)
if test "x${have_webkit}" = "xfalse" ; then
    AC_MSG_ERROR([No WebKit package information found])
fi
AC_SUBST(WEBKIT_CFLAGS)
AC_SUBST(WEBKIT_LIBS)
AC_DEFINE_UNQUOTED(HAVE_WEBKIT,$have_webkit, [Whether WebKit is available])

# Checks for LibXML2
PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6, have_libxml=1, have_libxml=0)
if test "x${have_libxml}" = "xfalse" ; then
    AC_MSG_ERROR([No libXML2 package information found])
fi
AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_LIBS)
AC_DEFINE_UNQUOTED(HAVE_LIBXML,$have_libxml, [Whether LibXML is available])

# Check for sqlite 3
PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.0], have_sqlite3=1, have_sqlite3=0)
AC_SUBST([SQLITE3_CFLAGS])
AC_SUBST([SQLITE3_LIBS])
AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$have_sqlite3, [Whether sqlite3 is available])

# i18n
GETTEXT_PACKAGE=midori
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])

# take all languages found in file po/LINGUAS
ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`"

AM_GLIB_GNU_GETTEXT
# workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
if test "x$MSGFMT" = "xno"; then
    AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
fi


# Here we tell the configure script which files to *create*
AC_CONFIG_FILES([
    Makefile       \
    katze/Makefile \
    midori/Makefile   \
    po/Makefile.in \
    icons/Makefile
])
AC_OUTPUT