Search
lxdream.org :: lxdream :: r923:13ac59a786f4
lxdream 0.9.1
released Jun 29
Download Now
changeset923:13ac59a786f4
parent922:8a8361264b1e
child924:195577c0445c
authornkeynes
dateThu Dec 11 23:28:50 2008 +0000 (11 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.
acinclude.m4
aclocal.m4
configure.in
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/acinclude.m4 Thu Dec 11 23:28:50 2008 +0000
1.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't
1.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 +0000
2.2 +++ b/aclocal.m4 Thu Dec 11 23:28:50 2008 +0000
2.3 @@ -114,8 +114,7 @@
2.4 #-----------------
2.5 glib_DEFUN([GLIB_WITH_NLS],
2.6 dnl NLS is obligatory
2.7 - [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2.8 - USE_NLS=yes
2.9 + [USE_NLS=yes
2.10 AC_SUBST(USE_NLS)
2.11
2.12 gt_cv_have_gettext=no
2.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"; then
2.27 - if test -n "$$1"; then
2.28 - pkg_cv_[]$1="$$1"
2.29 - else
2.30 - PKG_CHECK_EXISTS([$3],
2.31 - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2.32 - [pkg_failed=yes])
2.33 - fi
2.34 -else
2.35 - pkg_failed=untried
2.36 +[if test -n "$$1"; then
2.37 + pkg_cv_[]$1="$$1"
2.38 + elif test -n "$PKG_CONFIG"; then
2.39 + PKG_CHECK_EXISTS([$3],
2.40 + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2.41 + [pkg_failed=yes])
2.42 + else
2.43 + pkg_failed=untried
2.44 fi[]dnl
2.45 ])# _PKG_CONFIG
2.46
2.47 @@ -591,9 +588,9 @@
2.48 if test $pkg_failed = yes; then
2.49 _PKG_SHORT_ERRORS_SUPPORTED
2.50 if test $_pkg_short_errors_supported = yes; then
2.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 else
2.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 fi
2.57 # Put the nasty error message in config.log where it belongs
2.58 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2.59 @@ -1550,3 +1547,4 @@
2.60 AC_SUBST([am__untar])
2.61 ]) # _AM_PROG_TAR
2.62
2.63 +m4_include([acinclude.m4])
3.1 --- a/configure.in Thu Dec 11 23:26:03 2008 +0000
3.2 +++ b/configure.in Thu Dec 11 23:28:50 2008 +0000
3.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 fi
3.7 - AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions])
3.8 else
3.9 CFLAGS="-g3"
3.10 fi
3.11 @@ -81,6 +80,10 @@
3.12 CFLAGS="$CFLAGS -fno-strict-aliasing"
3.13 fi
3.14
3.15 +AC_CHECK_FASTCALL([
3.16 + AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions])
3.17 +])
3.18 +
3.19
3.20 dnl ------------ Check if we're building on Darwin --------------
3.21
.