Changeset 40450 in webkit


Ignore:
Timestamp:
Jan 31, 2009 1:36:45 AM (15 years ago)
Author:
jmalonzo@webkit.org
Message:

2009-01-30 Jan Michael Alonzo <jmalonzo@webkit.org>

Reviewed by Nikolas Zimmermann.

[Gtk] Refactor autoconf/configure.ac in preparation for jsc and webkit build splits
https://bugs.webkit.org/show_bug.cgi?id=22136

  • GNUmakefile.am:
  • acinclude.m4: Removed.
  • autogen.sh:
  • autotools/acinclude.m4: Added.
  • autotools/dolt.m4: Added.
  • autotools/symbols.filter: Renamed from symbols.filter.
  • autotools/webkit.m4: Added.
  • configure.ac:
Location:
trunk
Files:
4 added
1 deleted
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r40441 r40450  
     12009-01-30  Jan Michael Alonzo  <jmalonzo@webkit.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        [Gtk] Refactor autoconf/configure.ac in preparation for jsc and webkit build splits
     6        https://bugs.webkit.org/show_bug.cgi?id=22136
     7
     8        * GNUmakefile.am:
     9        * acinclude.m4: Removed.
     10        * autogen.sh:
     11        * autotools/acinclude.m4: Added.
     12        * autotools/dolt.m4: Added.
     13        * autotools/symbols.filter: Renamed from symbols.filter.
     14        * autotools/webkit.m4: Added.
     15        * configure.ac:
     16
    1172009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
    218
  • trunk/GNUmakefile.am

    r40441 r40450  
    7878
    7979if OS_GNU
    80 version_script = -Wl,--version-script,$(srcdir)/symbols.filter
     80version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
    8181endif
    8282
     
    122122libJavaScriptCore_la_LIBADD = \
    123123        $(UNICODE_LIBS) \
    124         $(GLOBALDEPS_LIBS) \
     124        $(GLIB_LIBS) \
    125125        -lpthread
    126126
     
    133133        -O3 \
    134134        $(global_cflags) \
    135         $(GLOBALDEPS_CFLAGS) \
     135        $(GLIB_CFLAGS) \
    136136        $(UNICODE_CFLAGS)
    137137
     
    168168        -fno-strict-aliasing \
    169169        $(global_cflags) \
    170         $(GLOBALDEPS_CFLAGS) \
     170        $(GLIB_CFLAGS) \
    171171        $(UNICODE_CFLAGS) \
    172172        $(LIBXML_CFLAGS) \
     
    196196        libWebCoreJS.la \
    197197        $(webcore_libadd) \
    198         $(GLOBALDEPS_LIBS) \
     198        $(GLIB_LIBS) \
    199199        $(LIBXML_LIBS) \
    200200        $(CAIRO_LIBS) \
  • trunk/autogen.sh

    r29807 r40450  
    88ORIGDIR=`pwd`
    99cd $srcdir
     10
     11LIBTOOLIZE_FLAGS="--force --automake"
     12ACLOCAL_FLAGS="-I autotools"
     13AUTOMAKE_FLAGS="--foreign --add-missing"
    1014
    1115DIE=0
     
    4751touch README INSTALL
    4852
    49 aclocal || exit $?
    50 $LIBTOOLIZE --force || exit $?
     53aclocal $ACLOCAL_FLAGS || exit $?
     54$LIBTOOLIZE $LIBTOOLIZE_FLAGS || exit $?
    5155autoheader || exit $?
    52 automake --foreign --add-missing || exit $?
     56automake $AUTOMAKE_FLAGS || exit $?
    5357autoconf || exit $?
    5458
  • trunk/configure.ac

    r40441 r40450  
    66
    77AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
     8
     9AC_CONFIG_MACRO_DIR([autotools])
     10AC_CONFIG_AUX_DIR([autotools])
     11AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools")
    812
    913AC_CONFIG_HEADERS([autotoolsconfig.h])
     
    2731
    2832# host checking - inspired by the GTK+ configure.in
    29 # TODO: os_mac, os_bsd
     33# TODO: move these to webkit.m4?
    3034AC_MSG_CHECKING([for native Win32])
    3135case "$host" in
     
    6064esac
    6165
    62 # If CXXFLAGS and CFLAGS are unset, default to empty.
    63 # This is to tell automake not to include '-g' if CXXFLAGS is not set
    64 # For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler
    65 if test -z "$CXXFLAGS"; then
    66    CXXFLAGS=""
    67 fi
    68 if test -z "$CFLAGS"; then
    69    CFLAGS=""
    70 fi
    71 
    72 AM_PROG_CC_STDC
    73 AM_PROG_CC_C_O
    74 AC_PROG_CXX
    75 AC_PROG_INSTALL
     66# initialize webkit options
     67WEBKIT_INIT
    7668AC_DISABLE_STATIC
    7769AC_LIBTOOL_WIN32_DLL
    7870AC_PROG_LIBTOOL
    79 AC_SYS_LARGEFILE
     71# use dolt to speedup the build
    8072DOLT
    81 
    82 # check for -fvisibility=hidden compiler support (GCC >= 4)
    83 saved_CFLAGS="$CFLAGS"
    84 CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
    85 AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
    86 AC_COMPILE_IFELSE([char foo;],
    87       [ AC_MSG_RESULT([yes])
    88         SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
    89         AC_MSG_RESULT([no]))
    90 CFLAGS="$saved_CFLAGS"
    91 AC_SUBST(SYMBOL_VISIBILITY)
    92 AC_SUBST(SYMBOL_VISIBILITY_INLINES)
    93 
    94 AC_PATH_PROG(PERL, perl)
    95 if test -z "$PERL"; then
    96    AC_MSG_ERROR([You need 'perl' to compile WebKit])
    97 fi
    98 
    99 AC_PATH_PROG(BISON, bison)
    100 if test -z "$BISON"; then
    101    AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit])
    102 else
    103     case "$target_cpu" in
    104         arm)
    105             BISON_VERSION=`$BISON --version | head -1 | sed 's,.*\ \([0-9]*\.[0-9]*\)$,\1,'`
    106             AX_COMPARE_VERSION([2.2],[gt],[$BISON_VERSION],
    107                 AC_MSG_ERROR([You need at least version 2.2 of the 'bison' parser generator to compile WebKit correctly for ARM]))
    108         ;;
    109         *) ;;
    110     esac
    111 fi
    11273
    11374AC_PATH_PROG(FLEX, flex)
     
    12485   AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
    12586fi
    126 
    127 AC_PATH_PROG(MV, mv)
    128 if test -z "$MV"; then
    129    AC_MSG_ERROR([You need 'mv' to compile WebKit])
    130 fi
    131 
    132 # GTK+ port only
    133 # Check for glib-genmarshal and glib-mkenums
    134 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
    135 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
    136 if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then
    137    AC_MSG_ERROR([You need the GLib dev tools in your path])
    138 fi
    139 
    140 # Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
    141 # doesn't exist)
    142 AC_LANG_PUSH([C++])
    143 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
    144 AC_LANG_POP([C++])
    145 
    146 # C/C++ Language Features
    147 AC_C_CONST
    148 AC_C_INLINE
    149 AC_C_VOLATILE
    150 
    151 # C/C++ Headers
    152 AC_HEADER_STDC
    153 AC_HEADER_STDBOOL
    15487
    15588# pthread (not needed on Windows)
     
    183116fi
    184117AC_SUBST([JPEG_LIBS])
    185 
    186 # check for pkg-config
    187 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
    188 if test "$PKG_CONFIG" = "no"; then
    189    AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed in your PATH])
    190 fi
    191118
    192119# Check for libpng the way Gtk+ does it
     
    220147AC_SUBST([PNG_LIBS])
    221148
    222 # determine the Unicode backend
    223 AC_MSG_CHECKING([the Unicode backend to use])
    224 AC_ARG_WITH(unicode_backend,
    225             AC_HELP_STRING([--with-unicode-backend=@<:@icu@:>@],
    226                            [Select Unicode backend [default=icu]]),
    227             [],[unicode_backend="icu"])
    228 
    229 case "$unicode_backend" in
    230      icu) ;;
    231      *) AC_MSG_ERROR([Invalid Unicode backend: must be icu.]) ;;
    232 esac
    233 
    234 AC_MSG_RESULT([$unicode_backend])
    235 
    236 if test "$unicode_backend" = "icu"; then
    237         AC_PATH_PROG(icu_config, icu-config, no)
    238         if test "$icu_config" = "no"; then
    239                 if test "$os_darwin" = "yes"; then
    240                         UNICODE_CFLAGS="-I\$(srcdir)/JavaScriptCore/icu -I\$(srcdir)/WebCore/icu"
    241                         UNICODE_LIBS="-licucore"
    242                 elif test "$os_win32" = "yes"; then
    243                         UNICODE_CFLAGS=""
    244                         UNICODE_LIBS="-licuin -licuuc"
    245                 else
    246                         AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.])
    247                 fi
    248         else
    249                 # We don't use --cflags as this gives us a lot of things that we don't
    250                 # necessarily want, like debugging and optimization flags
    251                 # See man (1) icu-config for more info.
    252                 UNICODE_CFLAGS=`$icu_config --cppflags`
    253                 UNICODE_LIBS=`$icu_config --ldflags`
    254         fi
    255 fi
    256 
    257 AC_SUBST([UNICODE_CFLAGS])
    258 AC_SUBST([UNICODE_LIBS])
    259 
    260149# determine the GDK/GTK+ target
    261150AC_MSG_CHECKING([the target windowing system])
     
    308197
    309198# minimum GTK+ base dependencies
    310 GLIB_REQUIRED_VERSION=2.0
    311 GOBJECT_REQUIRED_VERSION=2.0
    312 GTHREAD_REQUIRED_VERSION=2.0
    313199PANGO_REQUIRED_VERSION=1.0
    314200GTK_REQUIRED_VERSION=2.8
     
    321207GSTREAMER_REQUIRED_VERSION=0.10
    322208
    323 PKG_CHECK_MODULES([GLOBALDEPS],
    324                   [glib-2.0 >= $GLIB_REQUIRED_VERSION
    325                   gobject-2.0 >= $GOBJECT_REQUIRED_VERSION
    326                   gthread-2.0 >= $GTHREAD_REQUIRED_VERSION])
    327 AC_SUBST([GLOBALDEPS_CFLAGS])
    328 AC_SUBST([GLOBALDEPS_LIBS])
    329 
     209# Available modules
     210#
     211# glib - glib and includes gthread
     212# unicode - check and identify which unicode backend to use
     213#
     214# todo: webcore gtk
     215WEBKIT_CHECK_DEPENDENCIES([glib unicode])
     216                         
    330217PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
    331218AC_SUBST(LIBXML_CFLAGS)
Note: See TracChangeset for help on using the changeset viewer.