Changeset 107016 in webkit


Ignore:
Timestamp:
Feb 7, 2012 5:16:40 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Get rid of Source/autotools/webkit.m4
https://bugs.webkit.org/show_bug.cgi?id=77833

Patch by Priit Laes <plaes@plaes.org> on 2012-02-07
Reviewed by Martin Robinson.

Move checks from webkit.m4 to configure.ac and modernize macros:

. Check for visibility flags after CXX has been defined
. Use PKG_PROG_PKG_CONFIG for pkg-config lookup
. Drop unused LIBFFTW_REQUIRED_VERSION
. Update ICU libs for mingw (bug 77837).
. Require Pango 1.21.0 (as per unicode backend)
. Bump minimum glib version due to g_thread_init changes

  • Source/autotools/webkit.m4: Removed.
  • configure.ac:
Location:
trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r106960 r107016  
     12012-02-07  Priit Laes  <plaes@plaes.org>
     2
     3        Get rid of Source/autotools/webkit.m4
     4        https://bugs.webkit.org/show_bug.cgi?id=77833
     5
     6        Reviewed by Martin Robinson.
     7
     8        Move checks from webkit.m4 to configure.ac and modernize macros:
     9          . Check for visibility flags after CXX has been defined
     10          . Use PKG_PROG_PKG_CONFIG for pkg-config lookup
     11          . Drop unused LIBFFTW_REQUIRED_VERSION
     12          . Update ICU libs for mingw (bug 77837).
     13          . Require Pango 1.21.0 (as per unicode backend)
     14          . Bump minimum glib version due to g_thread_init changes
     15
     16        * Source/autotools/webkit.m4: Removed.
     17        * configure.ac:
     18
    1192012-02-07  Ryosuke Niwa  <rniwa@webkit.org>
    220
  • trunk/configure.ac

    r106944 r107016  
    7878esac
    7979
    80 # initialize webkit options
    81 WEBKIT_INIT
     80# If CFLAGS and CXXFLAGS are unset, default to empty.
     81# This is to tell automake not to include '-g' if C{XX,}FLAGS is not set
     82# For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler
     83if test -z "$CXXFLAGS"; then
     84   CXXFLAGS=""
     85fi
     86if test -z "$CFLAGS"; then
     87   CFLAGS=""
     88fi
     89
     90PKG_PROG_PKG_CONFIG
     91
     92AC_PATH_PROG(PERL, perl)
     93if test -z "$PERL"; then
     94   AC_MSG_ERROR([You need 'perl' to compile WebKit])
     95fi
     96
     97AC_PATH_PROG(PYTHON, python)
     98if test -z "$PYTHON"; then
     99   AC_MSG_ERROR([You need 'python' to compile WebKit])
     100fi
     101
     102AC_PATH_PROG(BISON, bison)
     103if test -z "$BISON"; then
     104   AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit])
     105fi
     106
     107AC_PATH_PROG(MV, mv)
     108if test -z "$MV"; then
     109   AC_MSG_ERROR([You need 'mv' to compile WebKit])
     110fi
     111
     112AC_PROG_CC
     113AC_PROG_CXX
     114AM_PROG_CC_STDC
     115AM_PROG_CC_C_O
     116AC_PROG_INSTALL
     117AC_SYS_LARGEFILE
     118
     119# Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
     120# doesn't exist)
     121AC_LANG_PUSH([C++])
     122AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
     123AC_LANG_POP([C++])
     124
     125# C/C++ Language Features
     126AC_C_CONST
     127AC_C_INLINE
     128AC_C_VOLATILE
     129
     130# C/C++ Headers
     131AC_HEADER_STDC
     132AC_HEADER_STDBOOL
     133
     134# Linker
    82135AC_DISABLE_STATIC
    83136AC_LIBTOOL_WIN32_DLL
     
    99152   AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
    100153fi
     154
     155# check for -fvisibility=hidden compiler support (GCC >= 4)
     156saved_CFLAGS="$CFLAGS"
     157CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
     158AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
     159AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
     160      [ AC_MSG_RESULT([yes])
     161        SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
     162        AC_MSG_RESULT([no]))
     163CFLAGS="$saved_CFLAGS"
     164AC_SUBST(SYMBOL_VISIBILITY)
     165AC_SUBST(SYMBOL_VISIBILITY_INLINES)
    101166
    102167# Disable C++0x compat warnings for GCC >= 4.6.0 until we build
     
    310375
    311376# minimum base dependencies
    312 LIBSOUP_REQUIRED_VERSION=2.37.2.1
    313377CAIRO_REQUIRED_VERSION=1.10
    314378FONTCONFIG_REQUIRED_VERSION=2.4
    315379FREETYPE2_REQUIRED_VERSION=9.0
     380GLIB_REQUIRED_VERSION=2.31.2
     381LIBSOUP_REQUIRED_VERSION=2.37.2.1
    316382LIBXML_REQUIRED_VERSION=2.6
    317 
    318 # minimum GTK+ base dependencies
    319 PANGO_REQUIRED_VERSION=1.12
     383PANGO_REQUIRED_VERSION=1.21.0
    320384
    321385# optional modules
     
    323387SQLITE_REQUIRED_VERSION=3.0
    324388ENCHANT_REQUIRED_VERSION=0.22
    325 LIBFFTW_REQUIRED_VERSION=3.2.2
    326389CLUTTER_REQUIRED_VERSION=1.8.2
    327390CLUTTER_GTK_REQUIRED_VERSION=1.0.2
    328391ATSPI2_REQUIRED_VERSION=2.2.1
    329392
    330 # Available modules
    331 #
    332 # glib - glib and includes gthread
    333 # unicode - check and identify which unicode backend to use
    334 #
    335 # todo: webcore gtk
    336 WEBKIT_CHECK_DEPENDENCIES([glib unicode])
     393# Check for glib and required utilities
     394AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :, :, gmodule gobject gthread gio)
     395if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then
     396   AC_MSG_ERROR([You need the GLib dev tools in your path])
     397fi
     398GLIB_GSETTINGS
     399
     400# Check and identify which unicode backend to use
     401AC_MSG_CHECKING([which Unicode backend to use])
     402AC_ARG_WITH(unicode_backend,
     403            AC_HELP_STRING([--with-unicode-backend=@<:@icu/glib@:>@],
     404                           [Select Unicode backend (WARNING: the glib-based backend is slow, and incomplete) [default=icu]]),
     405            [],[with_unicode_backend="icu"])
     406
     407case "$with_unicode_backend" in
     408     icu|glib) ;;
     409     *) AC_MSG_ERROR([Invalid Unicode backend: must be icu or glib.]) ;;
     410esac
     411
     412AC_MSG_RESULT([$with_unicode_backend])
     413
     414if test "$with_unicode_backend" = "icu"; then
     415    # TODO: use pkg-config (after CFLAGS in their .pc files are cleaned up)
     416    case "$host" in
     417        *-*-darwin*)
     418            UNICODE_CFLAGS="-I$srcdir/Source/JavaScriptCore/icu -I$srcdir/Source/WebCore/icu"
     419            UNICODE_LIBS="-licucore"
     420            ;;
     421        *-*-mingw*)
     422            UNICODE_CFLAGS=""
     423            UNICODE_LIBS="-licui18n -licuuc"
     424            ;;
     425        *)
     426            AC_PATH_PROG(icu_config, icu-config, no)
     427            if test "$icu_config" = "no"; then
     428                AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.])
     429            fi
     430
     431            # We don't use --cflags as this gives us a lot of things that we don't
     432            # necessarily want, like debugging and optimization flags
     433            # See man (1) icu-config for more info.
     434            UNICODE_CFLAGS=`$icu_config --cppflags`
     435            UNICODE_LIBS=`$icu_config --ldflags-libsonly`
     436            ;;
     437    esac
     438fi
     439
     440if test "$with_unicode_backend" = "glib"; then
     441    PKG_CHECK_MODULES([UNICODE], [glib-2.0 pango >= $PANGO_REQUIRED_VERSION])
     442fi
     443
     444AC_SUBST([UNICODE_CFLAGS])
     445AC_SUBST([UNICODE_LIBS])
     446
     447PKG_CHECK_MODULES([ZLIB], [zlib])
     448AC_SUBST([ZLIB_CFLAGS])
     449AC_SUBST([ZLIB_LIBS])
    337450
    338451GETTEXT_PACKAGE=$PACKAGE-$GTK_API_VERSION
Note: See TracChangeset for help on using the changeset viewer.