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
dnl Checks for library functions.
AC_CHECK_FUNCS([select])
-AC_FUNC_VFORK
gt_SIGINFO
gt_SETLOCALE
-# 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,
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
-# 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.
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"
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"
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"
. $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"'
-# 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.
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"
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"
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
-# 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.
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"
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"
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"
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
-# 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.
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
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"
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"
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"
-# 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.
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
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
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"
])
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"
-# 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,
[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"
])
])