revision 923:13ac59a786f4
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 923:13ac59a786f4 |
parent | 922:8a8361264b1e |
child | 924:195577c0445c |
author | nkeynes |
date | Thu Dec 11 23:28:50 2008 +0000 (14 years ago) |
Make HAVE_FASTCALL dependent on whether the compiler supports the attribute,
rather than on whether we're making an optimized build - in any case there's
no good reason to disable it for debug builds.
rather than on whether we're making an optimized build - in any case there's
no good reason to disable it for debug builds.
![]() | acinclude.m4 | view | annotate | diff | log | |
![]() | aclocal.m4 | view | annotate | diff | log | |
![]() | configure.in | view | annotate | diff | log |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/acinclude.m4 Thu Dec 11 23:28:50 2008 +00001.3 @@ -0,0 +1,20 @@1.4 +# AC_CHECK_FASTCALL([if-ok],[if-notok])1.5 +# Test if the compiler recognizes __attribute__((regparm(3))) - we don't1.6 +# currently check if it actually works correctly, but probably should...1.7 +# -----------------------1.8 +AC_DEFUN([AC_CHECK_FASTCALL], [1.9 +AC_MSG_CHECKING([support for fastcall calling conventions]);1.10 +AC_RUN_IFELSE([1.11 + AC_LANG_SOURCE([[1.12 +int __attribute__((regparm(3))) foo(int a, int b) { return a+b; }1.13 +1.14 +int main(int argc, char *argv[])1.15 +{1.16 + return foo( 1, 2 ) == 3 ? 0 : 1;1.17 +}]])], [1.18 + AC_MSG_RESULT([yes])1.19 + $1 ], [1.20 + AC_MSG_RESULT([no])1.21 + $2 ])1.22 +])1.23 +
2.1 --- a/aclocal.m4 Thu Dec 11 23:26:03 2008 +00002.2 +++ b/aclocal.m4 Thu Dec 11 23:28:50 2008 +00002.3 @@ -114,8 +114,7 @@2.4 #-----------------2.5 glib_DEFUN([GLIB_WITH_NLS],2.6 dnl NLS is obligatory2.7 - [AC_REQUIRE([AC_CANONICAL_HOST])dnl2.8 - USE_NLS=yes2.9 + [USE_NLS=yes2.10 AC_SUBST(USE_NLS)2.12 gt_cv_have_gettext=no2.13 @@ -221,7 +220,7 @@2.14 AC_CHECK_FUNCS(dcgettext)2.15 MSGFMT_OPTS=2.16 AC_MSG_CHECKING([if msgfmt accepts -c])2.17 - GLIB_RUN_PROG([msgfmt -c -o /dev/null],[2.18 + GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[2.19 msgid ""2.20 msgstr ""2.21 "Content-Type: text/plain; charset=UTF-8\n"2.22 @@ -538,16 +537,14 @@2.23 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])2.24 # ---------------------------------------------2.25 m4_define([_PKG_CONFIG],2.26 -[if test -n "$PKG_CONFIG"; then2.27 - if test -n "$$1"; then2.28 - pkg_cv_[]$1="$$1"2.29 - else2.30 - PKG_CHECK_EXISTS([$3],2.31 - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],2.32 - [pkg_failed=yes])2.33 - fi2.34 -else2.35 - pkg_failed=untried2.36 +[if test -n "$$1"; then2.37 + pkg_cv_[]$1="$$1"2.38 + elif test -n "$PKG_CONFIG"; then2.39 + PKG_CHECK_EXISTS([$3],2.40 + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],2.41 + [pkg_failed=yes])2.42 + else2.43 + pkg_failed=untried2.44 fi[]dnl2.45 ])# _PKG_CONFIG2.47 @@ -591,9 +588,9 @@2.48 if test $pkg_failed = yes; then2.49 _PKG_SHORT_ERRORS_SUPPORTED2.50 if test $_pkg_short_errors_supported = yes; then2.51 - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`2.52 + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`2.53 else2.54 - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`2.55 + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`2.56 fi2.57 # Put the nasty error message in config.log where it belongs2.58 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD2.59 @@ -1550,3 +1547,4 @@2.60 AC_SUBST([am__untar])2.61 ]) # _AM_PROG_TAR2.63 +m4_include([acinclude.m4])
3.1 --- a/configure.in Thu Dec 11 23:26:03 2008 +00003.2 +++ b/configure.in Thu Dec 11 23:28:50 2008 +00003.3 @@ -67,7 +67,6 @@3.4 CFLAGS="$CFLAGS -fexceptions -fomit-frame-pointer"3.5 AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information])3.6 fi3.7 - AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions])3.8 else3.9 CFLAGS="-g3"3.10 fi3.11 @@ -81,6 +80,10 @@3.12 CFLAGS="$CFLAGS -fno-strict-aliasing"3.13 fi3.15 +AC_CHECK_FASTCALL([3.16 + AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions])3.17 +])3.18 +3.20 dnl ------------ Check if we're building on Darwin --------------
.