public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] build-sys: use AC_COMPILE_IFELSE
@ 2013-02-10 21:33 Sami Kerola
  2013-02-10 21:33 ` [PATCH 2/3] build-sys: use AC_USE_SYSTEM_EXTENSIONS Sami Kerola
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sami Kerola @ 2013-02-10 21:33 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-14  9:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-10 21:33 [PATCH 1/3] build-sys: use AC_COMPILE_IFELSE Sami Kerola
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox