All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] m4: Fix warnings
@ 2021-12-08  8:26 Petr Vorel
  2021-12-09  9:42 ` xuyang2018.jy
  2022-01-24 15:16 ` Cyril Hrubis
  0 siblings, 2 replies; 8+ messages in thread
From: Petr Vorel @ 2021-12-08  8:26 UTC (permalink / raw)
  To: ltp

from autoconf 2.71:

* s/AC_HELP_STRING/AS_HELP_STRING/

Similar replace was done in autoconf commit 5958ce17 ("*
doc/autoconf.texi: Replace AC_HELP_STRING AS_HELP_STRING.")
from 2.58.

* s/AC_TRY_LINK/AC_COMPILE_IFELSE([AC_LANG_PROGRAM/

Similar replace was done in autoconf commit ede91cff ("Modernize
AC_EXEEXT and AC_OBJEXT. Now work with other languages than C and C++.")
from 2.50.

* s/AC_PROG_LEX/AC_PROG_LEX(yywrap)
yywrap argument introduced in 46f384f8 ("Revert to 2.69-compatible
behavior in AC_PROG_LEX (#110346)") from 2.70, but using is is
compatible on older releases (tested on 2.63).

Therefore keep requiring 2.61. Tested on 2.63 (SLES 11 and CentOS 6 both
don't even compile as unsupported, thus we could bump version to 2.63).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Tested:
https://github.com/pevik/ltp/actions/runs/1553085898

Kind regards,
Petr

 configure.ac                       | 26 +++++++++++++-------------
 m4/ltp-clone7args.m4               |  8 +++-----
 m4/ltp-eventfd.m4                  |  8 +++-----
 m4/ltp-kernel_devel.m4             |  6 +++---
 m4/ltp-mremap_fixed.m4             |  6 +++---
 m4/ltp-perf_event_open.m4          |  8 +++-----
 testcases/realtime/m4/check.m4     |  6 +++---
 testcases/realtime/m4/ltp-exp10.m4 |  8 +++-----
 8 files changed, 34 insertions(+), 42 deletions(-)

diff --git a/configure.ac b/configure.ac
index 063a8a9d1..366429b64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ AC_PROG_CC
 # 2.62.
 AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
 AC_PROG_AR
-AC_PROG_LEX
+AC_PROG_LEX(yywrap)
 AC_PROG_RANLIB
 AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
 AC_PROG_STRIP
@@ -216,7 +216,7 @@ AC_CHECK_TYPES([struct xt_entry_match, struct xt_entry_target],,,[
 
 # Bash
 AC_ARG_WITH([bash],
-  [AC_HELP_STRING([--with-bash],
+  [AS_HELP_STRING([--with-bash],
     [have the Bourne Again Shell interpreter])],
   [with_bash=$withval],
   [with_bash=no]
@@ -229,24 +229,24 @@ fi
 
 # metadata
 AC_ARG_ENABLE([metadata],
-  [AC_HELP_STRING([--disable-metadata],
+  [AS_HELP_STRING([--disable-metadata],
 	[Disable metadata generation (both HTML and PDF, default no)])],
   [], [enable_metadata=yes]
 )
 AC_ARG_ENABLE([metadata_html],
-  [AC_HELP_STRING([--disable-metadata-html],
+  [AS_HELP_STRING([--disable-metadata-html],
 	[Disable metadata HTML generation (default no)])],
   [], [enable_metadata_html=yes]
 )
 
 AC_ARG_ENABLE([metadata_pdf],
-  [AC_HELP_STRING([--enable-metadata-pdf],
+  [AS_HELP_STRING([--enable-metadata-pdf],
 	[Enable metadata PDF generation (default no)])],
   [], [enable_metadata_pdf=no]
 )
 
 AC_ARG_WITH([metadata_generator],
-  [AC_HELP_STRING([--with-metadata-generator=asciidoc|asciidoctor],
+  [AS_HELP_STRING([--with-metadata-generator=asciidoc|asciidoctor],
 	[Specify metadata generator to use (default autodetect)])],
   [with_metadata_generator=$withval],
   [with_metadata_generator=detect]
@@ -256,7 +256,7 @@ LTP_DOCPARSE
 
 # Expect
 AC_ARG_WITH([expect],
-  [AC_HELP_STRING([--with-expect],
+  [AS_HELP_STRING([--with-expect],
     [have the Tcl/expect library])],
   [with_expect=$withval],
   [with_expect=no]
@@ -269,7 +269,7 @@ fi
 
 # Numa
 AC_ARG_WITH([numa],
-  AC_HELP_STRING([--without-numa],
+  AS_HELP_STRING([--without-numa],
     [without numa support]),
   [with_numa=$withval],
   [with_numa=yes]
@@ -277,7 +277,7 @@ AC_ARG_WITH([numa],
 
 # Perl
 AC_ARG_WITH([perl],
-  [AC_HELP_STRING([--with-perl],
+  [AS_HELP_STRING([--with-perl],
     [have a perl interpreter])],
   [with_perl=$withval],
   [with_perl=no]
@@ -290,7 +290,7 @@ fi
 
 # Python
 AC_ARG_WITH([python],
-  [AC_HELP_STRING([--with-python],
+  [AS_HELP_STRING([--with-python],
     [have a python interpreter])],
   [with_python=$withval],
   [with_python=no]
@@ -303,7 +303,7 @@ fi
 
 # TI RPC
 AC_ARG_WITH([tirpc],
-  AC_HELP_STRING([--without-tirpc],
+  AS_HELP_STRING([--without-tirpc],
     [without libtirpc support]),
   [with_tirpc=$withval],
   [with_tirpc=yes]
@@ -313,7 +313,7 @@ AC_ARG_WITH([tirpc],
 # Testsuites knobs
 
 AC_ARG_WITH([open-posix-testsuite],
-  [AC_HELP_STRING([--with-open-posix-testsuite],
+  [AS_HELP_STRING([--with-open-posix-testsuite],
     [compile and install the open posix testsuite])],
   [with_open_posix_testsuite=$withval],
   [with_open_posix_testsuite=no]
@@ -326,7 +326,7 @@ fi
 
 # TODO: testcases/realtime requires bash and python.
 AC_ARG_WITH([realtime-testsuite],
-  [AC_HELP_STRING([--with-realtime-testsuite],
+  [AS_HELP_STRING([--with-realtime-testsuite],
     [compile and install the realtime testsuite])],
   [with_realtime_testsuite=$withval],
   [with_realtime_testsuite=no]
diff --git a/m4/ltp-clone7args.m4 b/m4/ltp-clone7args.m4
index ab55c1e33..4962789e5 100644
--- a/m4/ltp-clone7args.m4
+++ b/m4/ltp-clone7args.m4
@@ -5,13 +5,11 @@ AC_DEFUN([LTP_CHECK_CLONE_SUPPORTS_7_ARGS],[
 AH_TEMPLATE(CLONE_SUPPORTS_7_ARGS,
 [Define to 1 if clone() supports 7 arguments.])
 AC_MSG_CHECKING([if clone() supports 7 args])
-AC_TRY_LINK([#define _GNU_SOURCE
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
 		#include <sched.h>
-		#include <stdlib.h>],
-		[
+		#include <stdlib.h>]], [[
 		#ifndef __ia64__
 		clone(NULL, NULL, 0, NULL, NULL, NULL, NULL);
 		#endif
-		],
-		AC_DEFINE(CLONE_SUPPORTS_7_ARGS) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
+		]])],[AC_DEFINE(CLONE_SUPPORTS_7_ARGS) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
 ])
diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
index 5d729a33d..580df00a3 100644
--- a/m4/ltp-eventfd.m4
+++ b/m4/ltp-eventfd.m4
@@ -12,12 +12,10 @@ AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
 		AC_SUBST(AIO_LIBS, "-laio")
 
 		AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
-		AC_TRY_LINK([#include <stdio.h>
+		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
                              #include <libaio.h>
-		            ],
-		            [io_set_eventfd(NULL, 0); return 0;],
+		            ]], [[io_set_eventfd(NULL, 0); return 0;]])],
 		            [AC_DEFINE(HAVE_IO_SET_EVENTFD, 1, [Define to 1 if you have `io_set_eventfd' function.])
-						AC_MSG_RESULT(yes)],
-		            [AC_MSG_RESULT(no)])
+						AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
 	fi
 ])
diff --git a/m4/ltp-kernel_devel.m4 b/m4/ltp-kernel_devel.m4
index 8a0598e5a..d46d54775 100644
--- a/m4/ltp-kernel_devel.m4
+++ b/m4/ltp-kernel_devel.m4
@@ -9,7 +9,7 @@ AC_DEFUN([LTP_CHECK_KERNEL_DEVEL],[
 AC_MSG_CHECKING([for kernel-devel])
 AC_ARG_WITH(
 	[linux-version],
-	[AC_HELP_STRING([--with-linux-version=VERSION],
+	[AS_HELP_STRING([--with-linux-version=VERSION],
 			[specify the Linux version to build modules for])],
 	[LINUX_VERSION="${withval}"],
 	AS_IF([test "$cross_compiling" = "no"],
@@ -18,7 +18,7 @@ AC_ARG_WITH(
 AC_SUBST(LINUX_VERSION)
 
 AC_ARG_WITH([linux-dir],
-	[AC_HELP_STRING([--with-linux-dir=DIR],
+	[AS_HELP_STRING([--with-linux-dir=DIR],
 			[specify path to kernel-devel directory])],
 	[LINUX_DIR="${withval}"],
 	AS_IF([test -n "$LINUX_VERSION"],
@@ -44,7 +44,7 @@ AC_MSG_RESULT([$WITH_MODULES])
 
 AC_ARG_WITH(
 	[modules],
-	[AC_HELP_STRING([--without-modules],
+	[AS_HELP_STRING([--without-modules],
 			[disable auto-building kernel modules])],
 			[WITH_MODULES="no"],
 			[])
diff --git a/m4/ltp-mremap_fixed.m4 b/m4/ltp-mremap_fixed.m4
index 66548b82b..ff2696909 100644
--- a/m4/ltp-mremap_fixed.m4
+++ b/m4/ltp-mremap_fixed.m4
@@ -6,7 +6,7 @@ AC_DEFUN([LTP_CHECK_MREMAP_FIXED],[
 AH_TEMPLATE(HAVE_MREMAP_FIXED,
 [Define to 1 if you have MREMAP_FIXED in <sys/mman.h>.])
 AC_MSG_CHECKING([for MREMAP_FIXED in <sys/mman.h>])
-AC_TRY_COMPILE([#define _GNU_SOURCE
-                #include <sys/mman.h>], [int flags = MREMAP_FIXED;],
-               AC_DEFINE(HAVE_MREMAP_FIXED) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
+                #include <sys/mman.h>]], [[int flags = MREMAP_FIXED;]])],
+                [AC_DEFINE(HAVE_MREMAP_FIXED) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
 ])
diff --git a/m4/ltp-perf_event_open.m4 b/m4/ltp-perf_event_open.m4
index 6966cf270..4a488ffa3 100644
--- a/m4/ltp-perf_event_open.m4
+++ b/m4/ltp-perf_event_open.m4
@@ -7,10 +7,8 @@ AC_DEFUN([LTP_CHECK_SYSCALL_PERF_EVENT_OPEN],[
 AH_TEMPLATE(HAVE_PERF_EVENT_ATTR,
 [Define to 1 if you have struct perf_event_attr])
 AC_MSG_CHECKING([for perf_event_attr in linux/perf_event.h])
-AC_TRY_COMPILE([#include <unistd.h>
-		#include <linux/perf_event.h>],
-		[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
+		#include <linux/perf_event.h>]], [[
 			struct perf_event_attr pe;
-		],
-		AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
+		]])],[AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
 ])
diff --git a/testcases/realtime/m4/check.m4 b/testcases/realtime/m4/check.m4
index e60ae1928..d04a2cc73 100644
--- a/testcases/realtime/m4/check.m4
+++ b/testcases/realtime/m4/check.m4
@@ -1,10 +1,10 @@
 AC_DEFUN([REALTIME_CHECK_PRIO_INHERIT],[
 AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT])
-AC_TRY_COMPILE([
-#include <pthread.h>],[int main(void) {
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>]], [[int main(void) {
 	pthread_mutexattr_t attr;
 	return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
-}],[has_priority_inherit="yes"],[])
+}]])],[has_priority_inherit="yes"],[])
 if test "x$has_priority_inherit" = "xyes" ; then
 	AC_DEFINE(HAS_PRIORITY_INHERIT,1,[Define to 1 if you have PTHREAD_PRIO_INHERIT])
 	AC_MSG_RESULT(yes)
diff --git a/testcases/realtime/m4/ltp-exp10.m4 b/testcases/realtime/m4/ltp-exp10.m4
index 3d2320a20..625175c31 100644
--- a/testcases/realtime/m4/ltp-exp10.m4
+++ b/testcases/realtime/m4/ltp-exp10.m4
@@ -26,12 +26,10 @@ AH_TEMPLATE(HAVE_EXP10,
 AC_MSG_CHECKING([for exp10])
 backup_ldlibs="$LIBS"
 LIBS+=" -lm"
-AC_TRY_LINK([#define _GNU_SOURCE
-             #include <math.h>],
-            [
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
+             #include <math.h>]], [[
              volatile float val;
              exp10(val);
-            ],
-             AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
+            ]])],[AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
 LIBS="$backup_ldlibs"
 ])
-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] m4: Fix warnings
  2021-12-08  8:26 [LTP] [PATCH 1/1] m4: Fix warnings Petr Vorel
@ 2021-12-09  9:42 ` xuyang2018.jy
  2021-12-09 11:19   ` Petr Vorel
  2022-01-24 15:11   ` Cyril Hrubis
  2022-01-24 15:16 ` Cyril Hrubis
  1 sibling, 2 replies; 8+ messages in thread
From: xuyang2018.jy @ 2021-12-09  9:42 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi Petr


> from autoconf 2.71:
>
> * s/AC_HELP_STRING/AS_HELP_STRING/
>
> Similar replace was done in autoconf commit 5958ce17 ("*
> doc/autoconf.texi: Replace AC_HELP_STRING AS_HELP_STRING.")
> from 2.58.
>
> * s/AC_TRY_LINK/AC_COMPILE_IFELSE([AC_LANG_PROGRAM/
   * s/AC_TRY_LINK/AC_LINK_IFELSE([AC_LANG_PROGRAM/
   * s/AC_TRY_COMPILE/AC_COMPILE_IFELSE([AC_LANG_PROGRAM/
>
> Similar replace was done in autoconf commit ede91cff ("Modernize
> AC_EXEEXT and AC_OBJEXT. Now work with other languages than C and C++.")
> from 2.50.
>
> * s/AC_PROG_LEX/AC_PROG_LEX(yywrap)
> yywrap argument introduced in 46f384f8 ("Revert to 2.69-compatible
> behavior in AC_PROG_LEX (#110346)") from 2.70, but using is is
> compatible on older releases (tested on 2.63).

>
> Therefore keep requiring 2.61. Tested on 2.63 (SLES 11 and CentOS 6 both
> don't even compile as unsupported, thus we could bump version to 2.63).
>
> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> ---
> Tested:
> https://github.com/pevik/ltp/actions/runs/1553085898
>
> Kind regards,
> Petr
>
>   configure.ac                       | 26 +++++++++++++-------------
>   m4/ltp-clone7args.m4               |  8 +++-----
>   m4/ltp-eventfd.m4                  |  8 +++-----
>   m4/ltp-kernel_devel.m4             |  6 +++---
>   m4/ltp-mremap_fixed.m4             |  6 +++---
>   m4/ltp-perf_event_open.m4          |  8 +++-----
>   testcases/realtime/m4/check.m4     |  6 +++---
>   testcases/realtime/m4/ltp-exp10.m4 |  8 +++-----
>   8 files changed, 34 insertions(+), 42 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 063a8a9d1..366429b64 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -24,7 +24,7 @@ AC_PROG_CC
>   # 2.62.
>   AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
>   AC_PROG_AR
> -AC_PROG_LEX
> +AC_PROG_LEX(yywrap)
 From this autoconf commit message, If $1 is `yywrap',
and we don't find a library that provides yywrap, we fail.

I see other projects that they use AC_PROG_LEX(yywrap) or 
AC_PROG_LEX(noyywrap), but don't get why.

[1]https://github.com/search?q=%E2%80%9DAC_PROG_LEX%28yywrap%29%E2%80%9C&type=commits

Best Regards
Yang Xu

>   AC_PROG_RANLIB
>   AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
>   AC_PROG_STRIP
> @@ -216,7 +216,7 @@ AC_CHECK_TYPES([struct xt_entry_match, struct xt_entry_target],,,[
>
>   # Bash
>   AC_ARG_WITH([bash],
> -  [AC_HELP_STRING([--with-bash],
> +  [AS_HELP_STRING([--with-bash],
>       [have the Bourne Again Shell interpreter])],
>     [with_bash=$withval],
>     [with_bash=no]
> @@ -229,24 +229,24 @@ fi
>
>   # metadata
>   AC_ARG_ENABLE([metadata],
> -  [AC_HELP_STRING([--disable-metadata],
> +  [AS_HELP_STRING([--disable-metadata],
>   	[Disable metadata generation (both HTML and PDF, default no)])],
>     [], [enable_metadata=yes]
>   )
>   AC_ARG_ENABLE([metadata_html],
> -  [AC_HELP_STRING([--disable-metadata-html],
> +  [AS_HELP_STRING([--disable-metadata-html],
>   	[Disable metadata HTML generation (default no)])],
>     [], [enable_metadata_html=yes]
>   )
>
>   AC_ARG_ENABLE([metadata_pdf],
> -  [AC_HELP_STRING([--enable-metadata-pdf],
> +  [AS_HELP_STRING([--enable-metadata-pdf],
>   	[Enable metadata PDF generation (default no)])],
>     [], [enable_metadata_pdf=no]
>   )
>
>   AC_ARG_WITH([metadata_generator],
> -  [AC_HELP_STRING([--with-metadata-generator=asciidoc|asciidoctor],
> +  [AS_HELP_STRING([--with-metadata-generator=asciidoc|asciidoctor],
>   	[Specify metadata generator to use (default autodetect)])],
>     [with_metadata_generator=$withval],
>     [with_metadata_generator=detect]
> @@ -256,7 +256,7 @@ LTP_DOCPARSE
>
>   # Expect
>   AC_ARG_WITH([expect],
> -  [AC_HELP_STRING([--with-expect],
> +  [AS_HELP_STRING([--with-expect],
>       [have the Tcl/expect library])],
>     [with_expect=$withval],
>     [with_expect=no]
> @@ -269,7 +269,7 @@ fi
>
>   # Numa
>   AC_ARG_WITH([numa],
> -  AC_HELP_STRING([--without-numa],
> +  AS_HELP_STRING([--without-numa],
>       [without numa support]),
>     [with_numa=$withval],
>     [with_numa=yes]
> @@ -277,7 +277,7 @@ AC_ARG_WITH([numa],
>
>   # Perl
>   AC_ARG_WITH([perl],
> -  [AC_HELP_STRING([--with-perl],
> +  [AS_HELP_STRING([--with-perl],
>       [have a perl interpreter])],
>     [with_perl=$withval],
>     [with_perl=no]
> @@ -290,7 +290,7 @@ fi
>
>   # Python
>   AC_ARG_WITH([python],
> -  [AC_HELP_STRING([--with-python],
> +  [AS_HELP_STRING([--with-python],
>       [have a python interpreter])],
>     [with_python=$withval],
>     [with_python=no]
> @@ -303,7 +303,7 @@ fi
>
>   # TI RPC
>   AC_ARG_WITH([tirpc],
> -  AC_HELP_STRING([--without-tirpc],
> +  AS_HELP_STRING([--without-tirpc],
>       [without libtirpc support]),
>     [with_tirpc=$withval],
>     [with_tirpc=yes]
> @@ -313,7 +313,7 @@ AC_ARG_WITH([tirpc],
>   # Testsuites knobs
>
>   AC_ARG_WITH([open-posix-testsuite],
> -  [AC_HELP_STRING([--with-open-posix-testsuite],
> +  [AS_HELP_STRING([--with-open-posix-testsuite],
>       [compile and install the open posix testsuite])],
>     [with_open_posix_testsuite=$withval],
>     [with_open_posix_testsuite=no]
> @@ -326,7 +326,7 @@ fi
>
>   # TODO: testcases/realtime requires bash and python.
>   AC_ARG_WITH([realtime-testsuite],
> -  [AC_HELP_STRING([--with-realtime-testsuite],
> +  [AS_HELP_STRING([--with-realtime-testsuite],
>       [compile and install the realtime testsuite])],
>     [with_realtime_testsuite=$withval],
>     [with_realtime_testsuite=no]
> diff --git a/m4/ltp-clone7args.m4 b/m4/ltp-clone7args.m4
> index ab55c1e33..4962789e5 100644
> --- a/m4/ltp-clone7args.m4
> +++ b/m4/ltp-clone7args.m4
> @@ -5,13 +5,11 @@ AC_DEFUN([LTP_CHECK_CLONE_SUPPORTS_7_ARGS],[
>   AH_TEMPLATE(CLONE_SUPPORTS_7_ARGS,
>   [Define to 1 if clone() supports 7 arguments.])
>   AC_MSG_CHECKING([if clone() supports 7 args])
> -AC_TRY_LINK([#define _GNU_SOURCE
> +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
>   		#include<sched.h>
> -		#include<stdlib.h>],
> -		[
> +		#include<stdlib.h>]], [[
>   		#ifndef __ia64__
>   		clone(NULL, NULL, 0, NULL, NULL, NULL, NULL);
>   		#endif
> -		],
> -		AC_DEFINE(CLONE_SUPPORTS_7_ARGS) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> +		]])],[AC_DEFINE(CLONE_SUPPORTS_7_ARGS) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
>   ])
> diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
> index 5d729a33d..580df00a3 100644
> --- a/m4/ltp-eventfd.m4
> +++ b/m4/ltp-eventfd.m4
> @@ -12,12 +12,10 @@ AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
>   		AC_SUBST(AIO_LIBS, "-laio")
>
>   		AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
> -		AC_TRY_LINK([#include<stdio.h>
> +		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include<stdio.h>
>                                #include<libaio.h>
> -		            ],
> -		            [io_set_eventfd(NULL, 0); return 0;],
> +		            ]], [[io_set_eventfd(NULL, 0); return 0;]])],
>   		            [AC_DEFINE(HAVE_IO_SET_EVENTFD, 1, [Define to 1 if you have `io_set_eventfd' function.])
> -						AC_MSG_RESULT(yes)],
> -		            [AC_MSG_RESULT(no)])
> +						AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
>   	fi
>   ])
> diff --git a/m4/ltp-kernel_devel.m4 b/m4/ltp-kernel_devel.m4
> index 8a0598e5a..d46d54775 100644
> --- a/m4/ltp-kernel_devel.m4
> +++ b/m4/ltp-kernel_devel.m4
> @@ -9,7 +9,7 @@ AC_DEFUN([LTP_CHECK_KERNEL_DEVEL],[
>   AC_MSG_CHECKING([for kernel-devel])
>   AC_ARG_WITH(
>   	[linux-version],
> -	[AC_HELP_STRING([--with-linux-version=VERSION],
> +	[AS_HELP_STRING([--with-linux-version=VERSION],
>   			[specify the Linux version to build modules for])],
>   	[LINUX_VERSION="${withval}"],
>   	AS_IF([test "$cross_compiling" = "no"],
> @@ -18,7 +18,7 @@ AC_ARG_WITH(
>   AC_SUBST(LINUX_VERSION)
>
>   AC_ARG_WITH([linux-dir],
> -	[AC_HELP_STRING([--with-linux-dir=DIR],
> +	[AS_HELP_STRING([--with-linux-dir=DIR],
>   			[specify path to kernel-devel directory])],
>   	[LINUX_DIR="${withval}"],
>   	AS_IF([test -n "$LINUX_VERSION"],
> @@ -44,7 +44,7 @@ AC_MSG_RESULT([$WITH_MODULES])
>
>   AC_ARG_WITH(
>   	[modules],
> -	[AC_HELP_STRING([--without-modules],
> +	[AS_HELP_STRING([--without-modules],
>   			[disable auto-building kernel modules])],
>   			[WITH_MODULES="no"],
>   			[])
> diff --git a/m4/ltp-mremap_fixed.m4 b/m4/ltp-mremap_fixed.m4
> index 66548b82b..ff2696909 100644
> --- a/m4/ltp-mremap_fixed.m4
> +++ b/m4/ltp-mremap_fixed.m4
> @@ -6,7 +6,7 @@ AC_DEFUN([LTP_CHECK_MREMAP_FIXED],[
>   AH_TEMPLATE(HAVE_MREMAP_FIXED,
>   [Define to 1 if you have MREMAP_FIXED in<sys/mman.h>.])
>   AC_MSG_CHECKING([for MREMAP_FIXED in<sys/mman.h>])
> -AC_TRY_COMPILE([#define _GNU_SOURCE
> -                #include<sys/mman.h>], [int flags = MREMAP_FIXED;],
> -               AC_DEFINE(HAVE_MREMAP_FIXED) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
> +                #include<sys/mman.h>]], [[int flags = MREMAP_FIXED;]])],
> +                [AC_DEFINE(HAVE_MREMAP_FIXED) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
>   ])
> diff --git a/m4/ltp-perf_event_open.m4 b/m4/ltp-perf_event_open.m4
> index 6966cf270..4a488ffa3 100644
> --- a/m4/ltp-perf_event_open.m4
> +++ b/m4/ltp-perf_event_open.m4
> @@ -7,10 +7,8 @@ AC_DEFUN([LTP_CHECK_SYSCALL_PERF_EVENT_OPEN],[
>   AH_TEMPLATE(HAVE_PERF_EVENT_ATTR,
>   [Define to 1 if you have struct perf_event_attr])
>   AC_MSG_CHECKING([for perf_event_attr in linux/perf_event.h])
> -AC_TRY_COMPILE([#include<unistd.h>
> -		#include<linux/perf_event.h>],
> -		[
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include<unistd.h>
> +		#include<linux/perf_event.h>]], [[
>   			struct perf_event_attr pe;
> -		],
> -		AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> +		]])],[AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
>   ])
> diff --git a/testcases/realtime/m4/check.m4 b/testcases/realtime/m4/check.m4
> index e60ae1928..d04a2cc73 100644
> --- a/testcases/realtime/m4/check.m4
> +++ b/testcases/realtime/m4/check.m4
> @@ -1,10 +1,10 @@
>   AC_DEFUN([REALTIME_CHECK_PRIO_INHERIT],[
>   AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT])
> -AC_TRY_COMPILE([
> -#include<pthread.h>],[int main(void) {
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> +#include<pthread.h>]], [[int main(void) {
>   	pthread_mutexattr_t attr;
>   	return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
> -}],[has_priority_inherit="yes"],[])
> +}]])],[has_priority_inherit="yes"],[])
>   if test "x$has_priority_inherit" = "xyes" ; then
>   	AC_DEFINE(HAS_PRIORITY_INHERIT,1,[Define to 1 if you have PTHREAD_PRIO_INHERIT])
>   	AC_MSG_RESULT(yes)
> diff --git a/testcases/realtime/m4/ltp-exp10.m4 b/testcases/realtime/m4/ltp-exp10.m4
> index 3d2320a20..625175c31 100644
> --- a/testcases/realtime/m4/ltp-exp10.m4
> +++ b/testcases/realtime/m4/ltp-exp10.m4
> @@ -26,12 +26,10 @@ AH_TEMPLATE(HAVE_EXP10,
>   AC_MSG_CHECKING([for exp10])
>   backup_ldlibs="$LIBS"
>   LIBS+=" -lm"
> -AC_TRY_LINK([#define _GNU_SOURCE
> -             #include<math.h>],
> -            [
> +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
> +             #include<math.h>]], [[
>                volatile float val;
>                exp10(val);
> -            ],
> -             AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> +            ]])],[AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
>   LIBS="$backup_ldlibs"
>   ])

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] m4: Fix warnings
  2021-12-09  9:42 ` xuyang2018.jy
@ 2021-12-09 11:19   ` Petr Vorel
  2022-01-24 15:11   ` Cyril Hrubis
  1 sibling, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2021-12-09 11:19 UTC (permalink / raw)
  To: xuyang2018.jy; +Cc: ltp

Hi Xu, all,


[Cc also Sagi, who is auctually using ltp-pan [1],
Sagi: could you please test this patch [2] or in patchwork [3]

> Hi Petr


> > from autoconf 2.71:

> > * s/AC_HELP_STRING/AS_HELP_STRING/

> > Similar replace was done in autoconf commit 5958ce17 ("*
> > doc/autoconf.texi: Replace AC_HELP_STRING AS_HELP_STRING.")
> > from 2.58.

> > * s/AC_TRY_LINK/AC_COMPILE_IFELSE([AC_LANG_PROGRAM/
>    * s/AC_TRY_LINK/AC_LINK_IFELSE([AC_LANG_PROGRAM/
>    * s/AC_TRY_COMPILE/AC_COMPILE_IFELSE([AC_LANG_PROGRAM/

thanks!

...
> > +++ b/configure.ac
> > @@ -24,7 +24,7 @@ AC_PROG_CC
> >   # 2.62.
> >   AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
> >   AC_PROG_AR
> > -AC_PROG_LEX
> > +AC_PROG_LEX(yywrap)
>  From this autoconf commit message, If $1 is `yywrap',
> and we don't find a library that provides yywrap, we fail.

FYI we have yywrap(void) in pan/scan.l
To be honest, I'm a bit lost in docs [4]:

	yywrap
	Indicate that the library in LEXLIB needs to define the function yywrap. If
	a library that defines this function cannot be found, LEX will be reset to
	‘:’.

	noyywrap
	Indicate that the library in LEXLIB does not need to define the function
	yywrap. configure will not search for it at all.

	Prior to Autoconf 2.70, AC_PROG_LEX did not take any arguments, and its
	behavior was different from either of the above possibilities: it would
	search for a library that defines yywrap, and would set LEXLIB to that
	library if it finds one. However, if a library that defines this function
	could not be found, LEXLIB would be left empty and LEX would not be reset.
	This behavior was due to a bug, but several packages came to depend on it,
	so AC_PROG_LEX still does this if neither the yywrap nor the noyywrap option
	is given.

	Usage of AC_PROG_LEX without choosing one of the yywrap or noyywrap options
	is deprecated. It is usually better to use noyywrap and define the yywrap
	function yourself, as this almost always renders the LEXLIB unnecessary.

=> using yywrap leads for *new* autoconf 2.71 to
1) LEX := :, instead of LEX := flex in include/mk/config.mk
2) missing #define YYTEXT_POINTER 1 in include/config.h

i.e. AC_PROG_LEX(noyywrap) leads to the same behavior as with AC_PROG_LEX
without argument on 2.71 (or any setup on *old* 2.69 autoconf).

But I'm not really expert on flex (and instead of spending time with ltp-pan I'd
prefer work on upstreaming runltp-ng [5]).

Kind regards,
Petr

[1] https://lore.kernel.org/ltp/20211127121609.26837-1-saginakash@gmail.com/
[2] https://lore.kernel.org/ltp/20211208082625.26324-1-pvorel@suse.cz/
[3] https://patchwork.ozlabs.org/project/ltp/patch/20211208082625.26324-1-pvorel@suse.cz/
[4] https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Particular-Programs.html
[5] https://github.com/metan-ucw/runltp-ng

> I see other projects that they use AC_PROG_LEX(yywrap) or 
> AC_PROG_LEX(noyywrap), but don't get why.

> [1]https://github.com/search?q=%E2%80%9DAC_PROG_LEX%28yywrap%29%E2%80%9C&type=commits
NOTE: I tried to search on Debian distro based search https://codesearch.debian.net/ :
https://codesearch.debian.net/search?q=AC_PROG_LEX%28yywrap%29&literal=1&perpkg=1
https://codesearch.debian.net/search?q=AC_PROG_LEX%28noyywrap%29&literal=1
But I got actually less results than on github.

> Best Regards
> Yang Xu

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] m4: Fix warnings
  2021-12-09  9:42 ` xuyang2018.jy
  2021-12-09 11:19   ` Petr Vorel
@ 2022-01-24 15:11   ` Cyril Hrubis
  2022-01-25  1:27     ` xuyang2018.jy
  1 sibling, 1 reply; 8+ messages in thread
From: Cyril Hrubis @ 2022-01-24 15:11 UTC (permalink / raw)
  To: xuyang2018.jy; +Cc: ltp

Hi!
> > * s/AC_PROG_LEX/AC_PROG_LEX(yywrap)
> > yywrap argument introduced in 46f384f8 ("Revert to 2.69-compatible
> > behavior in AC_PROG_LEX (#110346)") from 2.70, but using is is
> > compatible on older releases (tested on 2.63).

Just looked at what the lex is needed for and it's ltp-scanner.c in pan/
and the ltp-scanner does not seem to be used in any of the scripts we
have, so maybe we can just remove it.


Or is there anyone out there who needs ltp-scanner binary?

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] m4: Fix warnings
  2021-12-08  8:26 [LTP] [PATCH 1/1] m4: Fix warnings Petr Vorel
  2021-12-09  9:42 ` xuyang2018.jy
@ 2022-01-24 15:16 ` Cyril Hrubis
  2022-01-24 17:18   ` Petr Vorel
  2022-01-25 17:09   ` Petr Vorel
  1 sibling, 2 replies; 8+ messages in thread
From: Cyril Hrubis @ 2022-01-24 15:16 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi!
> diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
> index 5d729a33d..580df00a3 100644
> --- a/m4/ltp-eventfd.m4
> +++ b/m4/ltp-eventfd.m4
> @@ -12,12 +12,10 @@ AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
>  		AC_SUBST(AIO_LIBS, "-laio")
>  
>  		AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
> -		AC_TRY_LINK([#include <stdio.h>
> +		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
>                               #include <libaio.h>
> -		            ],
> -		            [io_set_eventfd(NULL, 0); return 0;],
> +		            ]], [[io_set_eventfd(NULL, 0); return 0;]])],
>  		            [AC_DEFINE(HAVE_IO_SET_EVENTFD, 1, [Define to 1 if you have `io_set_eventfd' function.])
> -						AC_MSG_RESULT(yes)],
> -		            [AC_MSG_RESULT(no)])
> +						AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])

Shouldn't we convert this bit into AC_CHECK_FUNCS() (in a separte patch)?

>  	fi
>  ])
> diff --git a/m4/ltp-kernel_devel.m4 b/m4/ltp-kernel_devel.m4
> index 8a0598e5a..d46d54775 100644
> --- a/m4/ltp-kernel_devel.m4
> +++ b/m4/ltp-kernel_devel.m4
> @@ -9,7 +9,7 @@ AC_DEFUN([LTP_CHECK_KERNEL_DEVEL],[
>  AC_MSG_CHECKING([for kernel-devel])
>  AC_ARG_WITH(
>  	[linux-version],
> -	[AC_HELP_STRING([--with-linux-version=VERSION],
> +	[AS_HELP_STRING([--with-linux-version=VERSION],
>  			[specify the Linux version to build modules for])],
>  	[LINUX_VERSION="${withval}"],
>  	AS_IF([test "$cross_compiling" = "no"],
> @@ -18,7 +18,7 @@ AC_ARG_WITH(
>  AC_SUBST(LINUX_VERSION)
>  
>  AC_ARG_WITH([linux-dir],
> -	[AC_HELP_STRING([--with-linux-dir=DIR],
> +	[AS_HELP_STRING([--with-linux-dir=DIR],
>  			[specify path to kernel-devel directory])],
>  	[LINUX_DIR="${withval}"],
>  	AS_IF([test -n "$LINUX_VERSION"],
> @@ -44,7 +44,7 @@ AC_MSG_RESULT([$WITH_MODULES])
>  
>  AC_ARG_WITH(
>  	[modules],
> -	[AC_HELP_STRING([--without-modules],
> +	[AS_HELP_STRING([--without-modules],
>  			[disable auto-building kernel modules])],
>  			[WITH_MODULES="no"],
>  			[])
> diff --git a/m4/ltp-mremap_fixed.m4 b/m4/ltp-mremap_fixed.m4
> index 66548b82b..ff2696909 100644
> --- a/m4/ltp-mremap_fixed.m4
> +++ b/m4/ltp-mremap_fixed.m4
> @@ -6,7 +6,7 @@ AC_DEFUN([LTP_CHECK_MREMAP_FIXED],[
>  AH_TEMPLATE(HAVE_MREMAP_FIXED,
>  [Define to 1 if you have MREMAP_FIXED in <sys/mman.h>.])
>  AC_MSG_CHECKING([for MREMAP_FIXED in <sys/mman.h>])
> -AC_TRY_COMPILE([#define _GNU_SOURCE
> -                #include <sys/mman.h>], [int flags = MREMAP_FIXED;],
> -               AC_DEFINE(HAVE_MREMAP_FIXED) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
> +                #include <sys/mman.h>]], [[int flags = MREMAP_FIXED;]])],
> +                [AC_DEFINE(HAVE_MREMAP_FIXED) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
>  ])
> diff --git a/m4/ltp-perf_event_open.m4 b/m4/ltp-perf_event_open.m4
> index 6966cf270..4a488ffa3 100644
> --- a/m4/ltp-perf_event_open.m4
> +++ b/m4/ltp-perf_event_open.m4
> @@ -7,10 +7,8 @@ AC_DEFUN([LTP_CHECK_SYSCALL_PERF_EVENT_OPEN],[
>  AH_TEMPLATE(HAVE_PERF_EVENT_ATTR,
>  [Define to 1 if you have struct perf_event_attr])
>  AC_MSG_CHECKING([for perf_event_attr in linux/perf_event.h])
> -AC_TRY_COMPILE([#include <unistd.h>
> -		#include <linux/perf_event.h>],
> -		[
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
> +		#include <linux/perf_event.h>]], [[
>  			struct perf_event_attr pe;
> -		],
> -		AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> +		]])],[AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])

And this one with AC_CHECK_TYPES()?

>  ])
> diff --git a/testcases/realtime/m4/check.m4 b/testcases/realtime/m4/check.m4
> index e60ae1928..d04a2cc73 100644
> --- a/testcases/realtime/m4/check.m4
> +++ b/testcases/realtime/m4/check.m4
> @@ -1,10 +1,10 @@
>  AC_DEFUN([REALTIME_CHECK_PRIO_INHERIT],[
>  AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT])
> -AC_TRY_COMPILE([
> -#include <pthread.h>],[int main(void) {
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> +#include <pthread.h>]], [[int main(void) {
>  	pthread_mutexattr_t attr;
>  	return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
> -}],[has_priority_inherit="yes"],[])
> +}]])],[has_priority_inherit="yes"],[])
>  if test "x$has_priority_inherit" = "xyes" ; then
>  	AC_DEFINE(HAS_PRIORITY_INHERIT,1,[Define to 1 if you have PTHREAD_PRIO_INHERIT])
>  	AC_MSG_RESULT(yes)
> diff --git a/testcases/realtime/m4/ltp-exp10.m4 b/testcases/realtime/m4/ltp-exp10.m4
> index 3d2320a20..625175c31 100644
> --- a/testcases/realtime/m4/ltp-exp10.m4
> +++ b/testcases/realtime/m4/ltp-exp10.m4
> @@ -26,12 +26,10 @@ AH_TEMPLATE(HAVE_EXP10,
>  AC_MSG_CHECKING([for exp10])
>  backup_ldlibs="$LIBS"
>  LIBS+=" -lm"
> -AC_TRY_LINK([#define _GNU_SOURCE
> -             #include <math.h>],
> -            [
> +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
> +             #include <math.h>]], [[
>               volatile float val;
>               exp10(val);
> -            ],
> -             AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> +            ]])],[AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
>  LIBS="$backup_ldlibs"
>  ])

Similarily here AC_CHECK_FUNCS()?

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] m4: Fix warnings
  2022-01-24 15:16 ` Cyril Hrubis
@ 2022-01-24 17:18   ` Petr Vorel
  2022-01-25 17:09   ` Petr Vorel
  1 sibling, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2022-01-24 17:18 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

Hi Cyril,

thx for looking into this.

> Hi!
> > diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
> > index 5d729a33d..580df00a3 100644
> > --- a/m4/ltp-eventfd.m4
> > +++ b/m4/ltp-eventfd.m4
> > @@ -12,12 +12,10 @@ AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
> >  		AC_SUBST(AIO_LIBS, "-laio")

> >  		AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
> > -		AC_TRY_LINK([#include <stdio.h>
> > +		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
> >                               #include <libaio.h>
> > -		            ],
> > -		            [io_set_eventfd(NULL, 0); return 0;],
> > +		            ]], [[io_set_eventfd(NULL, 0); return 0;]])],
> >  		            [AC_DEFINE(HAVE_IO_SET_EVENTFD, 1, [Define to 1 if you have `io_set_eventfd' function.])
> > -						AC_MSG_RESULT(yes)],
> > -		            [AC_MSG_RESULT(no)])
> > +						AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])

> Shouldn't we convert this bit into AC_CHECK_FUNCS() (in a separte patch)?
Ah, thx for catching this.

> > +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
> > +		#include <linux/perf_event.h>]], [[
> >  			struct perf_event_attr pe;
> > -		],
> > -		AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> > +		]])],[AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])

> And this one with AC_CHECK_TYPES()?
+1

> > -AC_TRY_LINK([#define _GNU_SOURCE
> > -             #include <math.h>],
> > -            [
> > +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
> > +             #include <math.h>]], [[
> >               volatile float val;
> >               exp10(val);
> > -            ],
> > -             AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> > +            ]])],[AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> >  LIBS="$backup_ldlibs"
> >  ])

> Similarily here AC_CHECK_FUNCS()?
+1

I'll recheck all of AC_LINK_IFELSE, AC_COMPILE_IFELSE before posting next
version.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] m4: Fix warnings
  2022-01-24 15:11   ` Cyril Hrubis
@ 2022-01-25  1:27     ` xuyang2018.jy
  0 siblings, 0 replies; 8+ messages in thread
From: xuyang2018.jy @ 2022-01-25  1:27 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

Hi Cyril
> Hi!
>>> * s/AC_PROG_LEX/AC_PROG_LEX(yywrap)
>>> yywrap argument introduced in 46f384f8 ("Revert to 2.69-compatible
>>> behavior in AC_PROG_LEX (#110346)") from 2.70, but using is is
>>> compatible on older releases (tested on 2.63).
>
> Just looked at what the lex is needed for and it's ltp-scanner.c in pan/
> and the ltp-scanner does not seem to be used in any of the scripts we
> have, so maybe we can just remove it.
AFAIK, I don't see anyone use this ltp-scanner.c. So removing it is safe.

Best Regards
Yang Xu
>
>
> Or is there anyone out there who needs ltp-scanner binary?
>

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] m4: Fix warnings
  2022-01-24 15:16 ` Cyril Hrubis
  2022-01-24 17:18   ` Petr Vorel
@ 2022-01-25 17:09   ` Petr Vorel
  1 sibling, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2022-01-25 17:09 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

> Hi!
> > diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
> > index 5d729a33d..580df00a3 100644
> > --- a/m4/ltp-eventfd.m4
> > +++ b/m4/ltp-eventfd.m4
> > @@ -12,12 +12,10 @@ AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
> >  		AC_SUBST(AIO_LIBS, "-laio")

> >  		AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
> > -		AC_TRY_LINK([#include <stdio.h>
> > +		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
> >                               #include <libaio.h>
> > -		            ],
> > -		            [io_set_eventfd(NULL, 0); return 0;],
> > +		            ]], [[io_set_eventfd(NULL, 0); return 0;]])],
> >  		            [AC_DEFINE(HAVE_IO_SET_EVENTFD, 1, [Define to 1 if you have `io_set_eventfd' function.])
> > -						AC_MSG_RESULT(yes)],
> > -		            [AC_MSG_RESULT(no)])
> > +						AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])

> Shouldn't we convert this bit into AC_CHECK_FUNCS() (in a separte patch)?

Well, this function is defined as inline in libaio.h.
I was not able to check it with AC_CHECK_FUNCS, nor with AC_CHECK_LIB nor
AC_SEARCH_LIBS.

It was added in Jan 2008 in libaio-0.3.108, even Centos 6 has 0.3.109 (which
cannot compile at least 2 releases back), SLES11-SP4 and Debian stretch
(oldoldstable) have 0.3.110. I guess it's time to expect io_set_eventfd is in
libaio.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2022-01-25 17:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08  8:26 [LTP] [PATCH 1/1] m4: Fix warnings Petr Vorel
2021-12-09  9:42 ` xuyang2018.jy
2021-12-09 11:19   ` Petr Vorel
2022-01-24 15:11   ` Cyril Hrubis
2022-01-25  1:27     ` xuyang2018.jy
2022-01-24 15:16 ` Cyril Hrubis
2022-01-24 17:18   ` Petr Vorel
2022-01-25 17:09   ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.