From: "Diego Elio Pettenò" <flameeyes@gmail.com>
To: alsa-devel@alsa-project.org
Subject: [PATCH 1/4] Update attributes.m4 to avoid warnings with autoconf-2.68
Date: Thu, 20 Jan 2011 04:45:13 +0100 [thread overview]
Message-ID: <1295495116-19937-1-git-send-email-flameeyes@gmail.com> (raw)
---
m4/attributes.m4 | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/m4/attributes.m4 b/m4/attributes.m4
index e86456a..82b4a3c 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -25,7 +25,7 @@ dnl License when using or distributing such scripts, even though portions
dnl of the text of the Macro appear in them. The GNU General Public
dnl License (GPL) does govern all other use of the material that
dnl constitutes the Autoconf Macro.
-dnl
+dnl
dnl This special exception to the GPL applies to versions of the
dnl Autoconf Macro released by this project. When you make and
dnl distribute a modified version of the Autoconf Macro, you may extend
@@ -39,7 +39,7 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
[ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
- AC_COMPILE_IFELSE([int a;],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
[eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
[eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
CFLAGS="$ac_save_CFLAGS"
@@ -89,7 +89,7 @@ AC_DEFUN([CC_CHECK_LDFLAGS], [
AS_TR_SH([cc_cv_ldflags_$1]),
[ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $1"
- AC_LINK_IFELSE([int main() { return 1; }],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])],
[eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
[eval "AS_TR_SH([cc_cv_ldflags_$1])="])
LDFLAGS="$ac_save_LDFLAGS"
@@ -147,7 +147,7 @@ AC_DEFUN([CC_CHECK_ATTRIBUTE], [
AS_TR_SH([cc_cv_attribute_$1]),
[ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $cc_cv_werror"
- AC_COMPILE_IFELSE([$3],
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])],
[eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
[eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
CFLAGS="$ac_save_CFLAGS"
@@ -165,7 +165,16 @@ AC_DEFUN([CC_CHECK_ATTRIBUTE], [
AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
CC_CHECK_ATTRIBUTE(
[constructor],,
- [void __attribute__((constructor)) ctor() { int a; }],
+ [extern void foo();
+ void __attribute__((constructor)) ctor() { foo(); }],
+ [$1], [$2])
+])
+
+AC_DEFUN([CC_ATTRIBUTE_DESTRUCTOR], [
+ CC_CHECK_ATTRIBUTE(
+ [destructor],,
+ [extern void foo();
+ void __attribute__((destructor)) dtor() { foo(); }],
[$1], [$2])
])
@@ -257,7 +266,7 @@ AC_DEFUN([CC_FLAG_VISIBILITY], [
cc_cv_flag_visibility='yes',
cc_cv_flag_visibility='no')
CFLAGS="$cc_flag_visibility_save_CFLAGS"])
-
+
AS_IF([test "x$cc_cv_flag_visibility" = "xyes"],
[AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
[Define this if the compiler supports the -fvisibility flag])
--
1.7.4.rc2
next reply other threads:[~2011-01-20 3:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-20 3:45 Diego Elio Pettenò [this message]
2011-01-20 3:45 ` [PATCH 2/4] Add missing no-undefined parameter Diego Elio Pettenò
2011-01-20 3:45 ` [PATCH 3/4] List libavutil as a dependency together with libavcodec Diego Elio Pettenò
2011-01-20 3:45 ` [PATCH 4/4] Only export symbols needed by the plugins' interface Diego Elio Pettenò
2011-01-20 13:57 ` [PATCH 1/4] Update attributes.m4 to avoid warnings with autoconf-2.68 Diego Elio Pettenò
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295495116-19937-1-git-send-email-flameeyes@gmail.com \
--to=flameeyes@gmail.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).