From: Bruno Haible Date: Sat, 14 Nov 2020 13:53:19 +0000 (+0100) Subject: build: Fix warnings emitted by autoconf-2.69d. X-Git-Tag: v0.21.1~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d2833c41e965db2957721dbcec1612c2614bbc7;p=thirdparty%2Fgettext.git build: Fix warnings emitted by autoconf-2.69d. * 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. --- diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 04db78149..ca6a43496 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -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 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 - 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 - 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 + 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 diff --git a/gettext-tools/m4/exported.m4 b/gettext-tools/m4/exported.m4 index 2a4baeb84..2ee884f8b 100644 --- a/gettext-tools/m4/exported.m4 +++ b/gettext-tools/m4/exported.m4 @@ -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 diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4 index 2f80c3766..034049045 100644 --- a/gnulib-local/m4/libxml.m4 +++ b/gnulib-local/m4/libxml.m4 @@ -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 - #include - #include - ], - [xmlCheckVersion (0); - xmlFree ((void *) 0); - xmlXPathSetContextNode ((void *)0, (void *)0); - ], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + ]], + [[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 - #include - #include - ], - [xmlCheckVersion (0); - xmlFree ((void *) 0); - xmlXPathSetContextNode ((void *)0, (void *)0); - ], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + ]], + [[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 which is dnl self-contained. libxml2_include_dir= - AC_TRY_CPP([#include ], + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], [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 ], + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], [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 - #include - #include - ], - [xmlCheckVersion (0); - xmlFree ((void *) 0); - xmlXPathSetContextNode ((void *)0, (void *)0); - ], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + ]], + [[xmlCheckVersion (0); + xmlFree ((void *) 0); + xmlXPathSetContextNode ((void *)0, (void *)0); + ]])], [gl_cv_libxml=yes gl_cv_LIBXML="$LIBXML2 $LIBICONV" gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" diff --git a/libtextstyle/configure.ac b/libtextstyle/configure.ac index 63b4c2a1e..6a658660f 100644 --- a/libtextstyle/configure.ac +++ b/libtextstyle/configure.ac @@ -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"' diff --git a/libtextstyle/gnulib-local/m4/libcroco.m4 b/libtextstyle/gnulib-local/m4/libcroco.m4 index bc53cc6db..39e72b151 100644 --- a/libtextstyle/gnulib-local/m4/libcroco.m4 +++ b/libtextstyle/gnulib-local/m4/libcroco.m4 @@ -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 ], - [const char *version = LIBCROCO_VERSION; return !version;], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[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 ], - [const char *version = LIBCROCO_VERSION; return !version;], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[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 ], - [const char *version = LIBCROCO_VERSION; return !version;], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[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 diff --git a/libtextstyle/gnulib-local/m4/libglib.m4 b/libtextstyle/gnulib-local/m4/libglib.m4 index 585377222..7ee5029e0 100644 --- a/libtextstyle/gnulib-local/m4/libglib.m4 +++ b/libtextstyle/gnulib-local/m4/libglib.m4 @@ -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 -#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 + #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 -#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 + #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 -#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 + #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 diff --git a/libtextstyle/gnulib-local/m4/termcap.m4 b/libtextstyle/gnulib-local/m4/termcap.m4 index 63adb189c..a33f7a273 100644 --- a/libtextstyle/gnulib-local/m4/termcap.m4 +++ b/libtextstyle/gnulib-local/m4/termcap.m4 @@ -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" diff --git a/libtextstyle/gnulib-local/m4/terminfo.m4 b/libtextstyle/gnulib-local/m4/terminfo.m4 index 0b9e7132b..e020f965d 100644 --- a/libtextstyle/gnulib-local/m4/terminfo.m4 +++ b/libtextstyle/gnulib-local/m4/terminfo.m4 @@ -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" diff --git a/m4/woe32-dll.m4 b/m4/woe32-dll.m4 index 04772462c..8a14c2cd7 100644 --- a/m4/woe32-dll.m4 +++ b/m4/woe32-dll.m4 @@ -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" ]) ])