Patch 8.2.5059

30 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 5, 2022, 2:52:36 PM6/5/22
to vim...@googlegroups.com

Patch 8.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)
Files: src/configure.ac, src/auto/configure


*** ../vim-8.2.5058/src/configure.ac 2022-06-05 16:55:50.694774344 +0100
--- src/configure.ac 2022-06-05 19:48:10.808021138 +0100
***************
*** 5,11 ****
dnl generate lots of hard to fix "obsolete" warnings.

AC_INIT(vim.h)
! AC_CONFIG_HEADER(auto/config.h:config.h.in)

dnl Being able to run configure means the system is Unix (compatible).
AC_DEFINE(UNIX)
--- 5,11 ----
dnl generate lots of hard to fix "obsolete" warnings.

AC_INIT(vim.h)
! 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,51 ****

AC_MSG_CHECKING([if the compiler supports trailing commas])
trailing_commas=no
! AC_TRY_COMPILE([], [
enum {
one,
! };],
[AC_MSG_RESULT(yes); trailing_commas=yes],
[AC_MSG_RESULT(no)])
if test "$trailing_commas" = no; then
--- 42,51 ----

AC_MSG_CHECKING([if the compiler supports trailing commas])
trailing_commas=no
! 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,61 ****

AC_MSG_CHECKING([if the compiler supports C++ comments])
slash_comments=no
! AC_TRY_COMPILE([],
! [// C++ comments?],
[AC_MSG_RESULT(yes); slash_comments=yes],
[AC_MSG_RESULT(no)])
if test "$slash_comments" = no; then
--- 54,61 ----

AC_MSG_CHECKING([if the compiler supports C++ comments])
slash_comments=no
! 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,161 ****
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
fi

OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
--- 154,161 ----
test "$GCC" = yes && CPP_MM=M; AC_SUBST(CPP_MM)

if test -f ./toolcheck; then
! AC_MSG_CHECKING(for buggy tools)
! sh ./toolcheck 1>&AS_MESSAGE_FD
fi

OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
***************
*** 261,267 ****
save_cflags="$CFLAGS"
save_ldflags="$LDFLAGS"
CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
! AC_TRY_LINK([ ], [ ],
AC_MSG_RESULT(found, will make universal binary),

AC_MSG_RESULT(not found)
--- 261,267 ----
save_cflags="$CFLAGS"
save_ldflags="$LDFLAGS"
CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
! AC_LINK_IFELSE([AC_LANG_PROGRAM([ ], [ ])],
AC_MSG_RESULT(found, will make universal binary),

AC_MSG_RESULT(not found)
***************
*** 269,275 ****
AC_MSG_CHECKING(if Intel architecture is supported)
CPPFLAGS="$CPPFLAGS -arch i386"
LDFLAGS="$save_ldflags -arch i386"
! AC_TRY_LINK([ ], [ ],
AC_MSG_RESULT(yes); MACARCH="intel",
AC_MSG_RESULT(no, using PowerPC)
MACARCH="ppc"
--- 269,275 ----
AC_MSG_CHECKING(if Intel architecture is supported)
CPPFLAGS="$CPPFLAGS -arch i386"
LDFLAGS="$save_ldflags -arch i386"
! AC_LINK_IFELSE([AC_LANG_PROGRAM([ ], [ ])],
AC_MSG_RESULT(yes); MACARCH="intel",
AC_MSG_RESULT(no, using PowerPC)
MACARCH="ppc"
***************
*** 396,409 ****

dnl Check for EBCDIC stolen from the LYNX port to z/OS Unix
AC_MSG_CHECKING(if character set is EBCDIC)
! AC_TRY_COMPILE([ ],
[ /* 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 ],
[ # TryCompile action if true
cf_cv_ebcdic=yes ],
[ # TryCompile action if false
--- 396,409 ----

dnl Check for EBCDIC stolen from the LYNX port to z/OS Unix
AC_MSG_CHECKING(if character set is EBCDIC)
! 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 ])],
[ # TryCompile action if true
cf_cv_ebcdic=yes ],
[ # TryCompile action if false
***************
*** 721,727 ****
AC_MSG_CHECKING([if link with ${LUA_LIBS} is sane])
libs_save=$LIBS
LIBS="$LIBS $LUA_LIBS"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); lua_ok="yes",
AC_MSG_RESULT(no); lua_ok="no"; LUA_LIBS="")
LIBS=$libs_save
--- 721,727 ----
AC_MSG_CHECKING([if link with ${LUA_LIBS} is sane])
libs_save=$LIBS
LIBS="$LIBS $LUA_LIBS"
! 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,1052 ****
libs_save=$LIBS
CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
LIBS="$LIBS $MZSCHEME_LIBS"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); mzs_ok=yes,
AC_MSG_RESULT(no: MZSCHEME DISABLED); mzs_ok=no)
CFLAGS=$cflags_save
--- 1046,1052 ----
libs_save=$LIBS
CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
LIBS="$LIBS $MZSCHEME_LIBS"
! 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,1156 ****
LIBS="$LIBS $perllibs"
perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
LDFLAGS="$perlldflags $LDFLAGS"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); perl_ok=yes,
AC_MSG_RESULT(no: PERL DISABLED); perl_ok=no)
CFLAGS=$cflags_save
--- 1150,1156 ----
LIBS="$LIBS $perllibs"
perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
LDFLAGS="$perlldflags $LDFLAGS"
! 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,1415 ****
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $threadsafe_flag"
LIBS="$LIBS $thread_lib"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag",
AC_MSG_RESULT(no); LIBS=$libs_save_old
)
--- 1409,1415 ----
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $threadsafe_flag"
LIBS="$LIBS $thread_lib"
! 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,1431 ****
libs_save=$LIBS
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
LIBS="$LIBS $PYTHON_LIBS"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); python_ok=yes,
AC_MSG_RESULT(no: PYTHON DISABLED); python_ok=no)
CFLAGS=$cflags_save
--- 1425,1431 ----
libs_save=$LIBS
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
LIBS="$LIBS $PYTHON_LIBS"
! 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,1634 ****
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $threadsafe_flag"
LIBS="$LIBS $thread_lib"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag",
AC_MSG_RESULT(no); LIBS=$libs_save_old
)
--- 1628,1634 ----
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $threadsafe_flag"
LIBS="$LIBS $thread_lib"
! 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,1650 ****
libs_save=$LIBS
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
LIBS="$LIBS $PYTHON3_LIBS"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); python3_ok=yes,
AC_MSG_RESULT(no: PYTHON3 DISABLED); python3_ok=no)
CFLAGS=$cflags_save
--- 1644,1650 ----
libs_save=$LIBS
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
LIBS="$LIBS $PYTHON3_LIBS"
! 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,1798 ****
libs_save=$LIBS
CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
LIBS="$LIBS $PYTHON_LIBS"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); fpie_ok=yes,
AC_MSG_RESULT(no); fpie_ok=no)
CFLAGS=$cflags_save
--- 1792,1798 ----
libs_save=$LIBS
CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
LIBS="$LIBS $PYTHON_LIBS"
! AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])],
AC_MSG_RESULT(yes); fpie_ok=yes,
AC_MSG_RESULT(no); fpie_ok=no)
CFLAGS=$cflags_save
***************
*** 1814,1820 ****
libs_save=$LIBS
CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
LIBS="$LIBS $PYTHON3_LIBS"
! AC_TRY_LINK(,[ ],
AC_MSG_RESULT(yes); fpie_ok=yes,
AC_MSG_RESULT(no); fpie_ok=no)
CFLAGS=$cflags_save
--- 1814,1820 ----
libs_save=$LIBS
CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
LIBS="$LIBS $PYTHON3_LIBS"
! AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])],
AC_MSG_RESULT(yes); fpie_ok=yes,
AC_MSG_RESULT(no); fpie_ok=no)
CFLAGS=$cflags_save
***************
*** 2128,2134 ****
fi

AC_CACHE_CHECK([whether compiling with IPv6 networking is possible], [vim_cv_ipv6_networking],
! [AC_TRY_LINK([
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
--- 2128,2134 ----
fi

AC_CACHE_CHECK([whether compiling with IPv6 networking is possible], [vim_cv_ipv6_networking],
! [AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
***************
*** 2153,2159 ****
if (errno == ECONNREFUSED)
(void)connect(1, (struct sockaddr *)&server, sizeof(server));
(void)freeaddrinfo(res);
! ],
[vim_cv_ipv6_networking="yes"],
[vim_cv_ipv6_networking="no"])])

--- 2153,2159 ----
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,2170 ****
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([
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
--- 2164,2170 ----
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_LINK_IFELSE([AC_LANG_PROGRAM([
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
***************
*** 2187,2193 ****
(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
--- 2187,2193 ----
(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,2363 ****
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_MSG_RESULT(yes),
AC_MSG_RESULT(no); no_x=yes)
CFLAGS=$cflags_save
--- 2356,2363 ----
AC_MSG_CHECKING(if X11 header files can be found)
cflags_save=$CFLAGS
CFLAGS="$CFLAGS $X_CFLAGS"
! 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,2407 ****
else
CFLAGS="$CFLAGS $X_CFLAGS"
fi
! AC_TRY_COMPILE([#include <X11/Xlib.h>], ,
AC_MSG_RESULT(no),
CFLAGS="$CFLAGS -Wno-implicit-int"
! AC_TRY_COMPILE([#include <X11/Xlib.h>], ,
AC_MSG_RESULT(yes); cflags_save="$cflags_save -Wno-implicit-int",
AC_MSG_RESULT(test failed)
)
--- 2398,2407 ----
else
CFLAGS="$CFLAGS $X_CFLAGS"
fi
! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlib.h>], )],
AC_MSG_RESULT(no),
CFLAGS="$CFLAGS -Wno-implicit-int"
! 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,2418 ****

AC_MSG_CHECKING(size of wchar_t is 2 bytes)
AC_CACHE_VAL(ac_cv_small_wchar_t,
! [AC_TRY_RUN([
#include <X11/Xlib.h>
#if STDC_HEADERS
# include <stdlib.h>
--- 2412,2418 ----

AC_MSG_CHECKING(size of wchar_t is 2 bytes)
AC_CACHE_VAL(ac_cv_small_wchar_t,
! [AC_RUN_IFELSE([AC_LANG_SOURCE([
#include <X11/Xlib.h>
#if STDC_HEADERS
# include <stdlib.h>
***************
*** 2423,2429 ****
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))])
--- 2423,2429 ----
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,2630 ****
dnl Now check if the installed GTK is sufficiently new.
dnl
rm -f conf.gtktest
! AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#if STDC_HEADERS
--- 2624,2630 ----
dnl Now check if the installed GTK is sufficiently new.
dnl
rm -f conf.gtktest
! AC_RUN_IFELSE([AC_LANG_SOURCE([
#include <gtk/gtk.h>
#include <stdio.h>
#if STDC_HEADERS
***************
*** 2656,2662 ****
}
return 1;
}
! ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
}
--- 2656,2662 ----
}
return 1;
}
! ])],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
}
***************
*** 3095,3104 ****
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([
#include <X11/Intrinsic.h>
#include <X11/Xmu/Editres.h>],
! [int i; i = 0;],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_X11_XMU_EDITRES_H),
AC_MSG_RESULT(no))
--- 3095,3104 ----
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_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <X11/Intrinsic.h>
#include <X11/Xmu/Editres.h>],
! [int i; i = 0;])],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_X11_XMU_EDITRES_H),
AC_MSG_RESULT(no))
***************
*** 3110,3126 ****
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
if test "$zOSUnix" = "yes"; then
! xmheader="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"
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_MSG_RESULT(yes); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes_21),
AC_MSG_RESULT(no); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes)
)
--- 3110,3125 ----
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
if test "$zOSUnix" = "yes"; then
! AC_CHECK_HEADERS(Xm/Xm.h)
else
! 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

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_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,3243 ****
fi

AC_MSG_CHECKING(whether __DATE__ and __TIME__ work)
! AC_TRY_COMPILE([#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_MSG_RESULT(yes); AC_DEFINE(HAVE_ATTRIBUTE_UNUSED),
AC_MSG_RESULT(no))

--- 3231,3242 ----
fi

AC_MSG_CHECKING(whether __DATE__ and __TIME__ work)
! 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_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,3261 ****
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_MSG_RESULT(yes)
AC_DEFINE(HAVE_SYS_WAIT_H)
AC_DEFINE(HAVE_UNION_WAIT),
--- 3253,3260 ----
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_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,3297 ****

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([
#include <pthread.h>
#include <pthread_np.h>],
! [int i; i = 0;],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PTHREAD_NP_H),
AC_MSG_RESULT(no))
--- 3287,3296 ----

dnl pthread_np.h may exist but can only be used after including pthread.h
AC_MSG_CHECKING([for pthread_np.h])
! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <pthread.h>
#include <pthread_np.h>],
! [int i; i = 0;])],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PTHREAD_NP_H),
AC_MSG_RESULT(no))
***************
*** 3306,3312 ****
AC_MSG_CHECKING([if strings.h can be included after string.h])
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
! AC_TRY_COMPILE([
#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) */
--- 3305,3311 ----
AC_MSG_CHECKING([if strings.h can be included after string.h])
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
! 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,3326 ****
#if defined(HAVE_STRINGS_H)
# include <strings.h>
#endif
! ], [int i; i = 0;],
AC_MSG_RESULT(yes),
AC_DEFINE(NO_STRINGS_WITH_STRING_H)
AC_MSG_RESULT(no))
--- 3319,3325 ----
#if defined(HAVE_STRINGS_H)
# include <strings.h>
#endif
! ], [int i; i = 0;])],
AC_MSG_RESULT(yes),
AC_DEFINE(NO_STRINGS_WITH_STRING_H)
AC_MSG_RESULT(no))
***************
*** 3393,3399 ****

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([
#include <sys/types.h>
#if STDC_HEADERS
# include <stdlib.h>
--- 3392,3398 ----

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_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <sys/types.h>
#if STDC_HEADERS
# include <stdlib.h>
***************
*** 3401,3407 ****
#endif
#include <signal.h>
#include "confdefs.h"
! ], [stack_t sigstk; sigstk.ss_base = 0; ],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SS_BASE),
AC_MSG_RESULT(no))

--- 3400,3406 ----
#endif
#include <signal.h>
#include "confdefs.h"
! ], [stack_t sigstk; sigstk.ss_base = 0; ])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SS_BASE),
AC_MSG_RESULT(no))

***************
*** 3412,3418 ****
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))
dnl Need to check for tgetent() below.
olibs="$LIBS"
else
--- 3411,3417 ----
AC_MSG_RESULT($with_tlib)
LIBS="$LIBS -l$with_tlib"
AC_MSG_CHECKING(for linking with $with_tlib library)
! 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,3440 ****
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([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
--- 3433,3439 ----
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_RUN_IFELSE([AC_LANG_SOURCE([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
***************
*** 3442,3448 ****
# include <stdlib.h>
# include <stddef.h>
#endif
! main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }],
res="OK", res="FAIL", res="FAIL")
if test "$res" = "OK"; then
break
--- 3441,3447 ----
# include <stdlib.h>
# include <stddef.h>
#endif
! 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,3465 ****

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_MSG_RESULT(yes),
AC_MSG_ERROR([NOT FOUND!
You need to install a terminal library; for example ncurses.
--- 3457,3464 ----

if test "x$olibs" = "x$LIBS"; then
AC_MSG_CHECKING([for tgetent()])
! 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,3590 ****
fi

AC_MSG_CHECKING(whether termcap.h contains ospeed)
! AC_TRY_LINK([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
! ], [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([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
extern short ospeed;
! ], [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([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
! ], [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([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
extern char *UP, *BC, PC;
! ], [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([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
! ], [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([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
#include <term.h>
! ], [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([
#include <sys/types.h>
#include <sys/time.h>
! #include <sys/select.h>], ,
AC_MSG_RESULT(yes)
AC_DEFINE(SYS_SELECT_WITH_SYS_TIME),
AC_MSG_RESULT(no))
--- 3522,3589 ----
fi

AC_MSG_CHECKING(whether termcap.h contains ospeed)
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
! ], [ospeed = 20000])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OSPEED),
[AC_MSG_RESULT(no)
AC_MSG_CHECKING(whether ospeed can be extern)
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
extern short ospeed;
! ], [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_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
! ], [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_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])],
AC_MSG_RESULT(yes); AC_DEFINE(UP_BC_PC_EXTERN),
AC_MSG_RESULT(no))]
)

AC_MSG_CHECKING(whether tputs() uses outfuntype)
! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
! ], [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_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
#include <term.h>
! ], [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_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <sys/types.h>
#include <sys/time.h>
! #include <sys/select.h>], )],
AC_MSG_RESULT(yes)
AC_DEFINE(SYS_SELECT_WITH_SYS_TIME),
AC_MSG_RESULT(no))
***************
*** 3602,3608 ****

AC_MSG_CHECKING(for SVR4 ptys)
if test -c /dev/ptmx ; then
! AC_TRY_LINK([
// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
char *ptsname(int);
int unlockpt(int);
--- 3601,3607 ----

AC_MSG_CHECKING(for SVR4 ptys)
if test -c /dev/ptmx ; then
! 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,3616 ****
], [
ptsname(0);
grantpt(0);
! unlockpt(0);],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SVR4_PTYS),
AC_MSG_RESULT(no))
else
--- 3609,3615 ----
], [
ptsname(0);
grantpt(0);
! unlockpt(0);])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SVR4_PTYS),
AC_MSG_RESULT(no))
else
***************
*** 3646,3651 ****
--- 3645,3652 ----

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,3670 ****

dnl check if struct sigcontext is defined (used for SGI only)
AC_MSG_CHECKING(for struct sigcontext)
! AC_TRY_COMPILE([
#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))
--- 3658,3671 ----

dnl check if struct sigcontext is defined (used for SGI only)
AC_MSG_CHECKING(for struct sigcontext)
! 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,3763 ****
CFLAGS="$CFLAGS $canberra_cflags"
fi
LIBS="$LIBS $canberra_lib"
! AC_TRY_LINK([
# include <canberra.h>
], [
ca_context *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
--- 3754,3764 ----
CFLAGS="$CFLAGS $canberra_cflags"
fi
LIBS="$LIBS $canberra_lib"
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
# include <canberra.h>
], [
ca_context *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,3815 ****
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $libsodium_cflags"
LIBS="$LIBS $libsodium_lib"
! AC_TRY_LINK([
# include <sodium.h>
], [
! 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(
[#include <sys/types.h>
#include <sys/stat.h>],
[ struct stat st;
int n;

stat("/", &st);
! n = (int)st.st_blksize;],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ST_BLKSIZE),
AC_MSG_RESULT(no))

--- 3793,3816 ----
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $libsodium_cflags"
LIBS="$LIBS $libsodium_lib"
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
# include <sodium.h>
], [
! 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_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;])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ST_BLKSIZE),
AC_MSG_RESULT(no))

***************
*** 3817,3823 ****
AC_MSG_CHECKING([for timer_create])
save_LIBS="$LIBS"
LIBS="$LIBS -lrt"
! AC_TRY_LINK([
#include<signal.h>
#include<time.h>
static void set_flag(union sigval) {}
--- 3818,3824 ----
AC_MSG_CHECKING([for timer_create])
save_LIBS="$LIBS"
LIBS="$LIBS -lrt"
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include<signal.h>
#include<time.h>
static void set_flag(union sigval) {}
***************
*** 3829,3838 ****
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([
#include<signal.h>
#include<time.h>
static void set_flag(union sigval) {}
--- 3830,3839 ----
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_LINK_IFELSE([AC_LANG_PROGRAM([
#include<signal.h>
#include<time.h>
static void set_flag(union sigval) {}
***************
*** 3844,3850 ****
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)))

--- 3845,3851 ----
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,3893 ****
# 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_cv_struct_st_mtim_nsec=$ac_val; break])
done
CPPFLAGS="$ac_save_CPPFLAGS"
--- 3887,3894 ----
# 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_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,3931 ****
AC_MSG_CHECKING(for iconv_open())
save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
! AC_TRY_LINK([
#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
! ], [iconv_open("fr", "to");],
AC_MSG_RESULT(yes; with -liconv); AC_DEFINE(HAVE_ICONV),
LIBS="$save_LIBS"
! AC_TRY_LINK([
#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
! ], [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([
#ifdef HAVE_LANGINFO_H
# include <langinfo.h>
#endif
! ], [char *cs = nl_langinfo(CODESET);],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NL_LANGINFO_CODESET),
AC_MSG_RESULT(no))

--- 3905,3932 ----
AC_MSG_CHECKING(for iconv_open())
save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
! ], [iconv_open("fr", "to");])],
AC_MSG_RESULT(yes; with -liconv); AC_DEFINE(HAVE_ICONV),
LIBS="$save_LIBS"
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
! ], [iconv_open("fr", "to");])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ICONV),
AC_MSG_RESULT(no)))


AC_MSG_CHECKING(for nl_langinfo(CODESET))
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_LANGINFO_H
# include <langinfo.h>
#endif
! ], [char *cs = nl_langinfo(CODESET);])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NL_LANGINFO_CODESET),
AC_MSG_RESULT(no))

***************
*** 3933,3939 ****
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([
#ifdef HAVE_MATH_H
# include <math.h>
#endif
--- 3934,3940 ----
dnl floating point when they are all present.
AC_CHECK_LIB(m, strtod)
AC_MSG_CHECKING([for strtod() and other floating point functions])
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_MATH_H
# include <math.h>
#endif
***************
*** 3952,3964 ****
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([
#ifdef HAVE_MATH_H
# include <math.h>
#endif
--- 3953,3965 ----
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_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_MATH_H
# include <math.h>
#endif
***************
*** 3966,3977 ****
# include <stdlib.h>
# include <stddef.h>
#endif
! ], [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([
#ifdef HAVE_MATH_H
# include <math.h>
#endif
--- 3967,3978 ----
# include <stdlib.h>
# include <stddef.h>
#endif
! ], [int r = isinf(1.11); ])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISINF),
AC_MSG_RESULT(no))

AC_MSG_CHECKING([for isnan()])
! AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_MATH_H
# include <math.h>
#endif
***************
*** 3979,3985 ****
# include <stdlib.h>
# include <stddef.h>
#endif
! ], [int r = isnan(1.11); ],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISNAN),
AC_MSG_RESULT(no))

--- 3980,3986 ----
# include <stdlib.h>
# include <stddef.h>
#endif
! ], [int r = isnan(1.11); ])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISNAN),
AC_MSG_RESULT(no))

***************
*** 3997,4025 ****
AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),)

AC_MSG_CHECKING(for POSIX ACL support)
! AC_TRY_LINK([
#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);],
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([
#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([
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
--- 3998,4026 ----
AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),)

AC_MSG_CHECKING(for POSIX ACL support)
! 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);])],
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_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_LINK_IFELSE([AC_LANG_PROGRAM([
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
***************
*** 4038,4044 ****
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
--- 4039,4045 ----
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,4060 ****
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
! AC_TRY_LINK(
[#include <gtk/gtk.h>],
! [ 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"
--- 4053,4061 ----
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
! AC_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <gtk/gtk.h>],
! [ 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,4080 ****
dnl Checking if gpm support can be compiled
AC_CACHE_CHECK([for gpm], vi_cv_have_gpm,
[olibs="$LIBS" ; LIBS="-lgpm"]
! AC_TRY_LINK(
[#include <gpm.h>
#include <linux/keyboard.h>],
! [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],
--- 4072,4081 ----
dnl Checking if gpm support can be compiled
AC_CACHE_CHECK([for gpm], vi_cv_have_gpm,
[olibs="$LIBS" ; LIBS="-lgpm"]
! AC_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <gpm.h>
#include <linux/keyboard.h>],
! [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,4110 ****
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(
[#include <sys/consio.h>
#include <signal.h>
#include <sys/fbio.h>],
--- 4105,4111 ----
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_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <sys/consio.h>
#include <signal.h>
#include <sys/fbio.h>],
***************
*** 4112,4118 ****
mouse.operation = MOUSE_MODE;
mouse.operation = MOUSE_SHOW;
mouse.u.mode.mode = 0;
! mouse.u.mode.signal = SIGUSR2;],
[vi_cv_have_sysmouse=yes],
[vi_cv_have_sysmouse=no])
)
--- 4113,4119 ----
mouse.operation = MOUSE_MODE;
mouse.operation = MOUSE_SHOW;
mouse.u.mode.mode = 0;
! mouse.u.mode.signal = SIGUSR2;])],
[vi_cv_have_sysmouse=yes],
[vi_cv_have_sysmouse=no])
)
***************
*** 4125,4179 ****

dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known
AC_MSG_CHECKING(for FD_CLOEXEC)
! AC_TRY_COMPILE(
[#if HAVE_FCNTL_H
# include <fcntl.h>
#endif],
! [ 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_MSG_RESULT(yes); AC_DEFINE(HAVE_RENAME),
AC_MSG_RESULT(no))

dnl check for dirfd()
AC_MSG_CHECKING(for dirfd)
! AC_TRY_LINK(
[#include <sys/types.h>
#include <dirent.h>],
! [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(
[#include <sys/file.h>],
! [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(
[#include <sys/types.h>
#include <sys/sysctl.h>],
! [ 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
AC_MSG_CHECKING(for sysinfo)
! AC_TRY_LINK(
[#include <sys/types.h>
#include <sys/sysinfo.h>],
[ struct sysinfo sinfo;
--- 4126,4180 ----

dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known
AC_MSG_CHECKING(for FD_CLOEXEC)
! AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#if HAVE_FCNTL_H
# include <fcntl.h>
#endif],
! [ 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_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_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <sys/types.h>
#include <dirent.h>],
! [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_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <sys/file.h>],
! [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_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <sys/types.h>
#include <sys/sysctl.h>],
! [[ 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, try to link
AC_MSG_CHECKING(for sysinfo)
! AC_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <sys/types.h>
#include <sys/sysinfo.h>],
[ struct sysinfo sinfo;
***************
*** 4181,4204 ****

(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(
[#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(
[#include <sys/types.h>
#include <sys/sysinfo.h>],
[ struct sysinfo sinfo;
--- 4182,4205 ----

(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_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_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <sys/types.h>
#include <sys/sysinfo.h>],
[ struct sysinfo sinfo;
***************
*** 4206,4231 ****

(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(
[#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(
[#include <unistd.h>],
[ (void)sysconf(_SC_SIGSTKSZ);
! ],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF_SIGSTKSZ),
AC_MSG_RESULT(not usable))

--- 4207,4232 ----

(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_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_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,4246 ****

dnl Make sure that uint32_t is really 32 bits unsigned.
AC_MSG_CHECKING([uint32_t is 32 bits])
! AC_TRY_RUN([
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
--- 4241,4247 ----

dnl Make sure that uint32_t is really 32 bits unsigned.
AC_MSG_CHECKING([uint32_t is 32 bits])
! AC_RUN_IFELSE([AC_LANG_SOURCE([
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
***************
*** 4252,4258 ****
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.]))
--- 4253,4259 ----
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,4353 ****
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_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_DEFINE(HAVE_XUTF8SETWMPROPERTIES)], AC_MSG_RESULT(no))

CFLAGS=$cflags_save
--- 4342,4354 ----
CFLAGS="$CFLAGS $X_CFLAGS"

AC_MSG_CHECKING(whether X_LOCALE needed)
! 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_LINK_IFELSE([AC_LANG_CALL([],[Xutf8SetWMProperties])], [AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_XUTF8SETWMPROPERTIES)], AC_MSG_RESULT(no))

CFLAGS=$cflags_save
***************
*** 4366,4386 ****
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
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
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
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"
fi
test -f tags.save && mv tags.save tags
AC_MSG_RESULT($TAGPRG) AC_SUBST(TAGPRG)
--- 4367,4387 ----
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>&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>&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>&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>&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,4394 ****
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"
AC_MSG_RESULT($MANDEF)
if test "$MANDEF" = "man -s"; then
AC_DEFINE(USEMAN_S)
--- 4389,4395 ----
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>&AS_MESSAGE_LOG_FD && MANDEF="man -s"
AC_MSG_RESULT($MANDEF)
if test "$MANDEF" = "man -s"; then
AC_DEFINE(USEMAN_S)
***************
*** 4418,4431 ****
if test -n "$MSGFMT"; then
olibs=$LIBS
LIBS=""
! AC_TRY_LINK(
[#include <libintl.h>],
! [gettext("Test");],
AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs,
LIBS="-lintl"
! AC_TRY_LINK(
[#include <libintl.h>],
! [gettext("Test");],
AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes";
LIBS="$olibs -lintl",
AC_MSG_RESULT([gettext() doesn't work]);
--- 4419,4432 ----
if test -n "$MSGFMT"; then
olibs=$LIBS
LIBS=""
! AC_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <libintl.h>],
! [gettext("Test");])],
AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs,
LIBS="-lintl"
! AC_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <libintl.h>],
! [gettext("Test");])],
AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes";
LIBS="$olibs -lintl",
AC_MSG_RESULT([gettext() doesn't work]);
***************
*** 4441,4450 ****
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(
[#include <libintl.h>
extern int _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])
--- 4442,4451 ----
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_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <libintl.h>
extern int _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,4494 ****
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(,[
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(,[
extern void* dlopen();
dlopen();
! ],
AC_MSG_RESULT(yes);
AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]),
AC_MSG_RESULT(no);
--- 4476,4495 ----
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_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_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,4515 ****
dnl ReliantUNIX has dlopen() in libc but everything else in libdl
dnl ick :-)
AC_MSG_CHECKING([for dlsym()])
! AC_TRY_LINK(,[
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(,[
extern void* dlsym();
dlsym();
! ],
AC_MSG_RESULT(yes);
AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]),
AC_MSG_RESULT(no);
--- 4497,4516 ----
dnl ReliantUNIX has dlopen() in libc but everything else in libdl
dnl ick :-)
AC_MSG_CHECKING([for dlsym()])
! 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_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,4536 ****
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(,[
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(,[
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);
--- 4518,4537 ----
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_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_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,4648 ****
fi

dnl write output files
! AC_OUTPUT(auto/config.mk:config.mk.in)

dnl vim: set sw=2 tw=78 fo+=l:
--- 4644,4650 ----
fi

dnl write output files
! AC_CONFIG_FILES(auto/config.mk:config.mk.in)
! AC_OUTPUT

dnl vim: set sw=2 tw=78 fo+=l:
*** ../vim-8.2.5058/src/auto/configure 2022-06-05 16:55:50.690774344 +0100
--- src/auto/configure 2022-06-05 19:48:13.796020905 +0100
***************
*** 4529,4536 ****
test "$GCC" = yes && CPP_MM=M;

if test -f ./toolcheck; then
! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy tools..." >&5
! $as_echo "$as_me: checking for buggy tools..." >&6;}
sh ./toolcheck 1>&6
fi

--- 4529,4536 ----
test "$GCC" = yes && CPP_MM=M;

if test -f ./toolcheck; then
! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
! $as_echo_n "checking for buggy tools... " >&6; }
sh ./toolcheck 1>&6
fi

***************
*** 10580,10591 ****
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
if test "$zOSUnix" = "yes"; then
! xmheader="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"
! fi
! for ac_header in $xmheader
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
--- 10580,10600 ----
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
if test "$zOSUnix" = "yes"; then
! for ac_header in Xm/Xm.h
! do :
! ac_fn_c_check_header_mongrel "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
! if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
! cat >>confdefs.h <<_ACEOF
! #define HAVE_XM_XM_H 1
! _ACEOF
!
! fi
!
! done
!
else
! for ac_header in Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
! Xm/UnhighlightT.h Xm/Notebook.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
***************
*** 10598,10603 ****
--- 10607,10613 ----

done

+ fi

if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
*** ../vim-8.2.5058/src/version.c 2022-06-05 19:01:33.292414976 +0100
--- src/version.c 2022-06-05 19:51:08.132004964 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5059,
/**/

--
FATHER: We are here today to witness the union of two young people in the
joyful bond of the holy wedlock. Unfortunately, one of them, my son
Herbert, has just fallen to his death.
[Murmurs from CROWD; the BRIDE smiles with relief, coughs.]
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages