[GTK] Move feature overriding to the configure phase
[WebKit-https.git] / configure.ac
1 AC_PREREQ(2.60)
2
3 m4_include([Source/autotools/Versions.m4])
4
5 AC_INIT([WebKitGTK],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
6 AC_CONFIG_MACRO_DIR([Source/autotools])
7 AC_CONFIG_AUX_DIR([Source/autotools])
8 AC_SUBST(ACLOCAL_AMFLAGS, "-I Source/autotools")
9 AC_CONFIG_HEADERS([autotoolsconfig.h])
10 AC_CONFIG_SRCDIR([Source/WebCore/config.h])
11
12 WEBKIT_MAJOR_VERSION=webkit_major_version
13 WEBKIT_MINOR_VERSION=webkit_minor_version
14 WEBKIT_MICRO_VERSION=webkit_micro_version
15 WEBKIT_USER_AGENT_MAJOR_VERSION=webkit_user_agent_major_version
16 WEBKIT_USER_AGENT_MINOR_VERSION=webkit_user_agent_minor_version
17 AC_SUBST(WEBKIT_MAJOR_VERSION)
18 AC_SUBST(WEBKIT_MINOR_VERSION)
19 AC_SUBST(WEBKIT_MICRO_VERSION)
20 AC_SUBST(WEBKIT_USER_AGENT_MAJOR_VERSION)
21 AC_SUBST(WEBKIT_USER_AGENT_MINOR_VERSION)
22
23 m4_include([Source/autotools/CheckSystemAndBasicDependencies.m4])
24 m4_include([Source/autotools/SetupLibtool.m4])
25 m4_include([Source/autotools/ReadCommandLineArguments.m4])
26 m4_include([Source/autotools/FindDependencies.m4])
27 m4_include([Source/autotools/SetupCompilerFlags.m4])
28 m4_include([Source/autotools/SetupAutoconfHeader.m4])
29 m4_include([Source/autotools/SetupWebKitFeatures.m4])
30
31 # We would put AM_INIT_AUTOMAKE into SetupAutomake.m4, but seems to cause autoconf errors.
32 AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip tar-ustar])
33 m4_include([Source/autotools/SetupAutomake.m4])
34
35 ######################################################################################
36 # Processing of configuration files
37 ######################################################################################
38
39 AC_CONFIG_FILES([GNUmakefile])
40 AC_CONFIG_FILES([DerivedSources/WebCore/UserAgentGtk.h:Source/WebCore/platform/gtk/UserAgentGtk.h.in])
41 AC_CONFIG_FILES(
42     [Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/JavaScriptCore/javascriptcoregtk.pc.in
43         Source/WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:Source/WebKit/gtk/JSCore.gir.in],
44     [WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME])
45
46 if test "$enable_webkit1" = "yes"; then
47     AC_CONFIG_FILES([Source/WebKit/gtk/webkit/webkitversion.h Source/WebKit/gtk/po/POTFILES])
48
49     AC_CONFIG_FILES([Source/WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/webkit.pc.in],
50         [WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME])
51 fi
52
53 if test "$enable_webkit2" = "yes"; then
54     AC_CONFIG_FILES(
55         [DerivedSources/WebKit2/webkit2gtk/webkit2/WebKitVersion.h:Source/WebKit2/UIProcess/API/gtk/WebKitVersion.h.in])
56
57     AC_CONFIG_FILES([Source/WebKit2/webkit2gtk-${WEBKITGTK_API_VERSION}.pc:Source/WebKit2/webkit2gtk.pc.in],
58         [WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME])
59 fi
60
61 m4_include([Source/autotools/PrintBuildConfiguration.m4])