]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix warnings emitted by autoconf-2.69d.
authorBruno Haible <bruno@clisp.org>
Sat, 14 Nov 2020 13:53:19 +0000 (14:53 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2022 10:26:30 +0000 (12:26 +0200)
* gettext-tools/configure.ac: Use AC_LINK_IFELSE instead of AC_TRY_LINK. Don't
invoke AC_FUNC_VFORK.
* gettext-tools/m4/exported.m4 (gt_GLOBAL_SYMBOL_PIPE): Require LT_PATH_NM
instead of AC_PROG_NM.
* gnulib-local/m4/libxml.m4 (gl_LIBXML): Use AC_LINK_IFELSE instead of
AC_TRY_LINK. Use AC_PREPROC_IFELSE instead of AC_TRY_CPP.
* libtextstyle/configure.ac: Use AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER.
* libtextstyle/gnulib-local/m4/libcroco.m4 (gl_LIBCROCO): Use AC_LINK_IFELSE
instead of AC_TRY_LINK.
* libtextstyle/gnulib-local/m4/libglib.m4 (gl_LIBGLIB): Use AC_LINK_IFELSE
instead of AC_TRY_LINK. Require AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE.
* libtextstyle/gnulib-local/m4/termcap.m4 (gl_TERMCAP_BODY): Use AC_LINK_IFELSE
instead of AC_TRY_LINK.
* libtextstyle/gnulib-local/m4/terminfo.m4 (gl_TERMINFO_BODY): Use
AC_LINK_IFELSE instead of AC_TRY_LINK.
* m4/woe32-dll.m4 (gl_WOE32_DLL): Use AC_LINK_IFELSE instead of AC_TRY_LINK.

gettext-tools/configure.ac
gettext-tools/m4/exported.m4
gnulib-local/m4/libxml.m4
libtextstyle/configure.ac
libtextstyle/gnulib-local/m4/libcroco.m4
libtextstyle/gnulib-local/m4/libglib.m4
libtextstyle/gnulib-local/m4/termcap.m4
libtextstyle/gnulib-local/m4/terminfo.m4
m4/woe32-dll.m4

index 04db7814921ad86b99f30c979ac458ae07640ab9..ca6a43496269eaf12fa9426d0e24733bf43f99ab 100644 (file)
@@ -170,24 +170,28 @@ dnl Test whether msgmerge must be linked against libm. This is the case on
 dnl most systems; but BeOS has all <math.h> functions in libc and doesn't have
 dnl a libm.
 MSGMERGE_LIBM=?
-AC_TRY_LINK([
-   #ifndef __NO_MATH_INLINES
-   # define __NO_MATH_INLINES 1 /* for glibc */
-   #endif
-   #include <math.h>
-   double x;],
-  [x = ceil(x); x = sqrt(x);],
-  [MSGMERGE_LIBM=])
-if test "$MSGMERGE_LIBM" = "?"; then
-  save_LIBS="$LIBS" 
-  LIBS="$LIBS -lm"
-  AC_TRY_LINK([
+AC_LINK_IFELSE(
+  [AC_LANG_PROGRAM([[
      #ifndef __NO_MATH_INLINES
      # define __NO_MATH_INLINES 1 /* for glibc */
      #endif
      #include <math.h>
-     double x;],
-    [x = ceil(x); x = sqrt(x);],
+     double x;
+     ]],
+     [[x = ceil(x); x = sqrt(x);]])],
+  [MSGMERGE_LIBM=])
+if test "$MSGMERGE_LIBM" = "?"; then
+  save_LIBS="$LIBS"
+  LIBS="$LIBS -lm"
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([[
+       #ifndef __NO_MATH_INLINES
+       # define __NO_MATH_INLINES 1 /* for glibc */
+       #endif
+       #include <math.h>
+       double x;
+       ]],
+       [[x = ceil(x); x = sqrt(x);]])],
     [MSGMERGE_LIBM="-lm"])
   LIBS="$save_LIBS"
 fi
@@ -218,7 +222,6 @@ gl_GLIBC21
 
 dnl Checks for library functions.
 AC_CHECK_FUNCS([select])
-AC_FUNC_VFORK
 gt_SIGINFO
 gt_SETLOCALE
 
index 2a4baeb84290c3356c521da7f7ba4db3bd8533c8..2ee884f8b36fb44b7e6f3bdb99e98f5ea067211c 100644 (file)
@@ -1,4 +1,4 @@
-# exported.m4 serial 2 (gettext-0.20.2)
+# exported.m4 serial 3 (gettext-0.21.1)
 dnl Copyright (C) 2006, 2009, 2019-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl Prerequisites of the exported.sh script:
 dnl Check for nm output filter that yields the exported symbols.
 AC_DEFUN([gt_GLOBAL_SYMBOL_PIPE], [
-  AC_REQUIRE([AC_PROG_NM]) dnl provided by libtool.m4
+  AC_REQUIRE([LT_PATH_NM]) dnl provided by libtool.m4
   AC_SUBST([NM])
   AC_REQUIRE([_LT_CMD_GLOBAL_SYMBOLS]) dnl provided by libtool.m4
   GLOBAL_SYMBOL_PIPE=$lt_cv_sys_global_symbol_pipe
index 2f80c37662f54772a62adde00338764fea106817..0340490455751f951927357da9b992e6e918ea4c 100644 (file)
@@ -1,5 +1,5 @@
-# libxml.m4 serial 9
-dnl Copyright (C) 2006, 2008, 2011, 2013, 2016, 2019 Free Software Foundation, Inc.
+# libxml.m4 serial 10
+dnl Copyright (C) 2006, 2008, 2011, 2013, 2016, 2019-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -50,14 +50,16 @@ AC_DEFUN([gl_LIBXML],
         dnl -Wl,--disable-auto-import.
         AC_LIB_LINKFLAGS_BODY([xml2])
         LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV"
-        AC_TRY_LINK([#include <libxml/xmlversion.h>
-                     #include <libxml/xmlmemory.h>
-                     #include <libxml/xpath.h>
-                    ],
-          [xmlCheckVersion (0);
-           xmlFree ((void *) 0);
-           xmlXPathSetContextNode ((void *)0, (void *)0);
-          ],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <libxml/xmlversion.h>
+               #include <libxml/xmlmemory.h>
+               #include <libxml/xpath.h>
+             ]],
+             [[xmlCheckVersion (0);
+               xmlFree ((void *) 0);
+               xmlXPathSetContextNode ((void *)0, (void *)0);
+             ]])],
           [gl_cv_libxml=yes
            gl_cv_LIBXML="$LIBXML2 $LIBICONV"
            gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
@@ -65,14 +67,16 @@ AC_DEFUN([gl_LIBXML],
         if test "$gl_cv_libxml" != yes; then
           gl_save_CPPFLAGS="$CPPFLAGS"
           CPPFLAGS="$CPPFLAGS $INCXML2"
-          AC_TRY_LINK([#include <libxml/xmlversion.h>
-                       #include <libxml/xmlmemory.h>
-                       #include <libxml/xpath.h>
-                      ],
-            [xmlCheckVersion (0);
-             xmlFree ((void *) 0);
-             xmlXPathSetContextNode ((void *)0, (void *)0);
-            ],
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <libxml/xmlversion.h>
+                 #include <libxml/xmlmemory.h>
+                 #include <libxml/xpath.h>
+               ]],
+               [[xmlCheckVersion (0);
+                 xmlFree ((void *) 0);
+                 xmlXPathSetContextNode ((void *)0, (void *)0);
+               ]])],
             [gl_cv_libxml=yes
              gl_cv_LIBXML="$LIBXML2 $LIBICONV"
              gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
@@ -84,26 +88,28 @@ AC_DEFUN([gl_LIBXML],
             dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is
             dnl self-contained.
             libxml2_include_dir=
-            AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>],
+            AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <libxml2/libxml/xmlexports.h>]])],
               [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h])
                libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
               ])
             if test -z "$libxml2_include_dir"; then
-              AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>],
+              AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <libxml2/libxml/xmlversion.h>]])],
                 [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h])
                  libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
                 ])
             fi
             if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then
               CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir"
-              AC_TRY_LINK([#include <libxml/xmlversion.h>
-                           #include <libxml/xmlmemory.h>
-                           #include <libxml/xpath.h>
-                          ],
-                [xmlCheckVersion (0);
-                 xmlFree ((void *) 0);
-                 xmlXPathSetContextNode ((void *)0, (void *)0);
-                ],
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[#include <libxml/xmlversion.h>
+                     #include <libxml/xmlmemory.h>
+                     #include <libxml/xpath.h>
+                   ]],
+                   [[xmlCheckVersion (0);
+                     xmlFree ((void *) 0);
+                     xmlXPathSetContextNode ((void *)0, (void *)0);
+                   ]])],
                 [gl_cv_libxml=yes
                  gl_cv_LIBXML="$LIBXML2 $LIBICONV"
                  gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
index 63b4c2a1e5aa6c68ffaa329d710cacaf2e33cb63..6a658660f22d12e676568ac1455bbc2affa64e67 100644 (file)
@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR([build-aux])
 . $srcdir/version.sh
 gl_INIT_PACKAGE([libtextstyle], [$VERSION_NUMBER])
 AM_INIT_AUTOMAKE([1.13 silent-rules])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 
 dnl Override automake's tar command used for creating distributions.
 am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"'
index bc53cc6dbd053eb588357e05314b05001b5ef986..39e72b151b4d6aa06f4610b9984187f09abf16c9 100644 (file)
@@ -1,5 +1,5 @@
-# libcroco.m4 serial 3
-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc.
+# libcroco.m4 serial 4
+dnl Copyright (C) 2006-2007, 2019-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -48,8 +48,9 @@ AC_DEFUN([gl_LIBCROCO],
         dnl one that built the library.
         AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0])
         LIBS="$gl_save_LIBS $LIBCROCO_0_6"
-        AC_TRY_LINK([#include <libcroco-config.h>],
-          [const char *version = LIBCROCO_VERSION; return !version;],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM([[#include <libcroco-config.h>]],
+            [[const char *version = LIBCROCO_VERSION; return !version;]])],
           [gl_cv_libcroco=yes
            gl_cv_LIBCROCO="$LIBCROCO_0_6"
            gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
@@ -57,8 +58,9 @@ AC_DEFUN([gl_LIBCROCO],
         if test "$gl_cv_libcroco" != yes; then
           gl_save_CPPFLAGS="$CPPFLAGS"
           CPPFLAGS="$CPPFLAGS $INCCROCO_0_6"
-          AC_TRY_LINK([#include <libcroco-config.h>],
-            [const char *version = LIBCROCO_VERSION; return !version;],
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM([[#include <libcroco-config.h>]],
+              [[const char *version = LIBCROCO_VERSION; return !version;]])],
             [gl_cv_libcroco=yes
              gl_cv_LIBCROCO="$LIBCROCO_0_6"
              gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6"
@@ -67,8 +69,9 @@ AC_DEFUN([gl_LIBCROCO],
           if test "$gl_cv_libcroco" != yes; then
             dnl Often the include files are installed in
             dnl /usr/include/libcroco-0.6/libcroco.
-            AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>],
-              [const char *version = LIBCROCO_VERSION; return !version;],
+            AC_LINK_IFELSE(
+              [AC_LANG_PROGRAM([[#include <libcroco-config.h>]],
+                [[const char *version = LIBCROCO_VERSION; return !version;]])],
               [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])
                libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
                if test -d "$libcroco_include_dir"; then
index 585377222b5a9ad4404f892f0b0b8b3027145bd5..7ee5029e04b64820a54d3395177de2fec78ffae7 100644 (file)
@@ -1,5 +1,5 @@
-# libglib.m4 serial 5
-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc.
+# libglib.m4 serial 6
+dnl Copyright (C) 2006-2007, 2019-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -43,12 +43,14 @@ AC_DEFUN([gl_LIBGLIB],
         dnl one that built the library.
         AC_LIB_LINKFLAGS_BODY([glib-2.0])
         LIBS="$gl_save_LIBS $LIBGLIB_2_0"
-        AC_TRY_LINK([#include <glib.h>
-#ifndef G_BEGIN_DECLS
-error this glib.h includes a glibconfig.h from a glib version 1.x
-#endif
-],
-          [g_string_new ("foo");],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <glib.h>
+               #ifndef G_BEGIN_DECLS
+               error this glib.h includes a glibconfig.h from a glib version 1.x
+               #endif
+             ]],
+             [[g_string_new ("foo");]])],
           [gl_cv_libglib=yes
            gl_cv_LIBGLIB="$LIBGLIB_2_0"
            gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
@@ -56,12 +58,14 @@ error this glib.h includes a glibconfig.h from a glib version 1.x
         if test "$gl_cv_libglib" != yes; then
           gl_save_CPPFLAGS="$CPPFLAGS"
           CPPFLAGS="$CPPFLAGS $INCGLIB_2_0"
-          AC_TRY_LINK([#include <glib.h>
-#ifndef G_BEGIN_DECLS
-error this glib.h includes a glibconfig.h from a glib version 1.x
-#endif
-],
-            [g_string_new ("foo");],
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <glib.h>
+                 #ifndef G_BEGIN_DECLS
+                 error this glib.h includes a glibconfig.h from a glib version 1.x
+                 #endif
+               ]],
+               [[g_string_new ("foo");]])],
             [gl_cv_libglib=yes
              gl_cv_LIBGLIB="$LIBGLIB_2_0"
              gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
@@ -72,12 +76,14 @@ error this glib.h includes a glibconfig.h from a glib version 1.x
             dnl and /usr/lib/glib-2.0/include.
             if test -n "$LIBGLIB_2_0_PREFIX"; then
               CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
-              AC_TRY_LINK([#include <glib.h>
-#ifndef G_BEGIN_DECLS
-error this glib.h includes a glibconfig.h from a glib version 1.x
-#endif
-],
-                [g_string_new ("foo");],
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[#include <glib.h>
+                     #ifndef G_BEGIN_DECLS
+                     error this glib.h includes a glibconfig.h from a glib version 1.x
+                     #endif
+                   ]],
+                   [[g_string_new ("foo");]])],
                 [gl_cv_libglib=yes
                  gl_cv_LIBGLIB="$LIBGLIB_2_0"
                  gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0"
@@ -118,7 +124,7 @@ error this glib.h includes a glibconfig.h from a glib version 1.x
     LIBGLIB_H="$LIBGLIB_H glib/gstrfuncs.h"
     LIBGLIB_H="$LIBGLIB_H glib/gstring.h"
     LIBGLIB_H="$LIBGLIB_H glib/gtypes.h"
-    AC_REQUIRE([AC_GNU_SOURCE])
+    AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
     AC_CHECK_HEADERS([unistd.h])
     dnl Don't bother checking for pthread.h and other multithread facilities.
   else
index 63adb189cac32fe0ff052289362d85aa46f253b6..a33f7a273d393a42bd30679d53ec8546d3709925 100644 (file)
@@ -1,5 +1,5 @@
-# termcap.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2000-2002, 2006-2008 Free Software Foundation, Inc.
+# termcap.m4 serial 8 (gettext-0.21.1)
+dnl Copyright (C) 2000-2002, 2006-2008, 2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -66,31 +66,43 @@ AC_DEFUN([gl_TERMCAP_BODY],
 
   AC_CACHE_CHECK([where termcap library functions come from], [gl_cv_termcap], [
     gl_cv_termcap="not found, consider installing GNU ncurses"
-    AC_TRY_LINK([extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      int tgetent (char *, const char *);
-      ], [return tgetent ((char *) 0, "xterm");], [gl_cv_termcap=libc])
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           int tgetent (char *, const char *);
+         ]],
+         [[return tgetent ((char *) 0, "xterm");]])],
+      [gl_cv_termcap=libc])
     if test "$gl_cv_termcap" != libc; then
       gl_save_LIBS="$LIBS"
       LIBS="$LIBS $LIBNCURSES"
-      AC_TRY_LINK([extern
-        #ifdef __cplusplus
-        "C"
-        #endif
-        int tgetent (char *, const char *);
-        ], [return tgetent ((char *) 0, "xterm");], [gl_cv_termcap=libncurses])
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             int tgetent (char *, const char *);
+           ]],
+           [[return tgetent ((char *) 0, "xterm");]])],
+        [gl_cv_termcap=libncurses])
       LIBS="$gl_save_LIBS"
       if test "$gl_cv_termcap" != libncurses; then
         gl_save_LIBS="$LIBS"
         LIBS="$LIBS $LIBTERMCAP"
-        AC_TRY_LINK([extern
-          #ifdef __cplusplus
-          "C"
-          #endif
-          int tgetent (char *, const char *);
-          ], [return tgetent ((char *) 0, "xterm");], [gl_cv_termcap=libtermcap])
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[extern
+               #ifdef __cplusplus
+               "C"
+               #endif
+               int tgetent (char *, const char *);
+             ]],
+             [[return tgetent ((char *) 0, "xterm");]])],
+          [gl_cv_termcap=libtermcap])
         LIBS="$gl_save_LIBS"
       fi
     fi
@@ -126,28 +138,31 @@ AC_DEFUN([gl_TERMCAP_BODY],
     LIBS="$LIBS $LIBTERMCAP"
     gl_save_CPPFLAGS="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS $INCTERMCAP"
-    AC_TRY_LINK([extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      int setupterm (const char *, int, int *);
-      extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      int tigetnum (const char *);
-      extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      int tigetflag (const char *);
-      extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      const char * tigetstr (const char *);
-      ], [return setupterm ("xterm", 0, (int *)0)
-                 + tigetnum ("colors") + tigetflag ("hc") + * tigetstr("oc");],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           int setupterm (const char *, int, int *);
+           extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           int tigetnum (const char *);
+           extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           int tigetflag (const char *);
+           extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           const char * tigetstr (const char *);
+         ]],
+         [[return setupterm ("xterm", 0, (int *)0)
+                  + tigetnum ("colors") + tigetflag ("hc") + * tigetstr("oc");]])],
       [gl_cv_func_terminfo=yes], [gl_cv_func_terminfo=no])
     CPPFLAGS="$gl_save_CPPFLAGS"
     LIBS="$gl_save_LIBS"
@@ -165,13 +180,16 @@ AC_DEFUN([gl_TERMCAP_BODY],
     LIBS="$LIBS $LIBTERMCAP"
     gl_save_CPPFLAGS="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS $INCTERMCAP"
-    AC_TRY_LINK([extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      char * tparam (const char *, void *, int, ...);
-      char buf;
-      ], [return tparam ("\033\133%dm", &buf, 1, 8);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           char * tparam (const char *, void *, int, ...);
+           char buf;
+         ]],
+         [[return tparam ("\033\133%dm", &buf, 1, 8);]])],
       [gl_cv_termcap_tparam=yes], [gl_cv_termcap_tparam=no])
     CPPFLAGS="$gl_save_CPPFLAGS"
     LIBS="$gl_save_LIBS"
@@ -187,12 +205,15 @@ AC_DEFUN([gl_TERMCAP_BODY],
       LIBS="$LIBS $LIBTERMCAP"
       gl_save_CPPFLAGS="$CPPFLAGS"
       CPPFLAGS="$CPPFLAGS $INCTERMCAP"
-      AC_TRY_LINK([extern
-        #ifdef __cplusplus
-        "C"
-        #endif
-        char * tparm (const char *, ...);
-        ], [return tparm ("\033\133%dm", 8);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             char * tparm (const char *, ...);
+           ]],
+           [[return tparm ("\033\133%dm", 8);]])],
         [gl_cv_termcap_tparm=yes], [gl_cv_termcap_tparm=no])
       CPPFLAGS="$gl_save_CPPFLAGS"
       LIBS="$gl_save_LIBS"
index 0b9e7132b8362b9c2ff23d503ba8fe1688ce2db7..e020f965d89a172477a0609b74e0091af3d37fcb 100644 (file)
@@ -1,5 +1,5 @@
-# terminfo.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2000-2002, 2006-2008 Free Software Foundation, Inc.
+# terminfo.m4 serial 4 (gettext-0.21.1)
+dnl Copyright (C) 2000-2002, 2006-2008, 2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -87,140 +87,155 @@ AC_DEFUN([gl_TERMINFO_BODY],
   dnl libxcurses and libcurses, because it is smaller.
   AC_CACHE_CHECK([where terminfo library functions come from], [gl_cv_terminfo], [
     gl_cv_terminfo="not found, consider installing GNU ncurses"
-    AC_TRY_LINK([extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      int setupterm (const char *, int, int *);
-      extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      int tigetnum (const char *);
-      extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      int tigetflag (const char *);
-      extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      const char * tigetstr (const char *);
-      ], [return setupterm ("xterm", 0, (int *)0)
-                 + tigetnum ("colors")
-                 + tigetflag ("hc") + * tigetstr("oc");],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           int setupterm (const char *, int, int *);
+           extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           int tigetnum (const char *);
+           extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           int tigetflag (const char *);
+           extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           const char * tigetstr (const char *);
+         ]],
+         [[return setupterm ("xterm", 0, (int *)0)
+                  + tigetnum ("colors")
+                  + tigetflag ("hc") + * tigetstr("oc");]])],
       [gl_cv_terminfo=libc])
     if test "$gl_cv_terminfo" != libc; then
       gl_save_LIBS="$LIBS"
       LIBS="$LIBS $LIBNCURSES"
-      AC_TRY_LINK([extern
-        #ifdef __cplusplus
-        "C"
-        #endif
-        int setupterm (const char *, int, int *);
-        extern
-        #ifdef __cplusplus
-        "C"
-        #endif
-        int tigetnum (const char *);
-        extern
-        #ifdef __cplusplus
-        "C"
-        #endif
-        int tigetflag (const char *);
-        extern
-        #ifdef __cplusplus
-        "C"
-        #endif
-        const char * tigetstr (const char *);
-        ], [return setupterm ("xterm", 0, (int *)0)
-                   + tigetnum ("colors")
-                   + tigetflag ("hc") + * tigetstr("oc");],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             int setupterm (const char *, int, int *);
+             extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             int tigetnum (const char *);
+             extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             int tigetflag (const char *);
+             extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             const char * tigetstr (const char *);
+           ]],
+           [[return setupterm ("xterm", 0, (int *)0)
+                    + tigetnum ("colors")
+                    + tigetflag ("hc") + * tigetstr("oc");]])],
         [gl_cv_terminfo=libncurses])
       LIBS="$gl_save_LIBS"
       if test "$gl_cv_terminfo" != libncurses; then
         gl_save_LIBS="$LIBS"
         LIBS="$LIBS $LIBTERMCAP"
-        AC_TRY_LINK([extern
-          #ifdef __cplusplus
-          "C"
-          #endif
-          int setupterm (const char *, int, int *);
-          extern
-          #ifdef __cplusplus
-          "C"
-          #endif
-          int tigetnum (const char *);
-          extern
-          #ifdef __cplusplus
-          "C"
-          #endif
-          int tigetflag (const char *);
-          extern
-          #ifdef __cplusplus
-          "C"
-          #endif
-          const char * tigetstr (const char *);
-          ], [return setupterm ("xterm", 0, (int *)0)
-                     + tigetnum ("colors")
-                     + tigetflag ("hc") + * tigetstr("oc");],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[extern
+               #ifdef __cplusplus
+               "C"
+               #endif
+               int setupterm (const char *, int, int *);
+               extern
+               #ifdef __cplusplus
+               "C"
+               #endif
+               int tigetnum (const char *);
+               extern
+               #ifdef __cplusplus
+               "C"
+               #endif
+               int tigetflag (const char *);
+               extern
+               #ifdef __cplusplus
+               "C"
+               #endif
+               const char * tigetstr (const char *);
+             ]],
+             [[return setupterm ("xterm", 0, (int *)0)
+                      + tigetnum ("colors")
+                      + tigetflag ("hc") + * tigetstr("oc");]])],
           [gl_cv_terminfo=libtermcap])
         LIBS="$gl_save_LIBS"
         if test "$gl_cv_terminfo" != libtermcap; then
           gl_save_LIBS="$LIBS"
           LIBS="$LIBS $LIBXCURSES"
-          AC_TRY_LINK([extern
-            #ifdef __cplusplus
-            "C"
-            #endif
-            int setupterm (const char *, int, int *);
-            extern
-            #ifdef __cplusplus
-            "C"
-            #endif
-            int tigetnum (const char *);
-            extern
-            #ifdef __cplusplus
-            "C"
-            #endif
-            int tigetflag (const char *);
-            extern
-            #ifdef __cplusplus
-            "C"
-            #endif
-            const char * tigetstr (const char *);
-            ], [return setupterm ("xterm", 0, (int *)0)
-                       + tigetnum ("colors")
-                       + tigetflag ("hc") + * tigetstr("oc");],
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[extern
+                 #ifdef __cplusplus
+                 "C"
+                 #endif
+                 int setupterm (const char *, int, int *);
+                 extern
+                 #ifdef __cplusplus
+                 "C"
+                 #endif
+                 int tigetnum (const char *);
+                 extern
+                 #ifdef __cplusplus
+                 "C"
+                 #endif
+                 int tigetflag (const char *);
+                 extern
+                 #ifdef __cplusplus
+                 "C"
+                 #endif
+                 const char * tigetstr (const char *);
+               ]],
+               [[return setupterm ("xterm", 0, (int *)0)
+                        + tigetnum ("colors")
+                        + tigetflag ("hc") + * tigetstr("oc");]])],
             [gl_cv_terminfo=libxcurses])
           LIBS="$gl_save_LIBS"
           if test "$gl_cv_terminfo" != libxcurses; then
             gl_save_LIBS="$LIBS"
             LIBS="$LIBS $LIBCURSES"
-            AC_TRY_LINK([extern
-              #ifdef __cplusplus
-              "C"
-              #endif
-              int setupterm (const char *, int, int *);
-              extern
-              #ifdef __cplusplus
-              "C"
-              #endif
-              int tigetnum (const char *);
-              extern
-              #ifdef __cplusplus
-              "C"
-              #endif
-              int tigetflag (const char *);
-              extern
-              #ifdef __cplusplus
-              "C"
-              #endif
-              const char * tigetstr (const char *);
-              ], [return setupterm ("xterm", 0, (int *)0)
-                         + tigetnum ("colors")
-                         + tigetflag ("hc") + * tigetstr("oc");],
+            AC_LINK_IFELSE(
+              [AC_LANG_PROGRAM(
+                 [[extern
+                   #ifdef __cplusplus
+                   "C"
+                   #endif
+                   int setupterm (const char *, int, int *);
+                   extern
+                   #ifdef __cplusplus
+                   "C"
+                   #endif
+                   int tigetnum (const char *);
+                   extern
+                   #ifdef __cplusplus
+                   "C"
+                   #endif
+                   int tigetflag (const char *);
+                   extern
+                   #ifdef __cplusplus
+                   "C"
+                   #endif
+                   const char * tigetstr (const char *);
+                 ]],
+                 [[return setupterm ("xterm", 0, (int *)0)
+                          + tigetnum ("colors")
+                          + tigetflag ("hc") + * tigetstr("oc");]])],
               [gl_cv_terminfo=libcurses])
             LIBS="$gl_save_LIBS"
           fi
@@ -265,33 +280,42 @@ AC_DEFUN([gl_TERMINFO_BODY],
       dnl Use the termcap functions as a fallback.
       AC_CACHE_CHECK([where termcap library functions come from], [gl_cv_termcap], [
         gl_cv_termcap="not found, consider installing GNU ncurses"
-        AC_TRY_LINK([extern
-          #ifdef __cplusplus
-          "C"
-          #endif
-          int tgetent (char *, const char *);
-          ], [return tgetent ((char *) 0, "xterm");],
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[extern
+               #ifdef __cplusplus
+               "C"
+               #endif
+               int tgetent (char *, const char *);
+             ]],
+             [[return tgetent ((char *) 0, "xterm");]])],
           [gl_cv_termcap=libc])
         if test "$gl_cv_termcap" != libc; then
           gl_save_LIBS="$LIBS"
           LIBS="$LIBS $LIBNCURSES"
-          AC_TRY_LINK([extern
-            #ifdef __cplusplus
-            "C"
-            #endif
-            int tgetent (char *, const char *);
-            ], [return tgetent ((char *) 0, "xterm");],
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[extern
+                 #ifdef __cplusplus
+                 "C"
+                 #endif
+                 int tgetent (char *, const char *);
+               ]],
+               [[return tgetent ((char *) 0, "xterm");]])],
             [gl_cv_termcap=libncurses])
           LIBS="$gl_save_LIBS"
           if test "$gl_cv_termcap" != libncurses; then
             gl_save_LIBS="$LIBS"
             LIBS="$LIBS $LIBTERMCAP"
-            AC_TRY_LINK([extern
-              #ifdef __cplusplus
-              "C"
-              #endif
-              int tgetent (char *, const char *);
-              ], [return tgetent ((char *) 0, "xterm");],
+            AC_LINK_IFELSE(
+              [AC_LANG_PROGRAM(
+                 [[extern
+                   #ifdef __cplusplus
+                   "C"
+                   #endif
+                   int tgetent (char *, const char *);
+                 ]],
+                 [[return tgetent ((char *) 0, "xterm");]])],
               [gl_cv_termcap=libtermcap])
             LIBS="$gl_save_LIBS"
           fi
@@ -334,14 +358,18 @@ AC_DEFUN([gl_TERMINFO_BODY],
     LIBS="$LIBS $LIBTERMINFO"
     gl_save_CPPFLAGS="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS $INCTERMINFO"
-    AC_TRY_LINK([extern
-      #ifdef __cplusplus
-      "C"
-      #endif
-      char * tparam (const char *, void *, int, ...);
-      char buf;
-      ], [return tparam ("\033\133%dm", &buf, 1, 8);],
-      [gl_cv_terminfo_tparam=yes], [gl_cv_terminfo_tparam=no])
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           char * tparam (const char *, void *, int, ...);
+           char buf;
+         ]],
+         [[return tparam ("\033\133%dm", &buf, 1, 8);]])],
+      [gl_cv_terminfo_tparam=yes],
+      [gl_cv_terminfo_tparam=no])
     CPPFLAGS="$gl_save_CPPFLAGS"
     LIBS="$gl_save_LIBS"
   ])
@@ -356,12 +384,15 @@ AC_DEFUN([gl_TERMINFO_BODY],
       LIBS="$LIBS $LIBTERMINFO"
       gl_save_CPPFLAGS="$CPPFLAGS"
       CPPFLAGS="$CPPFLAGS $INCTERMINFO"
-      AC_TRY_LINK([extern
-        #ifdef __cplusplus
-        "C"
-        #endif
-        char * tparm (const char *, ...);
-        ], [return tparm ("\033\133%dm", 8);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             char * tparm (const char *, ...);
+           ]],
+           [[return tparm ("\033\133%dm", 8);]])],
         [gl_cv_terminfo_tparm=yes], [gl_cv_terminfo_tparm=no])
       CPPFLAGS="$gl_save_CPPFLAGS"
       LIBS="$gl_save_LIBS"
index 04772462c16b3f66d5722e2af41309566cad0948..8a14c2cd7a973698aada0d3ce7b9939e66087780 100644 (file)
@@ -1,4 +1,4 @@
-# woe32-dll.m4 serial 5
+# woe32-dll.m4 serial 6
 dnl Copyright (C) 2005-2006, 2011, 2018, 2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -46,7 +46,7 @@ AC_DEFUN([gl_WOE32_DLL],
            [gl_cv_ld_autoimport=no],
            [gl_save_LDFLAGS="$LDFLAGS"
             LDFLAGS="$LDFLAGS -Wl,--disable-auto-import"
-            AC_TRY_LINK([], [], [gl_cv_ld_autoimport=yes], [gl_cv_ld_autoimport=no])
+            AC_LINK_IFELSE([], [gl_cv_ld_autoimport=yes], [gl_cv_ld_autoimport=no])
             LDFLAGS="$gl_save_LDFLAGS"
            ])
         ])