* [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* [PATCH 2/3] build-sys: use AC_USE_SYSTEM_EXTENSIONS
2013-02-10 21:33 [PATCH 1/3] build-sys: use AC_COMPILE_IFELSE Sami Kerola
@ 2013-02-10 21:33 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: Sami Kerola @ 2013-02-10 21:33 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
The AC_GNU_SOURCE is obsolete.
Addresses: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html#index-AC_005fGNU_005fSOURCE-2058
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
configure.ac | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 7ec8bd7..df0e9a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,9 @@ AC_PREREQ(2.60)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4])
+dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
+dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
@@ -87,7 +90,6 @@ AC_SUBST([usrlib_execdir])
AM_PROG_CC_C_O
AC_PROG_CC_STDC
-AC_GNU_SOURCE
AC_CANONICAL_HOST
AC_C_CONST
AC_C_VOLATILE
--
1.8.1.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] build-sys: add package url to AC_INIT
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 ` Sami Kerola
2013-02-14 9:18 ` [PATCH 1/3] build-sys: use AC_COMPILE_IFELSE Karel Zak
2 siblings, 0 replies; 4+ messages in thread
From: Sami Kerola @ 2013-02-10 21:33 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
See last line from './configure --help'.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index df0e9a9..5154612 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,7 @@
AC_INIT(util-linux,
m4_esyscmd([tools/git-version-gen .tarball-version]),
- kzak@redhat.com)
+ [kzak@redhat.com],,
+ [http://www.kernel.org/pub/linux/utils/util-linux/])
AC_PREREQ(2.60)
--
1.8.1.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] build-sys: use AC_COMPILE_IFELSE
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 ` Karel Zak
2 siblings, 0 replies; 4+ messages in thread
From: Karel Zak @ 2013-02-14 9:18 UTC (permalink / raw)
To: Sami Kerola; +Cc: util-linux
On Sun, Feb 10, 2013 at 09:33:39PM +0000, Sami Kerola wrote:
> diff --git a/configure.ac b/configure.ac
> index d26a686..7ec8bd7 100644
> --- a/configure.ac
> +++ b/configure.ac
Applied all three patches, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [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