From b75d53413d8ffe421324a68fac8daf106d3c0807 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Jan 2011 17:20:48 +0100 Subject: configure.ac: use AC_LANG_SOURCE Fixes autotools warnings. --- m4/faad.m4 | 12 ++++++------ m4/mpd_check_cflag.m4 | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'm4') diff --git a/m4/faad.m4 b/m4/faad.m4 index f6447b0fb..007787557 100644 --- a/m4/faad.m4 +++ b/m4/faad.m4 @@ -58,7 +58,7 @@ if test x$enable_aac = xyes; then fi if test x$enable_aac = xyes; then AC_MSG_CHECKING(that FAAD2 uses buffer and bufferlen) - AC_COMPILE_IFELSE([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include int main() { @@ -82,9 +82,9 @@ int main() { return 0; } -],[AC_MSG_RESULT(yes);AC_DEFINE(HAVE_FAAD_BUFLEN_FUNCS,1,[Define if FAAD2 uses buflen in function calls])],[AC_MSG_RESULT(no); +])],[AC_MSG_RESULT(yes);AC_DEFINE(HAVE_FAAD_BUFLEN_FUNCS,1,[Define if FAAD2 uses buflen in function calls])],[AC_MSG_RESULT(no); AC_MSG_CHECKING(that FAAD2 can even be used) - AC_COMPILE_IFELSE([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include int main() { @@ -113,7 +113,7 @@ int main() { return 0; } -],AC_MSG_RESULT(yes),[AC_MSG_RESULT(no);enable_aac=no]) +])],AC_MSG_RESULT(yes),[AC_MSG_RESULT(no);enable_aac=no]) ]) fi if test x$enable_aac = xyes; then @@ -136,7 +136,7 @@ if test x$enable_aac = xyes; then CPPFLAGS=$CFLAGS AC_MSG_CHECKING(for broken libfaad headers) - AC_COMPILE_IFELSE([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include #include #include @@ -148,7 +148,7 @@ int main() { faacDecInit2(NULL, NULL, 0, &sample_rate, &channels); return 0; } - ], + ])], [AC_MSG_RESULT(correct)], [AC_MSG_RESULT(broken); AC_DEFINE(HAVE_FAAD_LONG, 1, [Define if faad.h uses the broken "unsigned long" pointers])]) diff --git a/m4/mpd_check_cflag.m4 b/m4/mpd_check_cflag.m4 index 9b5788f7b..8e7144936 100644 --- a/m4/mpd_check_cflag.m4 +++ b/m4/mpd_check_cflag.m4 @@ -4,9 +4,9 @@ AC_DEFUN([MPD_CHECK_FLAG],[ [mpd_check_cflag_$var],[ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" - AC_COMPILE_IFELSE([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ int main(void) { return 0; } - ], [ eval "mpd_check_cflag_$var=yes" + ])], [ eval "mpd_check_cflag_$var=yes" ], [ eval "mpd_check_cflag_$var=no" ]) CFLAGS="$save_CFLAGS" ]) -- cgit v1.2.3 From 59a417fc84883347d305b9139ecfddc9b3c2725a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Jan 2011 17:21:44 +0100 Subject: configure.ac: avoid GNU extension in "expr match" call --- m4/pretty_print.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm4') diff --git a/m4/pretty_print.m4 b/m4/pretty_print.m4 index a22357a8d..da235946c 100644 --- a/m4/pretty_print.m4 +++ b/m4/pretty_print.m4 @@ -1,6 +1,6 @@ AC_DEFUN([results], [ dnl This is a hack to allow "with" names, otherwise "enable". - num=`expr match $1 'with'` + num=`expr $1 : 'with'` if test "$num" != "0"; then var="`echo '$'$1`" else -- cgit v1.2.3 From 3149d1abf98a54e78a805f6c4b025b4d99bfd6f0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Jan 2011 17:26:09 +0100 Subject: configure.ac: eliminate bashism "echo -n" Use "printf" instead. --- m4/pretty_print.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'm4') diff --git a/m4/pretty_print.m4 b/m4/pretty_print.m4 index da235946c..687dceefe 100644 --- a/m4/pretty_print.m4 +++ b/m4/pretty_print.m4 @@ -7,13 +7,13 @@ AC_DEFUN([results], [ var="`echo '$'enable_$1`" fi - echo -n '(' + printf '(' if eval "test x$var = xyes"; then - echo -n '+' + printf '+' elif test -n "$3" && eval "test x$var = x$3"; then - echo -n '+' + printf '+' else - echo -n '-' + printf '-' fi - echo -n "$2) " + printf '%s) ' "$2" ]) -- cgit v1.2.3