]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: use AC_COMPILE_IFELSE
authorSami Kerola <kerolasa@iki.fi>
Sun, 10 Feb 2013 21:33:39 +0000 (21:33 +0000)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Feb 2013 09:11:13 +0000 (10:11 +0100)
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

index 4a79795104335a4e9bb11b34f232ab3b846d8556..ae19de81ad824d28f4732f8ded7aa1f8d9fba4bb 100644 (file)
@@ -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;],