diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-06-05 19:51:55 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-05 19:51:55 +0100 |
commit | 1004b3d970f19964816eedf89d3ba7aa9416ed24 (patch) | |
tree | 743c94d1bf5c379c8d9aca21e22336f04797dd60 /src/configure.ac | |
parent | e3a529bc877909a9eccf792461050b4f6737ed33 (diff) | |
download | vim-git-1004b3d970f19964816eedf89d3ba7aa9416ed24.tar.gz |
patch 8.2.5059: autoconf 2.71 produces many obsolete warningsv8.2.5059
Problem: Autoconf 2.71 produces many obsolete warnings.
Solution: Replace obsolete macros with non-obsolete ones, where the
functionality does not change. (issue #10528)
Diffstat (limited to 'src/configure.ac')
-rw-r--r-- | src/configure.ac | 330 |
1 files changed, 166 insertions, 164 deletions
diff --git a/src/configure.ac b/src/configure.ac index a6a926e68..93630a416 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -5,7 +5,7 @@ dnl This should also work with other versions of autoconf, but 2.70 and later dnl generate lots of hard to fix "obsolete" warnings. AC_INIT(vim.h) -AC_CONFIG_HEADER(auto/config.h:config.h.in) +AC_CONFIG_HEADERS(auto/config.h:config.h.in) dnl Being able to run configure means the system is Unix (compatible). AC_DEFINE(UNIX) @@ -42,10 +42,10 @@ if test x"$ac_cv_prog_cc_c99" != xno; then AC_MSG_CHECKING([if the compiler supports trailing commas]) trailing_commas=no - AC_TRY_COMPILE([], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ enum { one, - };], + };])], [AC_MSG_RESULT(yes); trailing_commas=yes], [AC_MSG_RESULT(no)]) if test "$trailing_commas" = no; then @@ -54,8 +54,8 @@ if test x"$ac_cv_prog_cc_c99" != xno; then AC_MSG_CHECKING([if the compiler supports C++ comments]) slash_comments=no - AC_TRY_COMPILE([], - [// C++ comments?], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], + [// C++ comments?])], [AC_MSG_RESULT(yes); slash_comments=yes], [AC_MSG_RESULT(no)]) if test "$slash_comments" = no; then @@ -154,8 +154,8 @@ dnl But gcc 3.1 changed the meaning! See near the end. test "$GCC" = yes && CPP_MM=M; AC_SUBST(CPP_MM) if test -f ./toolcheck; then - AC_CHECKING(for buggy tools) - sh ./toolcheck 1>&AC_FD_MSG + AC_MSG_CHECKING(for buggy tools) + sh ./toolcheck 1>&AS_MESSAGE_FD fi OS_EXTRA_SRC=""; OS_EXTRA_OBJ="" @@ -261,7 +261,7 @@ if test "$vim_cv_uname_output" = Darwin; then save_cflags="$CFLAGS" save_ldflags="$LDFLAGS" CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - AC_TRY_LINK([ ], [ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM([ ], [ ])], AC_MSG_RESULT(found, will make universal binary), AC_MSG_RESULT(not found) @@ -269,7 +269,7 @@ if test "$vim_cv_uname_output" = Darwin; then AC_MSG_CHECKING(if Intel architecture is supported) CPPFLAGS="$CPPFLAGS -arch i386" LDFLAGS="$save_ldflags -arch i386" - AC_TRY_LINK([ ], [ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM([ ], [ ])], AC_MSG_RESULT(yes); MACARCH="intel", AC_MSG_RESULT(no, using PowerPC) MACARCH="ppc" @@ -396,14 +396,14 @@ AC_ARG_WITH(modified-by, [ --with-modified-by=NAME name of who modified a dnl Check for EBCDIC stolen from the LYNX port to z/OS Unix AC_MSG_CHECKING(if character set is EBCDIC) -AC_TRY_COMPILE([ ], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ /* TryCompile function for CharSet. Treat any failure as ASCII for compatibility with existing art. Use compile-time rather than run-time tests for cross-compiler tolerance. */ #if '0'!=240 make an error "Character set is not EBCDIC" -#endif ], +#endif ])], [ # TryCompile action if true cf_cv_ebcdic=yes ], [ # TryCompile action if false @@ -721,7 +721,7 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then AC_MSG_CHECKING([if link with ${LUA_LIBS} is sane]) libs_save=$LIBS LIBS="$LIBS $LUA_LIBS" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); lua_ok="yes", AC_MSG_RESULT(no); lua_ok="no"; LUA_LIBS="") LIBS=$libs_save @@ -1046,7 +1046,7 @@ if test "$enable_mzschemeinterp" = "yes"; then libs_save=$LIBS CFLAGS="$CFLAGS $MZSCHEME_CFLAGS" LIBS="$LIBS $MZSCHEME_LIBS" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); mzs_ok=yes, AC_MSG_RESULT(no: MZSCHEME DISABLED); mzs_ok=no) CFLAGS=$cflags_save @@ -1150,7 +1150,7 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then LIBS="$LIBS $perllibs" perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'` LDFLAGS="$perlldflags $LDFLAGS" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); perl_ok=yes, AC_MSG_RESULT(no: PERL DISABLED); perl_ok=no) CFLAGS=$cflags_save @@ -1409,7 +1409,7 @@ eof cflags_save=$CFLAGS CFLAGS="$CFLAGS $threadsafe_flag" LIBS="$LIBS $thread_lib" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag", AC_MSG_RESULT(no); LIBS=$libs_save_old ) @@ -1425,7 +1425,7 @@ eof libs_save=$LIBS CFLAGS="$CFLAGS $PYTHON_CFLAGS" LIBS="$LIBS $PYTHON_LIBS" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); python_ok=yes, AC_MSG_RESULT(no: PYTHON DISABLED); python_ok=no) CFLAGS=$cflags_save @@ -1628,7 +1628,7 @@ eof cflags_save=$CFLAGS CFLAGS="$CFLAGS $threadsafe_flag" LIBS="$LIBS $thread_lib" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag", AC_MSG_RESULT(no); LIBS=$libs_save_old ) @@ -1644,7 +1644,7 @@ eof libs_save=$LIBS CFLAGS="$CFLAGS $PYTHON3_CFLAGS" LIBS="$LIBS $PYTHON3_LIBS" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); python3_ok=yes, AC_MSG_RESULT(no: PYTHON3 DISABLED); python3_ok=no) CFLAGS=$cflags_save @@ -1792,7 +1792,7 @@ elif test "$python_ok" = yes; then libs_save=$LIBS CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE" LIBS="$LIBS $PYTHON_LIBS" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); fpie_ok=yes, AC_MSG_RESULT(no); fpie_ok=no) CFLAGS=$cflags_save @@ -1814,7 +1814,7 @@ elif test "$python3_ok" = yes; then libs_save=$LIBS CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE" LIBS="$LIBS $PYTHON3_LIBS" - AC_TRY_LINK(,[ ], + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], AC_MSG_RESULT(yes); fpie_ok=yes, AC_MSG_RESULT(no); fpie_ok=no) CFLAGS=$cflags_save @@ -2128,7 +2128,7 @@ if test "$enable_channel" = "yes"; then fi AC_CACHE_CHECK([whether compiling with IPv6 networking is possible], [vim_cv_ipv6_networking], - [AC_TRY_LINK([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -2153,7 +2153,7 @@ if test "$enable_channel" = "yes"; then if (errno == ECONNREFUSED) (void)connect(1, (struct sockaddr *)&server, sizeof(server)); (void)freeaddrinfo(res); - ], + ])], [vim_cv_ipv6_networking="yes"], [vim_cv_ipv6_networking="no"])]) @@ -2164,7 +2164,7 @@ if test "$enable_channel" = "yes"; then dnl On Solaris we need the nsl library. AC_CHECK_LIB(nsl, gethostbyname) AC_CACHE_CHECK([whether compiling with IPv4 networking is possible], [vim_cv_ipv4_networking], - [AC_TRY_LINK([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -2187,7 +2187,7 @@ if test "$enable_channel" = "yes"; then (void)gethostbyname("microsoft.com"); if (errno == ECONNREFUSED) (void)connect(1, (struct sockaddr *)&server, sizeof(server)); - ], + ])], [vim_cv_ipv4_networking="yes"], [vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"])]) fi @@ -2356,8 +2356,8 @@ else AC_MSG_CHECKING(if X11 header files can be found) cflags_save=$CFLAGS CFLAGS="$CFLAGS $X_CFLAGS" - AC_TRY_COMPILE([#include <X11/Xlib.h> -#include <X11/Intrinsic.h>], , + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlib.h> +#include <X11/Intrinsic.h>], )], AC_MSG_RESULT(yes), AC_MSG_RESULT(no); no_x=yes) CFLAGS=$cflags_save @@ -2398,10 +2398,10 @@ else else CFLAGS="$CFLAGS $X_CFLAGS" fi - AC_TRY_COMPILE([#include <X11/Xlib.h>], , + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlib.h>], )], AC_MSG_RESULT(no), CFLAGS="$CFLAGS -Wno-implicit-int" - AC_TRY_COMPILE([#include <X11/Xlib.h>], , + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlib.h>], )], AC_MSG_RESULT(yes); cflags_save="$cflags_save -Wno-implicit-int", AC_MSG_RESULT(test failed) ) @@ -2412,7 +2412,7 @@ else AC_MSG_CHECKING(size of wchar_t is 2 bytes) AC_CACHE_VAL(ac_cv_small_wchar_t, - [AC_TRY_RUN([ + [AC_RUN_IFELSE([AC_LANG_SOURCE([ #include <X11/Xlib.h> #if STDC_HEADERS # include <stdlib.h> @@ -2423,7 +2423,7 @@ else if (sizeof(wchar_t) <= 2) exit(1); exit(0); - }], + }])], ac_cv_small_wchar_t="no", ac_cv_small_wchar_t="yes", AC_MSG_ERROR(failed to compile test program))]) @@ -2624,7 +2624,7 @@ AC_DEFUN(AM_PATH_GTK, dnl Now check if the installed GTK is sufficiently new. dnl rm -f conf.gtktest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([ #include <gtk/gtk.h> #include <stdio.h> #if STDC_HEADERS @@ -2656,7 +2656,7 @@ if ((gtk_major_version > major) || } return 1; } -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +])],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" } @@ -3095,10 +3095,10 @@ if test -z "$SKIP_MOTIF"; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" dnl Xmu/Editres.h may exist but can only be used after including Intrinsic.h AC_MSG_CHECKING([for X11/Xmu/Editres.h]) - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include <X11/Intrinsic.h> #include <X11/Xmu/Editres.h>], - [int i; i = 0;], + [int i; i = 0;])], AC_MSG_RESULT(yes) AC_DEFINE(HAVE_X11_XMU_EDITRES_H), AC_MSG_RESULT(no)) @@ -3110,17 +3110,16 @@ if test -z "$SKIP_MOTIF"; then cppflags_save=$CPPFLAGS CPPFLAGS="$CPPFLAGS $X_CFLAGS" if test "$zOSUnix" = "yes"; then - xmheader="Xm/Xm.h" + AC_CHECK_HEADERS(Xm/Xm.h) else - xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h - Xm/UnhighlightT.h Xm/Notebook.h" + AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h + Xm/UnhighlightT.h Xm/Notebook.h) fi - AC_CHECK_HEADERS($xmheader) if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then dnl Solaris uses XpmAttributes_21, very annoying. AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) - AC_TRY_COMPILE([#include <Xm/XpmP.h>], [XpmAttributes_21 attr;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Xm/XpmP.h>], [XpmAttributes_21 attr;])], AC_MSG_RESULT(yes); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes_21), AC_MSG_RESULT(no); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes) ) @@ -3232,12 +3231,12 @@ if test "x$vim_cv_toupper_broken" = "xyes" ; then fi AC_MSG_CHECKING(whether __DATE__ and __TIME__ work) -AC_TRY_COMPILE([#include <stdio.h>], [printf("(" __DATE__ " " __TIME__ ")");], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [printf("(" __DATE__ " " __TIME__ ")");])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DATE_TIME), AC_MSG_RESULT(no)) AC_MSG_CHECKING(whether __attribute__((unused)) is allowed) -AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [int x __attribute__((unused));])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ATTRIBUTE_UNUSED), AC_MSG_RESULT(no)) @@ -3254,8 +3253,8 @@ dnl If sys/wait.h is not found it might still exist but not be POSIX dnl compliant. In that case we define HAVE_UNION_WAIT (for NeXT) if test $ac_cv_header_sys_wait_h = no; then AC_MSG_CHECKING([for sys/wait.h that defines union wait]) - AC_TRY_COMPILE([#include <sys/wait.h>], - [union wait xx, yy; xx = yy], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/wait.h>], + [union wait xx, yy; xx = yy])], AC_MSG_RESULT(yes) AC_DEFINE(HAVE_SYS_WAIT_H) AC_DEFINE(HAVE_UNION_WAIT), @@ -3288,10 +3287,10 @@ AC_CHECK_HEADERS(sys/sysctl.h, [], [], dnl pthread_np.h may exist but can only be used after including pthread.h AC_MSG_CHECKING([for pthread_np.h]) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include <pthread.h> #include <pthread_np.h>], - [int i; i = 0;], + [int i; i = 0;])], AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PTHREAD_NP_H), AC_MSG_RESULT(no)) @@ -3306,7 +3305,7 @@ dnl Check if strings.h and string.h can both be included when defined. AC_MSG_CHECKING([if strings.h can be included after string.h]) cppflags_save=$CPPFLAGS CPPFLAGS="$CPPFLAGS $X_CFLAGS" -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO) # define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */ /* but don't do it on AIX 5.1 (Uribarri) */ @@ -3320,7 +3319,7 @@ AC_TRY_COMPILE([ #if defined(HAVE_STRINGS_H) # include <strings.h> #endif - ], [int i; i = 0;], + ], [int i; i = 0;])], AC_MSG_RESULT(yes), AC_DEFINE(NO_STRINGS_WITH_STRING_H) AC_MSG_RESULT(no)) @@ -3393,7 +3392,7 @@ fi dnl BSDI uses ss_base while others use ss_sp for the stack pointer. AC_MSG_CHECKING(whether stack_t has an ss_base field) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include <sys/types.h> #if STDC_HEADERS # include <stdlib.h> @@ -3401,7 +3400,7 @@ AC_TRY_COMPILE([ #endif #include <signal.h> #include "confdefs.h" - ], [stack_t sigstk; sigstk.ss_base = 0; ], + ], [stack_t sigstk; sigstk.ss_base = 0; ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SS_BASE), AC_MSG_RESULT(no)) @@ -3412,7 +3411,7 @@ if test -n "$with_tlib"; then AC_MSG_RESULT($with_tlib) LIBS="$LIBS -l$with_tlib" AC_MSG_CHECKING(for linking with $with_tlib library) - AC_TRY_LINK([], [], AC_MSG_RESULT(OK), AC_MSG_ERROR(FAILED)) + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], AC_MSG_RESULT(OK), AC_MSG_ERROR(FAILED)) dnl Need to check for tgetent() below. olibs="$LIBS" else @@ -3434,7 +3433,7 @@ else dnl It's possible that a library is found but it doesn't work dnl e.g., shared library that cannot be found dnl compile and run a test program to be sure - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([ #ifdef HAVE_TERMCAP_H # include <termcap.h> #endif @@ -3442,7 +3441,7 @@ else # include <stdlib.h> # include <stddef.h> #endif -main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }], +main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }])], res="OK", res="FAIL", res="FAIL") if test "$res" = "OK"; then break @@ -3458,8 +3457,8 @@ fi if test "x$olibs" = "x$LIBS"; then AC_MSG_CHECKING([for tgetent()]) - AC_TRY_LINK([int tgetent(char *, const char *);], - [char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");], + AC_LINK_IFELSE([AC_LANG_PROGRAM([int tgetent(char *, const char *);], + [[char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");]])], AC_MSG_RESULT(yes), AC_MSG_ERROR([NOT FOUND! You need to install a terminal library; for example ncurses. @@ -3523,68 +3522,68 @@ if test "x$vim_cv_tgetent" = "xzero" ; then fi AC_MSG_CHECKING(whether termcap.h contains ospeed) -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_TERMCAP_H # include <termcap.h> #endif - ], [ospeed = 20000], + ], [ospeed = 20000])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OSPEED), [AC_MSG_RESULT(no) AC_MSG_CHECKING(whether ospeed can be extern) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_TERMCAP_H # include <termcap.h> #endif extern short ospeed; - ], [ospeed = 20000], + ], [ospeed = 20000])], AC_MSG_RESULT(yes); AC_DEFINE(OSPEED_EXTERN), AC_MSG_RESULT(no))] ) AC_MSG_CHECKING([whether termcap.h contains UP, BC and PC]) -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_TERMCAP_H # include <termcap.h> #endif - ], [if (UP == 0 && BC == 0) PC = 1], + ], [if (UP == 0 && BC == 0) PC = 1])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UP_BC_PC), [AC_MSG_RESULT(no) AC_MSG_CHECKING([whether UP, BC and PC can be extern]) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_TERMCAP_H # include <termcap.h> #endif extern char *UP, *BC, PC; - ], [if (UP == 0 && BC == 0) PC = 1], + ], [if (UP == 0 && BC == 0) PC = 1])], AC_MSG_RESULT(yes); AC_DEFINE(UP_BC_PC_EXTERN), AC_MSG_RESULT(no))] ) AC_MSG_CHECKING(whether tputs() uses outfuntype) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_TERMCAP_H # include <termcap.h> #endif - ], [extern int xx(); tputs("test", 1, (outfuntype)xx)], + ], [extern int xx(); tputs("test", 1, (outfuntype)xx)])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OUTFUNTYPE), AC_MSG_RESULT(no)) AC_MSG_CHECKING([whether del_curterm() can be used]) -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_TERMCAP_H # include <termcap.h> #endif #include <term.h> - ], [if (cur_term) del_curterm(cur_term);], + ], [if (cur_term) del_curterm(cur_term);])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DEL_CURTERM), AC_MSG_RESULT(no)) dnl On some SCO machines sys/select redefines struct timeval AC_MSG_CHECKING([whether sys/select.h and sys/time.h may both be included]) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include <sys/types.h> #include <sys/time.h> -#include <sys/select.h>], , +#include <sys/select.h>], )], AC_MSG_RESULT(yes) AC_DEFINE(SYS_SELECT_WITH_SYS_TIME), AC_MSG_RESULT(no)) @@ -3602,7 +3601,7 @@ fi AC_MSG_CHECKING(for SVR4 ptys) if test -c /dev/ptmx ; then - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ // These should be in stdlib.h, but it depends on _XOPEN_SOURCE. char *ptsname(int); int unlockpt(int); @@ -3610,7 +3609,7 @@ int grantpt(int); ], [ ptsname(0); grantpt(0); - unlockpt(0);], + unlockpt(0);])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SVR4_PTYS), AC_MSG_RESULT(no)) else @@ -3646,6 +3645,8 @@ fi dnl Checks for library functions. =================================== +dnl TODO: this generates an obsolete warning, would need to remove and replace +dnl all RETSIGTYPE with "void" and SIGRETURN with "return". AC_TYPE_SIGNAL dnl find out what to use at the end of a signal function @@ -3657,14 +3658,14 @@ fi dnl check if struct sigcontext is defined (used for SGI only) AC_MSG_CHECKING(for struct sigcontext) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include <signal.h> test_sig() { struct sigcontext *scont; scont = (struct sigcontext *)0; return 1; -} ], , +} ], )], AC_MSG_RESULT(yes) AC_DEFINE(HAVE_SIGCONTEXT), AC_MSG_RESULT(no)) @@ -3753,11 +3754,11 @@ if test "$enable_canberra" = "yes"; then CFLAGS="$CFLAGS $canberra_cflags" fi LIBS="$LIBS $canberra_lib" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ # include <canberra.h> ], [ ca_context *hello; - ca_context_create(&hello);], + ca_context_create(&hello);])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CANBERRA), AC_MSG_RESULT(no; try installing libcanberra-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS") fi @@ -3792,24 +3793,24 @@ if test "$enable_libsodium" = "yes"; then ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $libsodium_cflags" LIBS="$LIBS $libsodium_lib" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ # include <sodium.h> ], [ - printf("%d", sodium_init()); ], + printf("%d", sodium_init()); ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SODIUM), AC_MSG_RESULT(no; try installing libsodium-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS") fi dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible AC_MSG_CHECKING(for st_blksize) -AC_TRY_COMPILE( +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include <sys/types.h> #include <sys/stat.h>], [ struct stat st; int n; stat("/", &st); - n = (int)st.st_blksize;], + n = (int)st.st_blksize;])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ST_BLKSIZE), AC_MSG_RESULT(no)) @@ -3817,7 +3818,7 @@ dnl Check for timer_create. It probably requires the 'rt' library. AC_MSG_CHECKING([for timer_create]) save_LIBS="$LIBS" LIBS="$LIBS -lrt" -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include<signal.h> #include<time.h> static void set_flag(union sigval) {} @@ -3829,10 +3830,10 @@ static void set_flag(union sigval) {} action.sigev_notify = SIGEV_THREAD; action.sigev_notify_function = set_flag; timer_create(CLOCK_REALTIME, &action, &timer_id); - ], + ])], AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE), LIBS="$save_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include<signal.h> #include<time.h> static void set_flag(union sigval) {} @@ -3844,7 +3845,7 @@ static void set_flag(union sigval) {} action.sigev_notify = SIGEV_THREAD; action.sigev_notify_function = set_flag; timer_create(CLOCK_REALTIME, &action, &timer_id); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIMER_CREATE), AC_MSG_RESULT(no))) @@ -3886,8 +3887,8 @@ AC_CACHE_CHECK([for nanoseconds field of struct stat], # st_mtimespec.tv_nsec -- Darwin (Mac OSX) for ac_val in st_mtim.tv_nsec st_mtim._tv_nsec st_mtim.st__tim.tv_nsec st_mtime_n st_mtimespec.tv_nsec; do CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val" - AC_TRY_COMPILE([#include <sys/types.h> -#include <sys/stat.h>], [struct stat s; s.ST_MTIM_NSEC;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> +#include <sys/stat.h>], [struct stat s; s.ST_MTIM_NSEC;])], [ac_cv_struct_st_mtim_nsec=$ac_val; break]) done CPPFLAGS="$ac_save_CPPFLAGS" @@ -3904,28 +3905,28 @@ dnl has been installed. AC_MSG_CHECKING(for iconv_open()) save_LIBS="$LIBS" LIBS="$LIBS -liconv" -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_ICONV_H # include <iconv.h> #endif - ], [iconv_open("fr", "to");], + ], [iconv_open("fr", "to");])], AC_MSG_RESULT(yes; with -liconv); AC_DEFINE(HAVE_ICONV), LIBS="$save_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_ICONV_H # include <iconv.h> #endif - ], [iconv_open("fr", "to");], + ], [iconv_open("fr", "to");])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ICONV), AC_MSG_RESULT(no))) AC_MSG_CHECKING(for nl_langinfo(CODESET)) -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_LANGINFO_H # include <langinfo.h> #endif -], [char *cs = nl_langinfo(CODESET);], +], [char *cs = nl_langinfo(CODESET);])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NL_LANGINFO_CODESET), AC_MSG_RESULT(no)) @@ -3933,7 +3934,7 @@ dnl Need various functions for floating point support. Only enable dnl floating point when they are all present. AC_CHECK_LIB(m, strtod) AC_MSG_CHECKING([for strtod() and other floating point functions]) -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_MATH_H # include <math.h> #endif @@ -3952,13 +3953,13 @@ AC_TRY_LINK([ d = sin(1.11); d = cos(1.11); d = atan(1.11); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOAT_FUNCS), AC_MSG_RESULT(no)) dnl isinf() and isnan() need to include header files and may need -lm. AC_MSG_CHECKING([for isinf()]) -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_MATH_H # include <math.h> #endif @@ -3966,12 +3967,12 @@ AC_TRY_LINK([ # include <stdlib.h> # include <stddef.h> #endif -], [int r = isinf(1.11); ], +], [int r = isinf(1.11); ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISINF), AC_MSG_RESULT(no)) AC_MSG_CHECKING([for isnan()]) -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_MATH_H # include <math.h> #endif @@ -3979,7 +3980,7 @@ AC_TRY_LINK([ # include <stdlib.h> # include <stddef.h> #endif -], [int r = isnan(1.11); ], +], [int r = isnan(1.11); ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISNAN), AC_MSG_RESULT(no)) @@ -3997,29 +3998,29 @@ if test "$enable_acl" = "yes"; then AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),) AC_MSG_CHECKING(for POSIX ACL support) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include <sys/types.h> #ifdef HAVE_SYS_ACL_H # include <sys/acl.h> #endif acl_t acl;], [acl = acl_get_file("foo", ACL_TYPE_ACCESS); acl_set_file("foo", ACL_TYPE_ACCESS, acl); - acl_free(acl);], + acl_free(acl);])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_POSIX_ACL), AC_MSG_RESULT(no)) AC_CHECK_LIB(sec, acl_get, [LIBS="$LIBS -lsec"; AC_DEFINE(HAVE_SOLARIS_ZFS_ACL)], AC_MSG_CHECKING(for Solaris ACL support) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_SYS_ACL_H # include <sys/acl.h> #endif], [acl("foo", GETACLCNT, 0, NULL); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOLARIS_ACL), AC_MSG_RESULT(no))) AC_MSG_CHECKING(for AIX ACL support) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #if STDC_HEADERS # include <stdlib.h> # include <stddef.h> @@ -4038,7 +4039,7 @@ int aclsize; struct acl *aclent;], [aclsize = sizeof(struct acl); aclent = (void *)malloc(aclsize); statacl("foo", STX_NORMAL, aclent, aclsize); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_AIX_ACL), AC_MSG_RESULT(no)) else @@ -4052,9 +4053,9 @@ if test "x$GTK_CFLAGS" != "x"; then ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <gtk/gtk.h>], - [ pango_shape_full(NULL, 0, NULL, 0, NULL, NULL); ], + [ pango_shape_full(NULL, 0, NULL, 0, NULL, NULL); ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_PANGO_SHAPE_FULL), AC_MSG_RESULT(no)) CFLAGS="$ac_save_CFLAGS" @@ -4071,10 +4072,10 @@ if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then dnl Checking if gpm support can be compiled AC_CACHE_CHECK([for gpm], vi_cv_have_gpm, [olibs="$LIBS" ; LIBS="-lgpm"] - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <gpm.h> #include <linux/keyboard.h>], - [Gpm_GetLibVersion(NULL);], + [Gpm_GetLibVersion(NULL);])], dnl Configure defines HAVE_GPM, if it is defined feature.h defines dnl FEAT_MOUSE_GPM if mouse support is included [vi_cv_have_gpm=yes], @@ -4104,7 +4105,7 @@ if test "$enable_sysmouse" = "yes"; then dnl Configure defines HAVE_SYSMOUSE, if it is defined feature.h dnl defines FEAT_SYSMOUSE if mouse support is included AC_CACHE_CHECK([for sysmouse], vi_cv_have_sysmouse, - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <sys/consio.h> #include <signal.h> #include <sys/fbio.h>], @@ -4112,7 +4113,7 @@ if test "$enable_sysmouse" = "yes"; then mouse.operation = MOUSE_MODE; mouse.operation = MOUSE_SHOW; mouse.u.mode.mode = 0; - mouse.u.mode.signal = SIGUSR2;], + mouse.u.mode.signal = SIGUSR2;])], [vi_cv_have_sysmouse=yes], [vi_cv_have_sysmouse=no]) ) @@ -4125,55 +4126,55 @@ fi dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known AC_MSG_CHECKING(for FD_CLOEXEC) -AC_TRY_COMPILE( +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#if HAVE_FCNTL_H # include <fcntl.h> #endif], -[ int flag = FD_CLOEXEC;], +[ int flag = FD_CLOEXEC;])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FD_CLOEXEC), AC_MSG_RESULT(not usable)) dnl rename needs to be checked separately to work on Nextstep with cc AC_MSG_CHECKING(for rename) -AC_TRY_LINK([#include <stdio.h>], [rename("this", "that")], +AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [rename("this", "that")])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_RENAME), AC_MSG_RESULT(no)) dnl check for dirfd() AC_MSG_CHECKING(for dirfd) -AC_TRY_LINK( +AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <sys/types.h> #include <dirent.h>], -[DIR * dir=opendir("dirname"); dirfd(dir);], +[DIR * dir=opendir("dirname"); dirfd(dir);])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DIRFD), AC_MSG_RESULT(not usable)) dnl check for flock() AC_MSG_CHECKING(for flock) -AC_TRY_LINK( +AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <sys/file.h>], -[flock(10, LOCK_SH);], +[flock(10, LOCK_SH);])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOCK), AC_MSG_RESULT(not usable)) dnl sysctl() may exist but not the arguments we use AC_MSG_CHECKING(for sysctl) -AC_TRY_COMPILE( +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include <sys/types.h> #include <sys/sysctl.h>], -[ int mib[2], r; +[[ int mib[2], r; size_t len; mib[0] = CTL_HW; mib[1] = HW_USERMEM; len = sizeof(r); (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0); - ], + ]])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL), AC_MSG_RESULT(not usable)) dnl sysinfo() may exist but not be Linux compatible. -dnl On some FreeBSD systems it may depend on libsysinfo, use TRY_LINK +dnl On some FreeBSD systems it may depend on libsysinfo, try to link AC_MSG_CHECKING(for sysinfo) -AC_TRY_LINK( +AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <sys/types.h> #include <sys/sysinfo.h>], [ struct sysinfo sinfo; @@ -4181,24 +4182,24 @@ AC_TRY_LINK( (void)sysinfo(&sinfo); t = sinfo.totalram; - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO), AC_MSG_RESULT(not usable)) dnl struct sysinfo may have the mem_unit field or not AC_MSG_CHECKING(for sysinfo.mem_unit) -AC_TRY_COMPILE( +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include <sys/types.h> #include <sys/sysinfo.h>], [ struct sysinfo sinfo; sinfo.mem_unit = 1; - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT), AC_MSG_RESULT(no)) dnl struct sysinfo may have the uptime field or not AC_MSG_CHECKING(for sysinfo.uptime) -AC_TRY_COMPILE( +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include <sys/types.h> #include <sys/sysinfo.h>], [ struct sysinfo sinfo; @@ -4206,26 +4207,26 @@ AC_TRY_COMPILE( (void)sysinfo(&sinfo); ut = sinfo.uptime; - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_UPTIME), AC_MSG_RESULT(no)) dnl sysconf() may exist but not support what we want to use AC_MSG_CHECKING(for sysconf) -AC_TRY_COMPILE( +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include <unistd.h>], [ (void)sysconf(_SC_PAGESIZE); (void)sysconf(_SC_PHYS_PAGES); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF), AC_MSG_RESULT(not usable)) dnl check if we have _SC_SIGSTKSZ via sysconf() AC_MSG_CHECKING(for _SC_SIGSTKSZ via sysconf()) -AC_TRY_COMPILE( +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include <unistd.h>], [ (void)sysconf(_SC_SIGSTKSZ); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF_SIGSTKSZ), AC_MSG_RESULT(not usable)) @@ -4240,7 +4241,7 @@ AC_DEFINE_UNQUOTED(VIM_SIZEOF_LONG, [$ac_cv_sizeof_long]) dnl Make sure that uint32_t is really 32 bits unsigned. AC_MSG_CHECKING([uint32_t is 32 bits]) -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([ #ifdef HAVE_STDINT_H # include <stdint.h> #endif @@ -4252,7 +4253,7 @@ main() { uint32_t nr2 = (uint32_t)0xffffffffUL; if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1; return 0; -}], +}])], AC_MSG_RESULT(ok), AC_MSG_ERROR([WRONG! uint32_t not defined correctly.]), AC_MSG_WARN([cannot check uint32_t when cross-compiling.])) @@ -4341,13 +4342,13 @@ if test "x$with_x" = "xyes"; then CFLAGS="$CFLAGS $X_CFLAGS" AC_MSG_CHECKING(whether X_LOCALE needed) - AC_TRY_COMPILE([#include <X11/Xlocale.h>],, - AC_TRY_LINK_FUNC([_Xsetlocale], [AC_MSG_RESULT(yes) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlocale.h>],)], + AC_LINK_IFELSE([AC_LANG_CALL([],[_Xsetlocale])], [AC_MSG_RESULT(yes) AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)), AC_MSG_RESULT(no)) AC_MSG_CHECKING(whether Xutf8SetWMProperties() can be used) - AC_TRY_LINK_FUNC([Xutf8SetWMProperties], [AC_MSG_RESULT(yes) + AC_LINK_IFELSE([AC_LANG_CALL([],[Xutf8SetWMProperties])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_XUTF8SETWMPROPERTIES)], AC_MSG_RESULT(no)) CFLAGS=$cflags_save @@ -4366,21 +4367,21 @@ dnl -v for variables. Dangerous, most ctags take this for 'vgrind style'. dnl -i+m to test for older Exuberant ctags AC_MSG_CHECKING(how to create tags) test -f tags && mv tags tags.save -if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1; then TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" -elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1; then TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" -elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1; then TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" else TAGPRG="ctags" - (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" - (eval etags -c /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags -c" - (eval ctags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags" - (eval ctags -t /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -t" - (eval ctags -ts /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -ts" - (eval ctags -tvs /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -tvs" - (eval ctags -i+m /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -i+m" + (eval etags /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="etags" + (eval etags -c /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="etags -c" + (eval ctags /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags" + (eval ctags -t /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags -t" + (eval ctags -ts /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags -ts" + (eval ctags -tvs /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags -tvs" + (eval ctags -i+m /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags -i+m" fi test -f tags.save && mv tags.save tags AC_MSG_RESULT($TAGPRG) AC_SUBST(TAGPRG) @@ -4388,7 +4389,7 @@ AC_MSG_RESULT($TAGPRG) AC_SUBST(TAGPRG) dnl Check how we can run man with a section number AC_MSG_CHECKING(how to run man with a section nr) MANDEF="man" -(eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&AC_FD_CC && MANDEF="man -s" +(eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&AS_MESSAGE_LOG_FD && MANDEF="man -s" AC_MSG_RESULT($MANDEF) if test "$MANDEF" = "man -s"; then AC_DEFINE(USEMAN_S) @@ -4418,14 +4419,14 @@ if test "$enable_nls" = "yes"; then if test -n "$MSGFMT"; then olibs=$LIBS LIBS="" - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <libintl.h>], - [gettext("Test");], + [gettext("Test");])], AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs, LIBS="-lintl" - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <libintl.h>], - [gettext("Test");], + [gettext("Test");])], AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes"; LIBS="$olibs -lintl", AC_MSG_RESULT([gettext() doesn't work]); @@ -4441,10 +4442,10 @@ if test "$enable_nls" = "yes"; then AC_CHECK_FUNCS(bind_textdomain_codeset) dnl _nl_msg_cat_cntr is required for GNU gettext AC_MSG_CHECKING([for _nl_msg_cat_cntr]) - AC_TRY_LINK( + AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include <libintl.h> extern int _nl_msg_cat_cntr;], - [++_nl_msg_cat_cntr;], + [++_nl_msg_cat_cntr;])], AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_NL_MSG_CAT_CNTR), AC_MSG_RESULT([no])) AC_MSG_CHECKING([if msgfmt supports --desktop]) @@ -4475,20 +4476,20 @@ AC_CHECK_HEADER(dlfcn.h, DLL=dlfcn.h, [AC_CHECK_HEADER(dl.h, DLL=dl.h)]) if test x${DLL} = xdlfcn.h; then AC_DEFINE(HAVE_DLFCN_H, 1, [ Define if we have dlfcn.h. ]) AC_MSG_CHECKING([for dlopen()]) - AC_TRY_LINK(,[ + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ extern void* dlopen(); dlopen(); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]), AC_MSG_RESULT(no); AC_MSG_CHECKING([for dlopen() in -ldl]) olibs=$LIBS LIBS="$LIBS -ldl" - AC_TRY_LINK(,[ + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ extern void* dlopen(); dlopen(); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]), AC_MSG_RESULT(no); @@ -4496,20 +4497,20 @@ if test x${DLL} = xdlfcn.h; then dnl ReliantUNIX has dlopen() in libc but everything else in libdl dnl ick :-) AC_MSG_CHECKING([for dlsym()]) - AC_TRY_LINK(,[ + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ extern void* dlsym(); dlsym(); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]), AC_MSG_RESULT(no); AC_MSG_CHECKING([for dlsym() in -ldl]) olibs=$LIBS LIBS="$LIBS -ldl" - AC_TRY_LINK(,[ + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ extern void* dlsym(); dlsym(); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]), AC_MSG_RESULT(no); @@ -4517,20 +4518,20 @@ if test x${DLL} = xdlfcn.h; then elif test x${DLL} = xdl.h; then AC_DEFINE(HAVE_DL_H, 1, [ Define if we have dl.h. ]) AC_MSG_CHECKING([for shl_load()]) - AC_TRY_LINK(,[ + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ extern void* shl_load(); shl_load(); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SHL_LOAD, 1, [ Define if we have shl_load() ]), AC_MSG_RESULT(no); AC_MSG_CHECKING([for shl_load() in -ldld]) olibs=$LIBS LIBS="$LIBS -ldld" - AC_TRY_LINK(,[ + AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ extern void* shl_load(); shl_load(); - ], + ])], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SHL_LOAD, 1, [ Define if we have shl_load() ]), AC_MSG_RESULT(no); @@ -4643,6 +4644,7 @@ if test "$zOSUnix" = "yes"; then fi dnl write output files -AC_OUTPUT(auto/config.mk:config.mk.in) +AC_CONFIG_FILES(auto/config.mk:config.mk.in) +AC_OUTPUT dnl vim: set sw=2 tw=78 fo+=l: |