/shells/

='n45' href='#n45'>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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460
# Copyright © 2000-2004 Marco Pesenti Gritti
# Copyright © 2003, 2004, 2005, 2006, 2007 Christian Persch
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

m4_define([epiphany_version_major],[2])
m4_define([epiphany_version_minor],[29])
m4_define([epiphany_version_micro],[3])
m4_define([epiphany_version],[epiphany_version_major.epiphany_version_minor.epiphany_version_micro])

# This can be either "trunk" or "branches/gnome-x-y"
m4_define([epiphany_branch],["trunk"])

AC_INIT([GNOME Web Browser],[epiphany_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany],[epiphany])

GNOME_COMMON_INIT

AC_PREREQ([2.59])

AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([configure.ac])

EPIPHANY_API_VERSION=2.29

# This should stay at the major version of the latest stable releases
EPIPHANY_UA_VERSION=2.28

AC_SUBST([EPIPHANY_MAJOR],[epiphany_version_major.epiphany_version_minor])
AC_SUBST([EPIPHANY_API_VERSION])
AC_SUBST([EPIPHANY_UA_VERSION])

# for EPHY_CHECK_VERSION
AC_SUBST([EPIPHANY_MAJOR_VERSION], [epiphany_version_major])
AC_SUBST([EPIPHANY_MINOR_VERSION], [epiphany_version_minor])
AC_SUBST([EPIPHANY_MICRO_VERSION], [epiphany_version_micro])

# Build ID
BUILDID="$(TZ=UTC0 date +'%Y%m%d')"
AC_SUBST([BUILDID])

AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip tar-ustar])

# Use AM_SILENT_RULES if present
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

if test -z "$enable_maintainer_mode"; then
  enable_maintainer_mode=yes
fi
AM_MAINTAINER_MODE([enable])

AC_ENABLE_SHARED([yes])
AC_ENABLE_STATIC([no])

AC_LIBTOOL_DLOPEN
LT_PREREQ(2.2)
LT_INIT

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])

IT_PROG_INTLTOOL([0.40.0])

PKG_PROG_PKG_CONFIG

GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES

MORE_WARN_FLAGS=
DEPRECATION_FLAGS=

if test "$enable_maintainer_mode" = "yes"; then
    AC_DEFINE([MAINTAINER_MODE],[1],[Define to enable 'maintainer-only' behaviour])
    enable_debug=yes
    DEPRECATION_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
fi

GLIB_REQUIRED=2.19.7
GTK_REQUIRED=2.18.0
LIBXML_REQUIRED=2.6.12
LIBXSLT_REQUIRED=1.1.7
LIBSTARTUP_NOTIFICATION_REQUIRED=0.5
LIBNOTIFY_REQUIRED=0.4
DBUS_GLIB_REQUIRED=0.35
WEBKIT_GTK_REQUIRED=1.1.18
LIBSOUP_GNOME_REQUIRED=2.29.4
GNOME_KEYRING_REQUIRED=2.26.0

PKG_CHECK_EXISTS([libnotify >= $LIBNOTIFY_REQUIRED],[have_libnotify=yes],[have_libnotify=no])

LIBNOTIFY_PACKAGE=
if test "$have_libnotify" = "yes"; then
  LIBNOTIFY_PACKAGE="libnotify >= $LIBNOTIFY_REQUIRED"
  AC_DEFINE([HAVE_LIBNOTIFY],[1],[Define if libnotify is available])
fi

# Tests

AC_MSG_CHECKING([whether to build tests])
AC_ARG_ENABLE([tests],
    AS_HELP_STRING([--enable-tests],[Wheter to build tests (default: yes)]),
    [], [enable_tests=yes])
AC_MSG_RESULT([$enable_tests])

AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"])

PKG_CHECK_MODULES([DEPENDENCIES], [
          glib-2.0 >= $GLIB_REQUIRED
          gmodule-2.0
          gthread-2.0
          gio-unix-2.0 >= $GLIB_REQUIRED
          gtk+-2.0 >= $GTK_REQUIRED
          gtk+-unix-print-2.0 >= $GTK_REQUIRED
          ice
          x11
          sm
          libxml-2.0 >= $LIBXML_REQUIRED
          libxslt >= $LIBXSLT_REQUIRED
          gconf-2.0
          libstartup-notification-1.0 >= $LIBSTARTUP_NOTIFICATION_REQUIRED
          $LIBNOTIFY_PACKAGE
          webkit-1.0 >= $WEBKIT_GTK_REQUIRED
          libsoup-gnome-2.4 >= $LIBSOUP_GNOME_REQUIRED
          gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED
          ])

# ****
# DBUS
# ****

PKG_CHECK_MODULES([DBUS],[dbus-glib-1 >= $DBUS_GLIB_REQUIRED])

AC_PATH_PROG([DBUS_BINDING_TOOL],[dbus-binding-tool],[no])

if test "$DBUS_BINDING_TOOL" = "no"; then
    AC_MSG_ERROR([dbus-binding-tool not found])
fi

# *****
# GConf
# *****

AM_GCONF_SOURCE_2

AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])

if test "$GCONFTOOL" = "no"; then
    AC_MSG_ERROR([gconftool-2 not found])
fi

# ******************
# Portability checks
# ******************

AC_CHECK_FUNCS([localtime_r memchr memmove memset mkdir mkdtemp realpath sqrt strchr strcspn strdup strerror strrchr strtol strtoul strstr])

# for backtrace()
AC_CHECK_HEADERS([execinfo.h fcntl.h])
AC_C_INLINE
AC_FUNC_MKTIME
AC_FUNC_STRTOD
AC_TYPE_SIZE_T

# Check for -Wdeclaration-after-statement (since gcc 3.4)

if test "$enable_maintainer_mode" = "yes"; then

    AC_LANG_PUSH([C])
    _FLAGS="-Wdeclaration-after-statement"
    _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $_FLAGS"

    AC_CACHE_CHECK([for compiler $FLAGS option],
        ac_cv_have_declaration_after_statement,
        [AC_COMPILE_IFELSE(
            [AC_LANG_SOURCE([[int main () { return 0; }]])],
            [ac_cv_have_declaration_after_statement="yes"],
            [ac_cv_have_declaration_after_statement="no"],
            [ac_cv_have_declaration_after_statement="maybe"])])
    
    if test "$ac_cv_have_declaration_after_statement" = "yes"; then
        MORE_WARN_FLAGS="$MORE_WARN_FLAGS $_FLAGS"
    fi
    CFLAGS="$_SAVE_CFLAGS"
    AC_LANG_POP([C])
fi

# ***************
# Multimedia keys
# ***************

AC_CHECK_HEADERS([X11/XF86keysym.h])

EPIPHANY_FEATURES=

# *********************
# GObject Introspection
# *********************

GOBJECT_INTROSPECTION_CHECK([0.6.7])

if test "$found_introspection" = "yes"; then
  EPIPHANY_FEATURES="$EPIPHANY_FEATURES introspection"
  AC_DEFINE([ENABLE_INTROSPECTION], [1], [Define to enable introspection support])
fi

# ****
# Seed
# ****

AC_MSG_CHECKING([whether Seed support is requested])
AC_ARG_ENABLE([seed],
  [AS_HELP_STRING([--enable-seed],[Enable Seed support (default: disabled)])],
  [],[enable_seed=no])