+2009-08-05 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] macros in webkit.m4 should be defined once only
+ https://bugs.webkit.org/show_bug.cgi?id=27929
+
+ The macros in webkit.m4 are not meant to be called multiple times
+ so we'll make them AC_DEFUN_ONCE. Also make AC_HEADER_STDC and AC_PROG_CXX
+ AC_REQUIRE to remove the automake warnings when doing autogen.sh.
+
+ Lastly, make sure CXXFLAGS and CFLAGS are defined before
+ AC_PROG_CXX gets expanded so it doesn't add "-g -O2" on Release builds.
+
+ * autotools/webkit.m4:
+
2009-08-05 Xan Lopez <xlopez@igalia.com>
Revert r46714, it was making us build debug images by default.
# global states
m4_define([initialized], [no])
+AC_DEFUN([BEFORE_AC_PROG_CXX],
+[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
+])
+
# check for pkg-config
-AC_DEFUN([WEBKIT_INIT],
+AC_DEFUN_ONCE([WEBKIT_INIT],
[dnl
dnl check if we have the required packages to have successful checks
dnl
AC_MSG_ERROR([You need 'mv' to compile WebKit])
fi
-# 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
-
AM_PROG_CC_STDC
AM_PROG_CC_C_O
-AC_PROG_CXX
+# Make sure CXXFLAGS and CFLAGS are set before expanding AC_PROG_CXX to avoid
+# building with '-g -O2' on Release builds.
+AC_REQUIRE([BEFORE_AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXX])
AC_PROG_INSTALL
AC_SYS_LARGEFILE
AC_C_VOLATILE
# C/C++ Headers
-AC_HEADER_STDC
+AC_REQUIRE([AC_HEADER_STDC])
AC_HEADER_STDBOOL
m4_define([initialized], [yes])
])
-AC_DEFUN([WEBKIT_CHECK_DEPENDENCIES],
+AC_DEFUN_ONCE([WEBKIT_CHECK_DEPENDENCIES],
[dnl
dnl check for module dependencies
for module in $1
done
])
-AC_DEFUN([_WEBKIT_CHECK_GLIB],
+AC_DEFUN_ONCE([_WEBKIT_CHECK_GLIB],
[dnl
dnl check for glib
# Version requirements
fi
])
-AC_DEFUN([_WEBKIT_CHECK_UNICODE],
+AC_DEFUN_ONCE([_WEBKIT_CHECK_UNICODE],
[dnl
dnl determine the Unicode backend
AC_MSG_CHECKING([which Unicode backend to use])