Title: [107016] trunk
Revision
107016
Author
[email protected]
Date
2012-02-07 17:16:40 -0800 (Tue, 07 Feb 2012)

Log Message

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

Patch by Priit Laes <[email protected]> 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:

Modified Paths

Removed Paths

Diff

Modified: trunk/ChangeLog (107015 => 107016)


--- trunk/ChangeLog	2012-02-08 01:15:45 UTC (rev 107015)
+++ trunk/ChangeLog	2012-02-08 01:16:40 UTC (rev 107016)
@@ -1,3 +1,21 @@
+2012-02-07  Priit Laes  <[email protected]>
+
+        Get rid of Source/autotools/webkit.m4
+        https://bugs.webkit.org/show_bug.cgi?id=77833
+
+        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:
+
 2012-02-07  Ryosuke Niwa  <[email protected]>
 
         Dashboard on perf-o-matic should be sorted

Deleted: trunk/Source/autotools/webkit.m4 (107015 => 107016)


--- trunk/Source/autotools/webkit.m4	2012-02-08 01:15:45 UTC (rev 107015)
+++ trunk/Source/autotools/webkit.m4	2012-02-08 01:16:40 UTC (rev 107016)
@@ -1,171 +0,0 @@
-dnl macros to check for _javascript_Core and WebKit/Gtk+ dependencies
-dnl
-dnl The rationale is so that we can share these macros between 
-dnl WebKit and _javascript_Core builds.
-
-# global states
-m4_define([initialized], [no])
-
-AC_DEFUN([INIT_C_CXX_FLAGS],
-[dnl
-# If CXXFLAGS and CFLAGS are unset, default to empty.
-# This is to tell automake not to include '-g' if CXXFLAGS is not set
-# For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler
-if test -z "$CXXFLAGS"; then
-   CXXFLAGS=""
-fi
-if test -z "$CFLAGS"; then
-   CFLAGS=""
-fi
-])
-
-AC_DEFUN_ONCE([WEBKIT_INIT],
-[dnl
-dnl check if we have the required packages to have successful checks
-dnl
-# Make sure CXXFLAGS and CFLAGS are set before expanding AC_PROG_CXX to avoid
-# building with '-g -O2' on Release builds.
-AC_REQUIRE([INIT_C_CXX_FLAGS])
-
-# check for -fvisibility=hidden compiler support (GCC >= 4)
-saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
-AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
-      [ AC_MSG_RESULT([yes])
-        SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
-        AC_MSG_RESULT([no]))
-CFLAGS="$saved_CFLAGS"
-AC_SUBST(SYMBOL_VISIBILITY)
-AC_SUBST(SYMBOL_VISIBILITY_INLINES)
-
-# check for pkg-config
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test "$PKG_CONFIG" = "no"; then
-   AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed in your PATH])
-fi
-
-AC_PATH_PROG(PERL, perl)
-if test -z "$PERL"; then
-   AC_MSG_ERROR([You need 'perl' to compile WebKit])
-fi
-
-AC_PATH_PROG(PYTHON, python)
-if test -z "$PYTHON"; then
-   AC_MSG_ERROR([You need 'python' to compile WebKit])
-fi
-
-AC_PATH_PROG(BISON, bison)
-if test -z "$BISON"; then
-   AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit])
-fi
-
-AC_PATH_PROG(MV, mv)
-if test -z "$MV"; then
-   AC_MSG_ERROR([You need 'mv' to compile WebKit])
-fi
-
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AC_PROG_CXX])
-AM_PROG_CC_STDC
-AM_PROG_CC_C_O
-AC_PROG_INSTALL
-AC_SYS_LARGEFILE
-
-# Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
-# doesn't exist)
-AC_LANG_PUSH([C++])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
-AC_LANG_POP([C++])
-
-# C/C++ Language Features
-AC_C_CONST
-AC_C_INLINE
-AC_C_VOLATILE
-
-# C/C++ Headers
-AC_REQUIRE([AC_HEADER_STDC])
-AC_HEADER_STDBOOL
-
-m4_define([initialized], [yes])
-])
-
-AC_DEFUN_ONCE([WEBKIT_CHECK_DEPENDENCIES],
-[dnl
-dnl check for module dependencies
-for module in $1
-do
-    case $module in
-        glib) _WEBKIT_CHECK_GLIB ;;
-        unicode) _WEBKIT_CHECK_UNICODE ;;
-        *) AC_MSG_ERROR([I don't support that module. Sorry..]) ;;
-
-    esac
-done
-])
-
-AC_DEFUN_ONCE([_WEBKIT_CHECK_GLIB],
-[dnl
-dnl check for glib
-# Version requirements
-GLIB_REQUIRED_VERSION=2.27.90
-AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION)
-if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then
-   AC_MSG_ERROR([You need the GLib dev tools in your path])
-fi
-GLIB_GSETTINGS
-])
-
-AC_DEFUN_ONCE([_WEBKIT_CHECK_UNICODE],
-[dnl
-dnl determine the Unicode backend
-AC_MSG_CHECKING([which Unicode backend to use])
-AC_ARG_WITH(unicode_backend,
-            AC_HELP_STRING([--with-unicode-backend=@<:@icu/glib@:>@],
-                           [Select Unicode backend (WARNING: the glib-based backend is slow, and incomplete) [default=icu]]),
-            [],[with_unicode_backend="icu"])
-
-case "$with_unicode_backend" in
-     icu|glib) ;;
-     *) AC_MSG_ERROR([Invalid Unicode backend: must be icu or glib.]) ;;
-esac
-
-AC_MSG_RESULT([$with_unicode_backend])
-
-if test "$with_unicode_backend" = "icu"; then
-        case "$host" in
-            *-*-darwin*)
-		UNICODE_CFLAGS="-I$srcdir/Source/_javascript_Core/icu -I$srcdir/Source/WebCore/icu"
-		UNICODE_LIBS="-licucore"
-                ;;
-            *-*-mingw*)
-		UNICODE_CFLAGS=""
-		UNICODE_LIBS="-licuin -licuuc"
-                ;;
-            *)
-		AC_PATH_PROG(icu_config, icu-config, no)
-		if test "$icu_config" = "no"; then
-			AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.])
-		fi
-
-		# We don't use --cflags as this gives us a lot of things that we don't
-		# necessarily want, like debugging and optimization flags
-		# See man (1) icu-config for more info.
-		UNICODE_CFLAGS=`$icu_config --cppflags`
-		UNICODE_LIBS=`$icu_config --ldflags-libsonly`
-                ;;
-        esac
-fi
-
-if test "$with_unicode_backend" = "glib"; then
-	PKG_CHECK_MODULES([UNICODE], [glib-2.0 pango >= 1.21.0])
-fi
-
-AC_SUBST([UNICODE_CFLAGS])
-AC_SUBST([UNICODE_LIBS])
-
-PKG_CHECK_MODULES([ZLIB], [zlib])
-AC_SUBST([ZLIB_CFLAGS])
-AC_SUBST([ZLIB_LIBS])
-
-])

Modified: trunk/configure.ac (107015 => 107016)


--- trunk/configure.ac	2012-02-08 01:15:45 UTC (rev 107015)
+++ trunk/configure.ac	2012-02-08 01:16:40 UTC (rev 107016)
@@ -77,8 +77,61 @@
        ;;
 esac
 
-# initialize webkit options
-WEBKIT_INIT
+# If CFLAGS and CXXFLAGS are unset, default to empty.
+# This is to tell automake not to include '-g' if C{XX,}FLAGS is not set
+# For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler
+if test -z "$CXXFLAGS"; then
+   CXXFLAGS=""
+fi
+if test -z "$CFLAGS"; then
+   CFLAGS=""
+fi
+
+PKG_PROG_PKG_CONFIG
+
+AC_PATH_PROG(PERL, perl)
+if test -z "$PERL"; then
+   AC_MSG_ERROR([You need 'perl' to compile WebKit])
+fi
+
+AC_PATH_PROG(PYTHON, python)
+if test -z "$PYTHON"; then
+   AC_MSG_ERROR([You need 'python' to compile WebKit])
+fi
+
+AC_PATH_PROG(BISON, bison)
+if test -z "$BISON"; then
+   AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit])
+fi
+
+AC_PATH_PROG(MV, mv)
+if test -z "$MV"; then
+   AC_MSG_ERROR([You need 'mv' to compile WebKit])
+fi
+
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_CC_STDC
+AM_PROG_CC_C_O
+AC_PROG_INSTALL
+AC_SYS_LARGEFILE
+
+# Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
+# doesn't exist)
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
+AC_LANG_POP([C++])
+
+# C/C++ Language Features
+AC_C_CONST
+AC_C_INLINE
+AC_C_VOLATILE
+
+# C/C++ Headers
+AC_HEADER_STDC
+AC_HEADER_STDBOOL
+
+# Linker
 AC_DISABLE_STATIC
 AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL
@@ -99,6 +152,18 @@
    AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
 fi
 
+# check for -fvisibility=hidden compiler support (GCC >= 4)
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
+AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
+      [ AC_MSG_RESULT([yes])
+        SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
+        AC_MSG_RESULT([no]))
+CFLAGS="$saved_CFLAGS"
+AC_SUBST(SYMBOL_VISIBILITY)
+AC_SUBST(SYMBOL_VISIBILITY_INLINES)
+
 # Disable C++0x compat warnings for GCC >= 4.6.0 until we build
 # cleanly with that.
 AC_LANG_PUSH(C++)
@@ -309,32 +374,80 @@
 fi
 
 # minimum base dependencies
-LIBSOUP_REQUIRED_VERSION=2.37.2.1
 CAIRO_REQUIRED_VERSION=1.10
 FONTCONFIG_REQUIRED_VERSION=2.4
 FREETYPE2_REQUIRED_VERSION=9.0
+GLIB_REQUIRED_VERSION=2.31.2
+LIBSOUP_REQUIRED_VERSION=2.37.2.1
 LIBXML_REQUIRED_VERSION=2.6
+PANGO_REQUIRED_VERSION=1.21.0
 
-# minimum GTK+ base dependencies
-PANGO_REQUIRED_VERSION=1.12
-
 # optional modules
 LIBXSLT_REQUIRED_VERSION=1.1.7
 SQLITE_REQUIRED_VERSION=3.0
 ENCHANT_REQUIRED_VERSION=0.22
-LIBFFTW_REQUIRED_VERSION=3.2.2
 CLUTTER_REQUIRED_VERSION=1.8.2
 CLUTTER_GTK_REQUIRED_VERSION=1.0.2
 ATSPI2_REQUIRED_VERSION=2.2.1
 
-# Available modules
-#
-# glib - glib and includes gthread
-# unicode - check and identify which unicode backend to use
-#
-# todo: webcore gtk
-WEBKIT_CHECK_DEPENDENCIES([glib unicode])
+# Check for glib and required utilities
+AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :, :, gmodule gobject gthread gio)
+if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then
+   AC_MSG_ERROR([You need the GLib dev tools in your path])
+fi
+GLIB_GSETTINGS
 
+# Check and identify which unicode backend to use
+AC_MSG_CHECKING([which Unicode backend to use])
+AC_ARG_WITH(unicode_backend,
+            AC_HELP_STRING([--with-unicode-backend=@<:@icu/glib@:>@],
+                           [Select Unicode backend (WARNING: the glib-based backend is slow, and incomplete) [default=icu]]),
+            [],[with_unicode_backend="icu"])
+
+case "$with_unicode_backend" in
+     icu|glib) ;;
+     *) AC_MSG_ERROR([Invalid Unicode backend: must be icu or glib.]) ;;
+esac
+
+AC_MSG_RESULT([$with_unicode_backend])
+
+if test "$with_unicode_backend" = "icu"; then
+    # TODO: use pkg-config (after CFLAGS in their .pc files are cleaned up)
+    case "$host" in
+        *-*-darwin*)
+            UNICODE_CFLAGS="-I$srcdir/Source/_javascript_Core/icu -I$srcdir/Source/WebCore/icu"
+            UNICODE_LIBS="-licucore"
+            ;;
+        *-*-mingw*)
+            UNICODE_CFLAGS=""
+            UNICODE_LIBS="-licui18n -licuuc"
+            ;;
+        *)
+            AC_PATH_PROG(icu_config, icu-config, no)
+            if test "$icu_config" = "no"; then
+                AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.])
+            fi
+
+            # We don't use --cflags as this gives us a lot of things that we don't
+            # necessarily want, like debugging and optimization flags
+            # See man (1) icu-config for more info.
+            UNICODE_CFLAGS=`$icu_config --cppflags`
+            UNICODE_LIBS=`$icu_config --ldflags-libsonly`
+            ;;
+    esac
+fi
+
+if test "$with_unicode_backend" = "glib"; then
+    PKG_CHECK_MODULES([UNICODE], [glib-2.0 pango >= $PANGO_REQUIRED_VERSION])
+fi
+
+AC_SUBST([UNICODE_CFLAGS])
+AC_SUBST([UNICODE_LIBS])
+
+PKG_CHECK_MODULES([ZLIB], [zlib])
+AC_SUBST([ZLIB_CFLAGS])
+AC_SUBST([ZLIB_LIBS])
+
 GETTEXT_PACKAGE=$PACKAGE-$GTK_API_VERSION
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to