public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 1/3] build-sys: use AC_COMPILE_IFELSE
Date: Sun, 10 Feb 2013 21:33:39 +0000	[thread overview]
Message-ID: <1360532021-23647-1-git-send-email-kerolasa@iki.fi> (raw)

The AC_TRY_COMPILE is obsolete.

Addresses: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html#index-AC_005fTRY_005fCOMPILE-2203
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 configure.ac | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index d26a686..7ec8bd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -375,13 +375,19 @@ no:no)
 esac
 
 
-AC_MSG_CHECKING(whether program_invocation_short_name is defined)
-AC_TRY_COMPILE([#include <argp.h>],
-	       [program_invocation_short_name = "test";],
-	       AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1,
-			 [Define if program_invocation_short_name is defined])
-	       AC_MSG_RESULT(yes),
-	       AC_MSG_RESULT(no))
+AC_MSG_CHECKING([whether program_invocation_short_name is defined])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+	#include <argp.h>
+]], [[
+	program_invocation_short_name = "test";
+]])], [
+	AC_MSG_RESULT([yes])
+	AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
+		[Define if program_invocation_short_name is defined])
+], [
+	AC_MSG_RESULT([no])
+])
+
 
 AC_MSG_CHECKING([whether __progname is defined])
 AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;],
-- 
1.8.1.3


             reply	other threads:[~2013-02-10 21:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-10 21:33 Sami Kerola [this message]
2013-02-10 21:33 ` [PATCH 2/3] build-sys: use AC_USE_SYSTEM_EXTENSIONS Sami Kerola
2013-02-10 21:33 ` [PATCH 3/3] build-sys: add package url to AC_INIT Sami Kerola
2013-02-14  9:18 ` [PATCH 1/3] build-sys: use AC_COMPILE_IFELSE Karel Zak

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=1360532021-23647-1-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.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