SetupAutoconfHeader.m4 3.12 KB
Newer Older
1 2 3
# Configuration flags that are used throughout WebKitGTK+.
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext catalog name])

4
if test "$enable_debug" = "no"; then
5
    AC_DEFINE([NDEBUG], [1], [Define to disable debugging])
6 7 8 9 10 11 12 13 14 15 16 17 18
fi

if test "$os_win32" = "no"; then
AC_CHECK_HEADERS([pthread.h],
    AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exists]),
    AC_MSG_ERROR([pthread support is required to build WebKit]))
AC_CHECK_LIB(pthread, pthread_rwlock_init,
    AC_DEFINE([HAVE_PTHREAD_RWLOCK],[1],[Define if pthread rwlock is present]),
    AC_MSG_WARN([pthread rwlock support is not available]))
fi

if test "$GTK_API_VERSION" = "2.0"; then
    AC_DEFINE([GTK_API_VERSION_2], [1], [ ])
19 20
else
    AC_DEFINE([GDK_VERSION_MIN_REQUIRED], [GDK_VERSION_3_6], [Minimum GTK/GDK version required])
21 22 23 24 25 26 27 28 29 30 31 32 33
fi

if test "$enable_webkit2" = "yes"; then
    AC_DEFINE([ENABLE_PLUGIN_PROCESS], [1], [ ])
    if test "$have_gtk_unix_printing" = "yes"; then
        AC_DEFINE([HAVE_GTK_UNIX_PRINTING], [1], [Define if GTK+ UNIX Printing is available])
    fi
fi

if test "$os_win32" = "yes"; then
    AC_DEFINE([XP_WIN], [1], [ ])
    AC_DEFINE([UNICODE], [1], [ ])
    AC_DEFINE([_UNICODE], [1], [ ])
34
elif test "$enable_x11_target" = "yes" || test "$enable_wayland_target" != "yes"; then
35 36 37
    AC_DEFINE([XP_UNIX], [1], [ ])
fi

38
if test "$enable_x11_target" = "yes"; then
39 40 41 42
    AC_DEFINE([MOZ_X11], [1], [ ])
    AC_DEFINE([WTF_PLATFORM_X11], [1], [Define if target is X11])
fi

43
if test "$enable_wayland_target" = "yes"; then
44 45 46
    AC_DEFINE([WTF_PLATFORM_WAYLAND], [1], [Define if target is Wayland])
fi

47 48 49 50 51 52 53 54
if test "$enable_fast_malloc" = "no"; then
    AC_DEFINE([WTF_SYSTEM_MALLOC], [1], [ ])
fi

if test "$enable_opcode_stats" = "yes"; then
    AC_DEFINE([ENABLE_OPCODE_STATS], [1], [Define to enable Opcode statistics])
fi

55
if test "$enable_video" = "yes" || test "$enable_web_audio" = "yes"; then
56 57 58 59 60 61 62 63 64
    AC_DEFINE([WTF_USE_GSTREAMER], [1], [ ])
fi

if test "$enable_web_audio" = "yes"; then
    AC_DEFINE([WTF_USE_WEBAUDIO_GSTREAMER], [1], [1])
fi

if test "$enable_accelerated_compositing" = "yes"; then
    AC_DEFINE([WTF_USE_ACCELERATED_COMPOSITING], [1], [ ])
65 66
    AC_DEFINE([WTF_USE_TEXTURE_MAPPER], [1], [ ])
    AC_DEFINE([WTF_USE_TEXTURE_MAPPER_GL], [1], [ ])
67 68
fi

69 70 71 72
if test "$found_opengl" = "yes"; then
    AC_DEFINE([WTF_USE_OPENGL], [1], [ ])
fi

73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
if test "$enable_glx" = "yes"; then
    AC_DEFINE([WTF_USE_GLX], [1], [ ])
fi

if test "$enable_egl" = "yes"; then
    AC_DEFINE([WTF_USE_EGL], [1], [ ])
fi

if test "$enable_gles2" = "yes"; then
    AC_DEFINE([WTF_USE_OPENGL_ES_2], [1], [ ])
fi

if test "$enable_spellcheck" = "yes"; then
    AC_DEFINE([ENABLE_SPELLCHECK], [1], [ ])
fi

89
if test "$enable_credential_storage" = "yes"; then
90
    AC_DEFINE([ENABLE_CREDENTIAL_STORAGE], [1], [ ])
91
fi
92

93 94 95 96 97
if test "$enable_jit" = "yes"; then
    AC_DEFINE([ENABLE_JIT], [1], [ ])
elif test "$enable_jit" = "no"; then
    AC_DEFINE([ENABLE_JIT], [0], [ ])
fi
98 99 100 101 102 103 104 105 106 107

if test "$enable_ftl_jit" = "yes"; then
    AC_DEFINE([ENABLE_FTL_JIT], [1], [ ])
elif test "$enable_ftl_jit" = "no"; then
    AC_DEFINE([ENABLE_FTL_JIT], [0], [ ])
fi

if test "$have_llvm" = "yes"; then
    AC_DEFINE([HAVE_LLVM], [1], [ ])
fi