summaryrefslogtreecommitdiff
path: root/m4/ax_check_posix_regcomp.m4
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-07-23 10:38:45 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-07-23 10:38:45 +0200
commitaadd47319cc22bf278e1a479bb1d0a640d607207 (patch)
tree7d87490596e6856fc1cf6b7d3d8710afb7e1fbff /m4/ax_check_posix_regcomp.m4
parent8ce1199b2756686f2c31dff26a71164cd5a07be7 (diff)
downloadautoconf-archive-aadd47319cc22bf278e1a479bb1d0a640d607207.tar.gz
Replace obsolete AC_TRY_RUN with AC_RUN_IFELSE
Autoconf made several macros obsolete including the AC_TRY_RUN and in 2000 and since Autoconf 2.50: http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2 These macros should be replaced with the current AC_RUN_IFELSE instead. This patch was created with the help of the autoupdate script. Reference docs: - https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html - https://www.gnu.org/software/autoconf/manual/autoconf-2.59/autoconf.pdf
Diffstat (limited to 'm4/ax_check_posix_regcomp.m4')
-rw-r--r--m4/ax_check_posix_regcomp.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/m4/ax_check_posix_regcomp.m4 b/m4/ax_check_posix_regcomp.m4
index 68f743a..121734c 100644
--- a/m4/ax_check_posix_regcomp.m4
+++ b/m4/ax_check_posix_regcomp.m4
@@ -21,20 +21,20 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 6
+#serial 7
AU_ALIAS([AG_CHECK_POSIX_REGCOMP], [AX_CHECK_POSIX_REGCOMP])
AC_DEFUN([AX_CHECK_POSIX_REGCOMP],[
AC_MSG_CHECKING([whether POSIX compliant regcomp()/regexec()])
AC_CACHE_VAL([ax_cv_posix_regcomp],[
- AC_TRY_RUN([#include <sys/types.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
#include <regex.h>
int main() {
int flags = REG_EXTENDED|REG_ICASE|REG_NEWLINE;
regex_t re;
if (regcomp( &re, "^.*$", flags ) != 0)
return 1;
- return regcomp( &re, "|no.*", flags ); }],[ax_cv_posix_regcomp=yes],[ax_cv_posix_regcomp=no],[ax_cv_posix_regcomp=no]
+ return regcomp( &re, "|no.*", flags ); }]])],[ax_cv_posix_regcomp=yes],[ax_cv_posix_regcomp=no],[ax_cv_posix_regcomp=no]
) # end of TRY_RUN]) # end of CACHE_VAL
AC_MSG_RESULT([$ax_cv_posix_regcomp])