Simplify autotools configure.ac
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 22:33:45 +0000 (22:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 22:33:45 +0000 (22:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=74312

Patch by Andy Wingo <wingo@igalia.com> on 2011-12-12
Reviewed by Martin Robinson.

.:

* configure.ac: Don't AC_DEFINE so many things.  Many of the
defines were stale (ENABLE_YARR, ENABLE_JIT_OPTIMIZE_CALL, etc),
and with Platform.h we don't need to make an explicit decision
here.  If the user does pass --enable-jit or --disable-jit, effect
that choice via setting JSC_CPPFLAGS.

Source/JavaScriptCore:

* GNUmakefile.am: Add JSC_CPPFLAGS to javascriptcore_cppflags.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102624 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.am
configure.ac

index c5ee30e..235fc6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-12-12  Andy Wingo  <wingo@igalia.com>
+
+        Simplify autotools configure.ac
+        https://bugs.webkit.org/show_bug.cgi?id=74312
+
+        Reviewed by Martin Robinson.
+
+        * configure.ac: Don't AC_DEFINE so many things.  Many of the
+        defines were stale (ENABLE_YARR, ENABLE_JIT_OPTIMIZE_CALL, etc),
+        and with Platform.h we don't need to make an explicit decision
+        here.  If the user does pass --enable-jit or --disable-jit, effect
+        that choice via setting JSC_CPPFLAGS.
+
 2011-12-12  Alexis Menard  <alexis.menard@openbossa.org>
 
         [Qt][WK2] History is not accessible in QML.
index 66b7bad..3d4e5da 100644 (file)
@@ -1,3 +1,12 @@
+2011-12-12  Andy Wingo  <wingo@igalia.com>
+
+        Simplify autotools configure.ac
+        https://bugs.webkit.org/show_bug.cgi?id=74312
+
+        Reviewed by Martin Robinson.
+
+        * GNUmakefile.am: Add JSC_CPPFLAGS to javascriptcore_cppflags.
+
 2011-12-12  Filip Pizlo  <fpizlo@apple.com>
 
         DFG GetByVal CSE incorrectly assumes that a non-matching PutByVal cannot clobber
index 7bb50fe..fc3ad80 100644 (file)
@@ -42,6 +42,7 @@ libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@
        $(javascriptcore_cppflags)
 
 javascriptcore_cppflags += \
+       $(JSC_CPPFLAGS) \
        -I$(srcdir)/Source \
        -I$(srcdir)/Source/JavaScriptCore \
        -I$(srcdir)/Source/JavaScriptCore/API \
index 518910f..0fcc9a3 100644 (file)
@@ -815,54 +815,16 @@ case "$with_jsengine" in
 esac
 AC_MSG_RESULT([$with_jsengine])
 
-if test "$with_jsengine" = "jsc"; then
-    AC_MSG_CHECKING([whether to enable JIT compilation])
-    AC_ARG_ENABLE([jit],
-                  AC_HELP_STRING([--enable-jit],
-                                 [Enable JIT compilation default=yes]),
-                  [],[enable_jit="yes"])
-    if test "$enable_jit" = "yes"; then
-        case "$host_cpu" in
-            arm*)
-                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
-                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
-                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
-            ;;
-            i*86|x86_64)
-                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
-                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
-                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
-                AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
-                AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
-                AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
-                case "$host_cpu" in
-                    i*86)
-                        AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
-                    ;;
-                    x86_64)
-                        AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
-                        AC_DEFINE([WTF_USE_ALTERNATE_JSIMMEDIATE], [1], [Use alternate JSImmediate])
-                    ;;
-                esac
-            ;;
-            sh4)
-                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
-                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
-                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
-                AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
-            ;;
-            *)
-                enable_jit="no (CPU '$host_cpu' not supported)"
-            ;;
-        esac
-    else
-            AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
-    fi
-else
-    AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
-    enable_jit="no"
-fi
-
+AC_MSG_CHECKING([whether to enable JIT compilation])
+AC_ARG_ENABLE(jit,
+              AS_HELP_STRING([--enable-jit],
+                             [Enable JIT compilation (default: autodetect)]))
+case "$enable_jit" in
+  yes) JSC_CPPFLAGS="-DENABLE_JIT=1" ;;
+  no) JSC_CPPFLAGS="-DENABLE_JIT=0" ;;
+  *) enable_jit="autodetect" ;;
+esac
+AC_SUBST(JSC_CPPFLAGS)
 AC_MSG_RESULT([$enable_jit])
 
 # Opcode stats