Mercurial > vim
comparison src/configure.ac @ 29075:89685786dbe4 v8.2.5059
patch 8.2.5059: autoconf 2.71 produces many obsolete warnings
Commit: https://github.com/vim/vim/commit/1004b3d970f19964816eedf89d3ba7aa9416ed24
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 5 19:51:55 2022 +0100
patch 8.2.5059: autoconf 2.71 produces many obsolete warnings
Problem: Autoconf 2.71 produces many obsolete warnings.
Solution: Replace obsolete macros with non-obsolete ones, where the
functionality does not change. (issue #10528)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 Jun 2022 21:00:03 +0200 |
parents | b90bca860b5a |
children | e065d1c604eb |
comparison
equal
deleted
inserted
replaced
29074:21fc7b930c1e | 29075:89685786dbe4 |
---|---|
3 dnl Process this file with autoconf 2.69 to produce "configure". | 3 dnl Process this file with autoconf 2.69 to produce "configure". |
4 dnl This should also work with other versions of autoconf, but 2.70 and later | 4 dnl This should also work with other versions of autoconf, but 2.70 and later |
5 dnl generate lots of hard to fix "obsolete" warnings. | 5 dnl generate lots of hard to fix "obsolete" warnings. |
6 | 6 |
7 AC_INIT(vim.h) | 7 AC_INIT(vim.h) |
8 AC_CONFIG_HEADER(auto/config.h:config.h.in) | 8 AC_CONFIG_HEADERS(auto/config.h:config.h.in) |
9 | 9 |
10 dnl Being able to run configure means the system is Unix (compatible). | 10 dnl Being able to run configure means the system is Unix (compatible). |
11 AC_DEFINE(UNIX) | 11 AC_DEFINE(UNIX) |
12 AC_PROG_MAKE_SET | 12 AC_PROG_MAKE_SET |
13 | 13 |
40 AC_MSG_FAILURE([Compiler does not support long long int]) | 40 AC_MSG_FAILURE([Compiler does not support long long int]) |
41 fi | 41 fi |
42 | 42 |
43 AC_MSG_CHECKING([if the compiler supports trailing commas]) | 43 AC_MSG_CHECKING([if the compiler supports trailing commas]) |
44 trailing_commas=no | 44 trailing_commas=no |
45 AC_TRY_COMPILE([], [ | 45 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ |
46 enum { | 46 enum { |
47 one, | 47 one, |
48 };], | 48 };])], |
49 [AC_MSG_RESULT(yes); trailing_commas=yes], | 49 [AC_MSG_RESULT(yes); trailing_commas=yes], |
50 [AC_MSG_RESULT(no)]) | 50 [AC_MSG_RESULT(no)]) |
51 if test "$trailing_commas" = no; then | 51 if test "$trailing_commas" = no; then |
52 AC_MSG_FAILURE([Compiler does not support trailing comma in enum]) | 52 AC_MSG_FAILURE([Compiler does not support trailing comma in enum]) |
53 fi | 53 fi |
54 | 54 |
55 AC_MSG_CHECKING([if the compiler supports C++ comments]) | 55 AC_MSG_CHECKING([if the compiler supports C++ comments]) |
56 slash_comments=no | 56 slash_comments=no |
57 AC_TRY_COMPILE([], | 57 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], |
58 [// C++ comments?], | 58 [// C++ comments?])], |
59 [AC_MSG_RESULT(yes); slash_comments=yes], | 59 [AC_MSG_RESULT(yes); slash_comments=yes], |
60 [AC_MSG_RESULT(no)]) | 60 [AC_MSG_RESULT(no)]) |
61 if test "$slash_comments" = no; then | 61 if test "$slash_comments" = no; then |
62 AC_MSG_FAILURE([Compiler does not support C++ comments]) | 62 AC_MSG_FAILURE([Compiler does not support C++ comments]) |
63 fi | 63 fi |
152 dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies. | 152 dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies. |
153 dnl But gcc 3.1 changed the meaning! See near the end. | 153 dnl But gcc 3.1 changed the meaning! See near the end. |
154 test "$GCC" = yes && CPP_MM=M; AC_SUBST(CPP_MM) | 154 test "$GCC" = yes && CPP_MM=M; AC_SUBST(CPP_MM) |
155 | 155 |
156 if test -f ./toolcheck; then | 156 if test -f ./toolcheck; then |
157 AC_CHECKING(for buggy tools) | 157 AC_MSG_CHECKING(for buggy tools) |
158 sh ./toolcheck 1>&AC_FD_MSG | 158 sh ./toolcheck 1>&AS_MESSAGE_FD |
159 fi | 159 fi |
160 | 160 |
161 OS_EXTRA_SRC=""; OS_EXTRA_OBJ="" | 161 OS_EXTRA_SRC=""; OS_EXTRA_OBJ="" |
162 | 162 |
163 dnl When cross-compiling set $vim_cv_uname_output, $vim_cv_uname_r_output and | 163 dnl When cross-compiling set $vim_cv_uname_output, $vim_cv_uname_r_output and |
259 dnl with $CFLAGS and we can only have one -sysroot argument. | 259 dnl with $CFLAGS and we can only have one -sysroot argument. |
260 save_cppflags="$CPPFLAGS" | 260 save_cppflags="$CPPFLAGS" |
261 save_cflags="$CFLAGS" | 261 save_cflags="$CFLAGS" |
262 save_ldflags="$LDFLAGS" | 262 save_ldflags="$LDFLAGS" |
263 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" | 263 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" |
264 AC_TRY_LINK([ ], [ ], | 264 AC_LINK_IFELSE([AC_LANG_PROGRAM([ ], [ ])], |
265 AC_MSG_RESULT(found, will make universal binary), | 265 AC_MSG_RESULT(found, will make universal binary), |
266 | 266 |
267 AC_MSG_RESULT(not found) | 267 AC_MSG_RESULT(not found) |
268 CFLAGS="$save_cflags" | 268 CFLAGS="$save_cflags" |
269 AC_MSG_CHECKING(if Intel architecture is supported) | 269 AC_MSG_CHECKING(if Intel architecture is supported) |
270 CPPFLAGS="$CPPFLAGS -arch i386" | 270 CPPFLAGS="$CPPFLAGS -arch i386" |
271 LDFLAGS="$save_ldflags -arch i386" | 271 LDFLAGS="$save_ldflags -arch i386" |
272 AC_TRY_LINK([ ], [ ], | 272 AC_LINK_IFELSE([AC_LANG_PROGRAM([ ], [ ])], |
273 AC_MSG_RESULT(yes); MACARCH="intel", | 273 AC_MSG_RESULT(yes); MACARCH="intel", |
274 AC_MSG_RESULT(no, using PowerPC) | 274 AC_MSG_RESULT(no, using PowerPC) |
275 MACARCH="ppc" | 275 MACARCH="ppc" |
276 CPPFLAGS="$save_cppflags -arch ppc" | 276 CPPFLAGS="$save_cppflags -arch ppc" |
277 LDFLAGS="$save_ldflags -arch ppc")) | 277 LDFLAGS="$save_ldflags -arch ppc")) |
394 AC_MSG_RESULT($withval); AC_DEFINE_UNQUOTED(MODIFIED_BY, "$withval"), | 394 AC_MSG_RESULT($withval); AC_DEFINE_UNQUOTED(MODIFIED_BY, "$withval"), |
395 AC_MSG_RESULT(no)) | 395 AC_MSG_RESULT(no)) |
396 | 396 |
397 dnl Check for EBCDIC stolen from the LYNX port to z/OS Unix | 397 dnl Check for EBCDIC stolen from the LYNX port to z/OS Unix |
398 AC_MSG_CHECKING(if character set is EBCDIC) | 398 AC_MSG_CHECKING(if character set is EBCDIC) |
399 AC_TRY_COMPILE([ ], | 399 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], |
400 [ /* TryCompile function for CharSet. | 400 [ /* TryCompile function for CharSet. |
401 Treat any failure as ASCII for compatibility with existing art. | 401 Treat any failure as ASCII for compatibility with existing art. |
402 Use compile-time rather than run-time tests for cross-compiler | 402 Use compile-time rather than run-time tests for cross-compiler |
403 tolerance. */ | 403 tolerance. */ |
404 #if '0'!=240 | 404 #if '0'!=240 |
405 make an error "Character set is not EBCDIC" | 405 make an error "Character set is not EBCDIC" |
406 #endif ], | 406 #endif ])], |
407 [ # TryCompile action if true | 407 [ # TryCompile action if true |
408 cf_cv_ebcdic=yes ], | 408 cf_cv_ebcdic=yes ], |
409 [ # TryCompile action if false | 409 [ # TryCompile action if false |
410 cf_cv_ebcdic=no]) | 410 cf_cv_ebcdic=no]) |
411 # end of TryCompile ]) | 411 # end of TryCompile ]) |
719 lua_ok="yes" | 719 lua_ok="yes" |
720 else | 720 else |
721 AC_MSG_CHECKING([if link with ${LUA_LIBS} is sane]) | 721 AC_MSG_CHECKING([if link with ${LUA_LIBS} is sane]) |
722 libs_save=$LIBS | 722 libs_save=$LIBS |
723 LIBS="$LIBS $LUA_LIBS" | 723 LIBS="$LIBS $LUA_LIBS" |
724 AC_TRY_LINK(,[ ], | 724 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
725 AC_MSG_RESULT(yes); lua_ok="yes", | 725 AC_MSG_RESULT(yes); lua_ok="yes", |
726 AC_MSG_RESULT(no); lua_ok="no"; LUA_LIBS="") | 726 AC_MSG_RESULT(no); lua_ok="no"; LUA_LIBS="") |
727 LIBS=$libs_save | 727 LIBS=$libs_save |
728 fi | 728 fi |
729 if test "x$lua_ok" = "xyes"; then | 729 if test "x$lua_ok" = "xyes"; then |
1044 AC_MSG_CHECKING([if compile and link flags for MzScheme are sane]) | 1044 AC_MSG_CHECKING([if compile and link flags for MzScheme are sane]) |
1045 cflags_save=$CFLAGS | 1045 cflags_save=$CFLAGS |
1046 libs_save=$LIBS | 1046 libs_save=$LIBS |
1047 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS" | 1047 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS" |
1048 LIBS="$LIBS $MZSCHEME_LIBS" | 1048 LIBS="$LIBS $MZSCHEME_LIBS" |
1049 AC_TRY_LINK(,[ ], | 1049 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
1050 AC_MSG_RESULT(yes); mzs_ok=yes, | 1050 AC_MSG_RESULT(yes); mzs_ok=yes, |
1051 AC_MSG_RESULT(no: MZSCHEME DISABLED); mzs_ok=no) | 1051 AC_MSG_RESULT(no: MZSCHEME DISABLED); mzs_ok=no) |
1052 CFLAGS=$cflags_save | 1052 CFLAGS=$cflags_save |
1053 LIBS=$libs_save | 1053 LIBS=$libs_save |
1054 if test $mzs_ok = yes; then | 1054 if test $mzs_ok = yes; then |
1148 ldflags_save=$LDFLAGS | 1148 ldflags_save=$LDFLAGS |
1149 CFLAGS="$CFLAGS $perlcppflags" | 1149 CFLAGS="$CFLAGS $perlcppflags" |
1150 LIBS="$LIBS $perllibs" | 1150 LIBS="$LIBS $perllibs" |
1151 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'` | 1151 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'` |
1152 LDFLAGS="$perlldflags $LDFLAGS" | 1152 LDFLAGS="$perlldflags $LDFLAGS" |
1153 AC_TRY_LINK(,[ ], | 1153 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
1154 AC_MSG_RESULT(yes); perl_ok=yes, | 1154 AC_MSG_RESULT(yes); perl_ok=yes, |
1155 AC_MSG_RESULT(no: PERL DISABLED); perl_ok=no) | 1155 AC_MSG_RESULT(no: PERL DISABLED); perl_ok=no) |
1156 CFLAGS=$cflags_save | 1156 CFLAGS=$cflags_save |
1157 LIBS=$libs_save | 1157 LIBS=$libs_save |
1158 LDFLAGS=$ldflags_save | 1158 LDFLAGS=$ldflags_save |
1407 libs_save_old=$LIBS | 1407 libs_save_old=$LIBS |
1408 if test -n "$threadsafe_flag"; then | 1408 if test -n "$threadsafe_flag"; then |
1409 cflags_save=$CFLAGS | 1409 cflags_save=$CFLAGS |
1410 CFLAGS="$CFLAGS $threadsafe_flag" | 1410 CFLAGS="$CFLAGS $threadsafe_flag" |
1411 LIBS="$LIBS $thread_lib" | 1411 LIBS="$LIBS $thread_lib" |
1412 AC_TRY_LINK(,[ ], | 1412 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
1413 AC_MSG_RESULT(yes); PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag", | 1413 AC_MSG_RESULT(yes); PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag", |
1414 AC_MSG_RESULT(no); LIBS=$libs_save_old | 1414 AC_MSG_RESULT(no); LIBS=$libs_save_old |
1415 ) | 1415 ) |
1416 CFLAGS=$cflags_save | 1416 CFLAGS=$cflags_save |
1417 else | 1417 else |
1423 AC_MSG_CHECKING([if compile and link flags for Python are sane]) | 1423 AC_MSG_CHECKING([if compile and link flags for Python are sane]) |
1424 cflags_save=$CFLAGS | 1424 cflags_save=$CFLAGS |
1425 libs_save=$LIBS | 1425 libs_save=$LIBS |
1426 CFLAGS="$CFLAGS $PYTHON_CFLAGS" | 1426 CFLAGS="$CFLAGS $PYTHON_CFLAGS" |
1427 LIBS="$LIBS $PYTHON_LIBS" | 1427 LIBS="$LIBS $PYTHON_LIBS" |
1428 AC_TRY_LINK(,[ ], | 1428 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
1429 AC_MSG_RESULT(yes); python_ok=yes, | 1429 AC_MSG_RESULT(yes); python_ok=yes, |
1430 AC_MSG_RESULT(no: PYTHON DISABLED); python_ok=no) | 1430 AC_MSG_RESULT(no: PYTHON DISABLED); python_ok=no) |
1431 CFLAGS=$cflags_save | 1431 CFLAGS=$cflags_save |
1432 LIBS=$libs_save | 1432 LIBS=$libs_save |
1433 if test $python_ok = yes; then | 1433 if test $python_ok = yes; then |
1626 libs_save_old=$LIBS | 1626 libs_save_old=$LIBS |
1627 if test -n "$threadsafe_flag"; then | 1627 if test -n "$threadsafe_flag"; then |
1628 cflags_save=$CFLAGS | 1628 cflags_save=$CFLAGS |
1629 CFLAGS="$CFLAGS $threadsafe_flag" | 1629 CFLAGS="$CFLAGS $threadsafe_flag" |
1630 LIBS="$LIBS $thread_lib" | 1630 LIBS="$LIBS $thread_lib" |
1631 AC_TRY_LINK(,[ ], | 1631 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
1632 AC_MSG_RESULT(yes); PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag", | 1632 AC_MSG_RESULT(yes); PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag", |
1633 AC_MSG_RESULT(no); LIBS=$libs_save_old | 1633 AC_MSG_RESULT(no); LIBS=$libs_save_old |
1634 ) | 1634 ) |
1635 CFLAGS=$cflags_save | 1635 CFLAGS=$cflags_save |
1636 else | 1636 else |
1642 AC_MSG_CHECKING([if compile and link flags for Python 3 are sane]) | 1642 AC_MSG_CHECKING([if compile and link flags for Python 3 are sane]) |
1643 cflags_save=$CFLAGS | 1643 cflags_save=$CFLAGS |
1644 libs_save=$LIBS | 1644 libs_save=$LIBS |
1645 CFLAGS="$CFLAGS $PYTHON3_CFLAGS" | 1645 CFLAGS="$CFLAGS $PYTHON3_CFLAGS" |
1646 LIBS="$LIBS $PYTHON3_LIBS" | 1646 LIBS="$LIBS $PYTHON3_LIBS" |
1647 AC_TRY_LINK(,[ ], | 1647 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
1648 AC_MSG_RESULT(yes); python3_ok=yes, | 1648 AC_MSG_RESULT(yes); python3_ok=yes, |
1649 AC_MSG_RESULT(no: PYTHON3 DISABLED); python3_ok=no) | 1649 AC_MSG_RESULT(no: PYTHON3 DISABLED); python3_ok=no) |
1650 CFLAGS=$cflags_save | 1650 CFLAGS=$cflags_save |
1651 LIBS=$libs_save | 1651 LIBS=$libs_save |
1652 if test "$python3_ok" = yes; then | 1652 if test "$python3_ok" = yes; then |
1790 AC_MSG_CHECKING([if -fPIE can be added for Python]) | 1790 AC_MSG_CHECKING([if -fPIE can be added for Python]) |
1791 cflags_save=$CFLAGS | 1791 cflags_save=$CFLAGS |
1792 libs_save=$LIBS | 1792 libs_save=$LIBS |
1793 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE" | 1793 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE" |
1794 LIBS="$LIBS $PYTHON_LIBS" | 1794 LIBS="$LIBS $PYTHON_LIBS" |
1795 AC_TRY_LINK(,[ ], | 1795 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
1796 AC_MSG_RESULT(yes); fpie_ok=yes, | 1796 AC_MSG_RESULT(yes); fpie_ok=yes, |
1797 AC_MSG_RESULT(no); fpie_ok=no) | 1797 AC_MSG_RESULT(no); fpie_ok=no) |
1798 CFLAGS=$cflags_save | 1798 CFLAGS=$cflags_save |
1799 LIBS=$libs_save | 1799 LIBS=$libs_save |
1800 if test $fpie_ok = yes; then | 1800 if test $fpie_ok = yes; then |
1812 AC_MSG_CHECKING([if -fPIE can be added for Python3]) | 1812 AC_MSG_CHECKING([if -fPIE can be added for Python3]) |
1813 cflags_save=$CFLAGS | 1813 cflags_save=$CFLAGS |
1814 libs_save=$LIBS | 1814 libs_save=$LIBS |
1815 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE" | 1815 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE" |
1816 LIBS="$LIBS $PYTHON3_LIBS" | 1816 LIBS="$LIBS $PYTHON3_LIBS" |
1817 AC_TRY_LINK(,[ ], | 1817 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ ])], |
1818 AC_MSG_RESULT(yes); fpie_ok=yes, | 1818 AC_MSG_RESULT(yes); fpie_ok=yes, |
1819 AC_MSG_RESULT(no); fpie_ok=no) | 1819 AC_MSG_RESULT(no); fpie_ok=no) |
1820 CFLAGS=$cflags_save | 1820 CFLAGS=$cflags_save |
1821 LIBS=$libs_save | 1821 LIBS=$libs_save |
1822 if test $fpie_ok = yes; then | 1822 if test $fpie_ok = yes; then |
2126 else | 2126 else |
2127 AC_CHECK_LIB(socket, socket) | 2127 AC_CHECK_LIB(socket, socket) |
2128 fi | 2128 fi |
2129 | 2129 |
2130 AC_CACHE_CHECK([whether compiling with IPv6 networking is possible], [vim_cv_ipv6_networking], | 2130 AC_CACHE_CHECK([whether compiling with IPv6 networking is possible], [vim_cv_ipv6_networking], |
2131 [AC_TRY_LINK([ | 2131 [AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
2132 #include <stdio.h> | 2132 #include <stdio.h> |
2133 #include <stdlib.h> | 2133 #include <stdlib.h> |
2134 #include <stdarg.h> | 2134 #include <stdarg.h> |
2135 #include <fcntl.h> | 2135 #include <fcntl.h> |
2136 #include <netdb.h> | 2136 #include <netdb.h> |
2151 (void)htons(100); | 2151 (void)htons(100); |
2152 (void)getaddrinfo("microsoft.com", NULL, NULL, &res); | 2152 (void)getaddrinfo("microsoft.com", NULL, NULL, &res); |
2153 if (errno == ECONNREFUSED) | 2153 if (errno == ECONNREFUSED) |
2154 (void)connect(1, (struct sockaddr *)&server, sizeof(server)); | 2154 (void)connect(1, (struct sockaddr *)&server, sizeof(server)); |
2155 (void)freeaddrinfo(res); | 2155 (void)freeaddrinfo(res); |
2156 ], | 2156 ])], |
2157 [vim_cv_ipv6_networking="yes"], | 2157 [vim_cv_ipv6_networking="yes"], |
2158 [vim_cv_ipv6_networking="no"])]) | 2158 [vim_cv_ipv6_networking="no"])]) |
2159 | 2159 |
2160 if test "x$vim_cv_ipv6_networking" = "xyes"; then | 2160 if test "x$vim_cv_ipv6_networking" = "xyes"; then |
2161 AC_DEFINE(FEAT_IPV6) | 2161 AC_DEFINE(FEAT_IPV6) |
2162 AC_CHECK_FUNCS(inet_ntop) | 2162 AC_CHECK_FUNCS(inet_ntop) |
2163 else | 2163 else |
2164 dnl On Solaris we need the nsl library. | 2164 dnl On Solaris we need the nsl library. |
2165 AC_CHECK_LIB(nsl, gethostbyname) | 2165 AC_CHECK_LIB(nsl, gethostbyname) |
2166 AC_CACHE_CHECK([whether compiling with IPv4 networking is possible], [vim_cv_ipv4_networking], | 2166 AC_CACHE_CHECK([whether compiling with IPv4 networking is possible], [vim_cv_ipv4_networking], |
2167 [AC_TRY_LINK([ | 2167 [AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
2168 #include <stdio.h> | 2168 #include <stdio.h> |
2169 #include <stdlib.h> | 2169 #include <stdlib.h> |
2170 #include <stdarg.h> | 2170 #include <stdarg.h> |
2171 #include <fcntl.h> | 2171 #include <fcntl.h> |
2172 #include <netdb.h> | 2172 #include <netdb.h> |
2185 (void)socket(AF_INET, SOCK_STREAM, 0); | 2185 (void)socket(AF_INET, SOCK_STREAM, 0); |
2186 (void)htons(100); | 2186 (void)htons(100); |
2187 (void)gethostbyname("microsoft.com"); | 2187 (void)gethostbyname("microsoft.com"); |
2188 if (errno == ECONNREFUSED) | 2188 if (errno == ECONNREFUSED) |
2189 (void)connect(1, (struct sockaddr *)&server, sizeof(server)); | 2189 (void)connect(1, (struct sockaddr *)&server, sizeof(server)); |
2190 ], | 2190 ])], |
2191 [vim_cv_ipv4_networking="yes"], | 2191 [vim_cv_ipv4_networking="yes"], |
2192 [vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"])]) | 2192 [vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"])]) |
2193 fi | 2193 fi |
2194 fi | 2194 fi |
2195 if test "$enable_netbeans" = "yes"; then | 2195 if test "$enable_netbeans" = "yes"; then |
2354 dnl Xlib.h includes files that don't exist. On some systems X11/Intrinsic.h | 2354 dnl Xlib.h includes files that don't exist. On some systems X11/Intrinsic.h |
2355 dnl is missing. | 2355 dnl is missing. |
2356 AC_MSG_CHECKING(if X11 header files can be found) | 2356 AC_MSG_CHECKING(if X11 header files can be found) |
2357 cflags_save=$CFLAGS | 2357 cflags_save=$CFLAGS |
2358 CFLAGS="$CFLAGS $X_CFLAGS" | 2358 CFLAGS="$CFLAGS $X_CFLAGS" |
2359 AC_TRY_COMPILE([#include <X11/Xlib.h> | 2359 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlib.h> |
2360 #include <X11/Intrinsic.h>], , | 2360 #include <X11/Intrinsic.h>], )], |
2361 AC_MSG_RESULT(yes), | 2361 AC_MSG_RESULT(yes), |
2362 AC_MSG_RESULT(no); no_x=yes) | 2362 AC_MSG_RESULT(no); no_x=yes) |
2363 CFLAGS=$cflags_save | 2363 CFLAGS=$cflags_save |
2364 | 2364 |
2365 if test "${no_x-no}" = yes; then | 2365 if test "${no_x-no}" = yes; then |
2396 if test "$GCC" = yes; then | 2396 if test "$GCC" = yes; then |
2397 CFLAGS="$CFLAGS $X_CFLAGS -Werror" | 2397 CFLAGS="$CFLAGS $X_CFLAGS -Werror" |
2398 else | 2398 else |
2399 CFLAGS="$CFLAGS $X_CFLAGS" | 2399 CFLAGS="$CFLAGS $X_CFLAGS" |
2400 fi | 2400 fi |
2401 AC_TRY_COMPILE([#include <X11/Xlib.h>], , | 2401 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlib.h>], )], |
2402 AC_MSG_RESULT(no), | 2402 AC_MSG_RESULT(no), |
2403 CFLAGS="$CFLAGS -Wno-implicit-int" | 2403 CFLAGS="$CFLAGS -Wno-implicit-int" |
2404 AC_TRY_COMPILE([#include <X11/Xlib.h>], , | 2404 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlib.h>], )], |
2405 AC_MSG_RESULT(yes); cflags_save="$cflags_save -Wno-implicit-int", | 2405 AC_MSG_RESULT(yes); cflags_save="$cflags_save -Wno-implicit-int", |
2406 AC_MSG_RESULT(test failed) | 2406 AC_MSG_RESULT(test failed) |
2407 ) | 2407 ) |
2408 ) | 2408 ) |
2409 CFLAGS=$cflags_save | 2409 CFLAGS=$cflags_save |
2410 | 2410 |
2411 LDFLAGS="$ac_save_LDFLAGS" | 2411 LDFLAGS="$ac_save_LDFLAGS" |
2412 | 2412 |
2413 AC_MSG_CHECKING(size of wchar_t is 2 bytes) | 2413 AC_MSG_CHECKING(size of wchar_t is 2 bytes) |
2414 AC_CACHE_VAL(ac_cv_small_wchar_t, | 2414 AC_CACHE_VAL(ac_cv_small_wchar_t, |
2415 [AC_TRY_RUN([ | 2415 [AC_RUN_IFELSE([AC_LANG_SOURCE([ |
2416 #include <X11/Xlib.h> | 2416 #include <X11/Xlib.h> |
2417 #if STDC_HEADERS | 2417 #if STDC_HEADERS |
2418 # include <stdlib.h> | 2418 # include <stdlib.h> |
2419 # include <stddef.h> | 2419 # include <stddef.h> |
2420 #endif | 2420 #endif |
2421 main() | 2421 main() |
2422 { | 2422 { |
2423 if (sizeof(wchar_t) <= 2) | 2423 if (sizeof(wchar_t) <= 2) |
2424 exit(1); | 2424 exit(1); |
2425 exit(0); | 2425 exit(0); |
2426 }], | 2426 }])], |
2427 ac_cv_small_wchar_t="no", | 2427 ac_cv_small_wchar_t="no", |
2428 ac_cv_small_wchar_t="yes", | 2428 ac_cv_small_wchar_t="yes", |
2429 AC_MSG_ERROR(failed to compile test program))]) | 2429 AC_MSG_ERROR(failed to compile test program))]) |
2430 AC_MSG_RESULT($ac_cv_small_wchar_t) | 2430 AC_MSG_RESULT($ac_cv_small_wchar_t) |
2431 if test "x$ac_cv_small_wchar_t" = "xyes" ; then | 2431 if test "x$ac_cv_small_wchar_t" = "xyes" ; then |
2622 | 2622 |
2623 dnl | 2623 dnl |
2624 dnl Now check if the installed GTK is sufficiently new. | 2624 dnl Now check if the installed GTK is sufficiently new. |
2625 dnl | 2625 dnl |
2626 rm -f conf.gtktest | 2626 rm -f conf.gtktest |
2627 AC_TRY_RUN([ | 2627 AC_RUN_IFELSE([AC_LANG_SOURCE([ |
2628 #include <gtk/gtk.h> | 2628 #include <gtk/gtk.h> |
2629 #include <stdio.h> | 2629 #include <stdio.h> |
2630 #if STDC_HEADERS | 2630 #if STDC_HEADERS |
2631 # include <stdlib.h> | 2631 # include <stdlib.h> |
2632 # include <stddef.h> | 2632 # include <stddef.h> |
2654 { | 2654 { |
2655 return 0; | 2655 return 0; |
2656 } | 2656 } |
2657 return 1; | 2657 return 1; |
2658 } | 2658 } |
2659 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | 2659 ])],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
2660 CFLAGS="$ac_save_CFLAGS" | 2660 CFLAGS="$ac_save_CFLAGS" |
2661 LIBS="$ac_save_LIBS" | 2661 LIBS="$ac_save_LIBS" |
2662 } | 2662 } |
2663 fi | 2663 fi |
2664 if test "x$no_gtk" = x ; then | 2664 if test "x$no_gtk" = x ; then |
3093 if test -z "$SKIP_MOTIF"; then | 3093 if test -z "$SKIP_MOTIF"; then |
3094 cppflags_save=$CPPFLAGS | 3094 cppflags_save=$CPPFLAGS |
3095 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | 3095 CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
3096 dnl Xmu/Editres.h may exist but can only be used after including Intrinsic.h | 3096 dnl Xmu/Editres.h may exist but can only be used after including Intrinsic.h |
3097 AC_MSG_CHECKING([for X11/Xmu/Editres.h]) | 3097 AC_MSG_CHECKING([for X11/Xmu/Editres.h]) |
3098 AC_TRY_COMPILE([ | 3098 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
3099 #include <X11/Intrinsic.h> | 3099 #include <X11/Intrinsic.h> |
3100 #include <X11/Xmu/Editres.h>], | 3100 #include <X11/Xmu/Editres.h>], |
3101 [int i; i = 0;], | 3101 [int i; i = 0;])], |
3102 AC_MSG_RESULT(yes) | 3102 AC_MSG_RESULT(yes) |
3103 AC_DEFINE(HAVE_X11_XMU_EDITRES_H), | 3103 AC_DEFINE(HAVE_X11_XMU_EDITRES_H), |
3104 AC_MSG_RESULT(no)) | 3104 AC_MSG_RESULT(no)) |
3105 CPPFLAGS=$cppflags_save | 3105 CPPFLAGS=$cppflags_save |
3106 fi | 3106 fi |
3108 dnl Only use the Xm directory when compiling Motif. | 3108 dnl Only use the Xm directory when compiling Motif. |
3109 if test -z "$SKIP_MOTIF"; then | 3109 if test -z "$SKIP_MOTIF"; then |
3110 cppflags_save=$CPPFLAGS | 3110 cppflags_save=$CPPFLAGS |
3111 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | 3111 CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
3112 if test "$zOSUnix" = "yes"; then | 3112 if test "$zOSUnix" = "yes"; then |
3113 xmheader="Xm/Xm.h" | 3113 AC_CHECK_HEADERS(Xm/Xm.h) |
3114 else | 3114 else |
3115 xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h | 3115 AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h |
3116 Xm/UnhighlightT.h Xm/Notebook.h" | 3116 Xm/UnhighlightT.h Xm/Notebook.h) |
3117 fi | 3117 fi |
3118 AC_CHECK_HEADERS($xmheader) | |
3119 | 3118 |
3120 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then | 3119 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then |
3121 dnl Solaris uses XpmAttributes_21, very annoying. | 3120 dnl Solaris uses XpmAttributes_21, very annoying. |
3122 AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) | 3121 AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) |
3123 AC_TRY_COMPILE([#include <Xm/XpmP.h>], [XpmAttributes_21 attr;], | 3122 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Xm/XpmP.h>], [XpmAttributes_21 attr;])], |
3124 AC_MSG_RESULT(yes); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes_21), | 3123 AC_MSG_RESULT(yes); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes_21), |
3125 AC_MSG_RESULT(no); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes) | 3124 AC_MSG_RESULT(no); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes) |
3126 ) | 3125 ) |
3127 else | 3126 else |
3128 AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes) | 3127 AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes) |
3230 if test "x$vim_cv_toupper_broken" = "xyes" ; then | 3229 if test "x$vim_cv_toupper_broken" = "xyes" ; then |
3231 AC_DEFINE(BROKEN_TOUPPER) | 3230 AC_DEFINE(BROKEN_TOUPPER) |
3232 fi | 3231 fi |
3233 | 3232 |
3234 AC_MSG_CHECKING(whether __DATE__ and __TIME__ work) | 3233 AC_MSG_CHECKING(whether __DATE__ and __TIME__ work) |
3235 AC_TRY_COMPILE([#include <stdio.h>], [printf("(" __DATE__ " " __TIME__ ")");], | 3234 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [printf("(" __DATE__ " " __TIME__ ")");])], |
3236 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DATE_TIME), | 3235 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DATE_TIME), |
3237 AC_MSG_RESULT(no)) | 3236 AC_MSG_RESULT(no)) |
3238 | 3237 |
3239 AC_MSG_CHECKING(whether __attribute__((unused)) is allowed) | 3238 AC_MSG_CHECKING(whether __attribute__((unused)) is allowed) |
3240 AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));], | 3239 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [int x __attribute__((unused));])], |
3241 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ATTRIBUTE_UNUSED), | 3240 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ATTRIBUTE_UNUSED), |
3242 AC_MSG_RESULT(no)) | 3241 AC_MSG_RESULT(no)) |
3243 | 3242 |
3244 dnl Checks for header files. | 3243 dnl Checks for header files. |
3245 AC_CHECK_HEADER(elf.h, HAS_ELF=1) | 3244 AC_CHECK_HEADER(elf.h, HAS_ELF=1) |
3252 | 3251 |
3253 dnl If sys/wait.h is not found it might still exist but not be POSIX | 3252 dnl If sys/wait.h is not found it might still exist but not be POSIX |
3254 dnl compliant. In that case we define HAVE_UNION_WAIT (for NeXT) | 3253 dnl compliant. In that case we define HAVE_UNION_WAIT (for NeXT) |
3255 if test $ac_cv_header_sys_wait_h = no; then | 3254 if test $ac_cv_header_sys_wait_h = no; then |
3256 AC_MSG_CHECKING([for sys/wait.h that defines union wait]) | 3255 AC_MSG_CHECKING([for sys/wait.h that defines union wait]) |
3257 AC_TRY_COMPILE([#include <sys/wait.h>], | 3256 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/wait.h>], |
3258 [union wait xx, yy; xx = yy], | 3257 [union wait xx, yy; xx = yy])], |
3259 AC_MSG_RESULT(yes) | 3258 AC_MSG_RESULT(yes) |
3260 AC_DEFINE(HAVE_SYS_WAIT_H) | 3259 AC_DEFINE(HAVE_SYS_WAIT_H) |
3261 AC_DEFINE(HAVE_UNION_WAIT), | 3260 AC_DEFINE(HAVE_UNION_WAIT), |
3262 AC_MSG_RESULT(no)) | 3261 AC_MSG_RESULT(no)) |
3263 fi | 3262 fi |
3286 #endif]) | 3285 #endif]) |
3287 | 3286 |
3288 | 3287 |
3289 dnl pthread_np.h may exist but can only be used after including pthread.h | 3288 dnl pthread_np.h may exist but can only be used after including pthread.h |
3290 AC_MSG_CHECKING([for pthread_np.h]) | 3289 AC_MSG_CHECKING([for pthread_np.h]) |
3291 AC_TRY_COMPILE([ | 3290 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
3292 #include <pthread.h> | 3291 #include <pthread.h> |
3293 #include <pthread_np.h>], | 3292 #include <pthread_np.h>], |
3294 [int i; i = 0;], | 3293 [int i; i = 0;])], |
3295 AC_MSG_RESULT(yes) | 3294 AC_MSG_RESULT(yes) |
3296 AC_DEFINE(HAVE_PTHREAD_NP_H), | 3295 AC_DEFINE(HAVE_PTHREAD_NP_H), |
3297 AC_MSG_RESULT(no)) | 3296 AC_MSG_RESULT(no)) |
3298 | 3297 |
3299 AC_CHECK_HEADERS(strings.h) | 3298 AC_CHECK_HEADERS(strings.h) |
3304 | 3303 |
3305 dnl Check if strings.h and string.h can both be included when defined. | 3304 dnl Check if strings.h and string.h can both be included when defined. |
3306 AC_MSG_CHECKING([if strings.h can be included after string.h]) | 3305 AC_MSG_CHECKING([if strings.h can be included after string.h]) |
3307 cppflags_save=$CPPFLAGS | 3306 cppflags_save=$CPPFLAGS |
3308 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | 3307 CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
3309 AC_TRY_COMPILE([ | 3308 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
3310 #if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO) | 3309 #if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO) |
3311 # define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */ | 3310 # define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */ |
3312 /* but don't do it on AIX 5.1 (Uribarri) */ | 3311 /* but don't do it on AIX 5.1 (Uribarri) */ |
3313 #endif | 3312 #endif |
3314 #ifdef HAVE_XM_XM_H | 3313 #ifdef HAVE_XM_XM_H |
3318 # include <string.h> | 3317 # include <string.h> |
3319 #endif | 3318 #endif |
3320 #if defined(HAVE_STRINGS_H) | 3319 #if defined(HAVE_STRINGS_H) |
3321 # include <strings.h> | 3320 # include <strings.h> |
3322 #endif | 3321 #endif |
3323 ], [int i; i = 0;], | 3322 ], [int i; i = 0;])], |
3324 AC_MSG_RESULT(yes), | 3323 AC_MSG_RESULT(yes), |
3325 AC_DEFINE(NO_STRINGS_WITH_STRING_H) | 3324 AC_DEFINE(NO_STRINGS_WITH_STRING_H) |
3326 AC_MSG_RESULT(no)) | 3325 AC_MSG_RESULT(no)) |
3327 CPPFLAGS=$cppflags_save | 3326 CPPFLAGS=$cppflags_save |
3328 fi | 3327 fi |
3391 EOF | 3390 EOF |
3392 fi | 3391 fi |
3393 | 3392 |
3394 dnl BSDI uses ss_base while others use ss_sp for the stack pointer. | 3393 dnl BSDI uses ss_base while others use ss_sp for the stack pointer. |
3395 AC_MSG_CHECKING(whether stack_t has an ss_base field) | 3394 AC_MSG_CHECKING(whether stack_t has an ss_base field) |
3396 AC_TRY_COMPILE([ | 3395 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
3397 #include <sys/types.h> | 3396 #include <sys/types.h> |
3398 #if STDC_HEADERS | 3397 #if STDC_HEADERS |
3399 # include <stdlib.h> | 3398 # include <stdlib.h> |
3400 # include <stddef.h> | 3399 # include <stddef.h> |
3401 #endif | 3400 #endif |
3402 #include <signal.h> | 3401 #include <signal.h> |
3403 #include "confdefs.h" | 3402 #include "confdefs.h" |
3404 ], [stack_t sigstk; sigstk.ss_base = 0; ], | 3403 ], [stack_t sigstk; sigstk.ss_base = 0; ])], |
3405 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SS_BASE), | 3404 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SS_BASE), |
3406 AC_MSG_RESULT(no)) | 3405 AC_MSG_RESULT(no)) |
3407 | 3406 |
3408 olibs="$LIBS" | 3407 olibs="$LIBS" |
3409 AC_MSG_CHECKING(--with-tlib argument) | 3408 AC_MSG_CHECKING(--with-tlib argument) |
3410 AC_ARG_WITH(tlib, [ --with-tlib=library terminal library to be used ],) | 3409 AC_ARG_WITH(tlib, [ --with-tlib=library terminal library to be used ],) |
3411 if test -n "$with_tlib"; then | 3410 if test -n "$with_tlib"; then |
3412 AC_MSG_RESULT($with_tlib) | 3411 AC_MSG_RESULT($with_tlib) |
3413 LIBS="$LIBS -l$with_tlib" | 3412 LIBS="$LIBS -l$with_tlib" |
3414 AC_MSG_CHECKING(for linking with $with_tlib library) | 3413 AC_MSG_CHECKING(for linking with $with_tlib library) |
3415 AC_TRY_LINK([], [], AC_MSG_RESULT(OK), AC_MSG_ERROR(FAILED)) | 3414 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], AC_MSG_RESULT(OK), AC_MSG_ERROR(FAILED)) |
3416 dnl Need to check for tgetent() below. | 3415 dnl Need to check for tgetent() below. |
3417 olibs="$LIBS" | 3416 olibs="$LIBS" |
3418 else | 3417 else |
3419 AC_MSG_RESULT([empty: automatic terminal library selection]) | 3418 AC_MSG_RESULT([empty: automatic terminal library selection]) |
3420 dnl On HP-UX 10.10 termcap or termlib should be used instead of | 3419 dnl On HP-UX 10.10 termcap or termlib should be used instead of |
3432 AC_CHECK_LIB(${libname}, tgetent,,) | 3431 AC_CHECK_LIB(${libname}, tgetent,,) |
3433 if test "x$olibs" != "x$LIBS"; then | 3432 if test "x$olibs" != "x$LIBS"; then |
3434 dnl It's possible that a library is found but it doesn't work | 3433 dnl It's possible that a library is found but it doesn't work |
3435 dnl e.g., shared library that cannot be found | 3434 dnl e.g., shared library that cannot be found |
3436 dnl compile and run a test program to be sure | 3435 dnl compile and run a test program to be sure |
3437 AC_TRY_RUN([ | 3436 AC_RUN_IFELSE([AC_LANG_SOURCE([ |
3438 #ifdef HAVE_TERMCAP_H | 3437 #ifdef HAVE_TERMCAP_H |
3439 # include <termcap.h> | 3438 # include <termcap.h> |
3440 #endif | 3439 #endif |
3441 #if STDC_HEADERS | 3440 #if STDC_HEADERS |
3442 # include <stdlib.h> | 3441 # include <stdlib.h> |
3443 # include <stddef.h> | 3442 # include <stddef.h> |
3444 #endif | 3443 #endif |
3445 main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }], | 3444 main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }])], |
3446 res="OK", res="FAIL", res="FAIL") | 3445 res="OK", res="FAIL", res="FAIL") |
3447 if test "$res" = "OK"; then | 3446 if test "$res" = "OK"; then |
3448 break | 3447 break |
3449 fi | 3448 fi |
3450 AC_MSG_RESULT($libname library is not usable) | 3449 AC_MSG_RESULT($libname library is not usable) |
3456 fi | 3455 fi |
3457 fi | 3456 fi |
3458 | 3457 |
3459 if test "x$olibs" = "x$LIBS"; then | 3458 if test "x$olibs" = "x$LIBS"; then |
3460 AC_MSG_CHECKING([for tgetent()]) | 3459 AC_MSG_CHECKING([for tgetent()]) |
3461 AC_TRY_LINK([int tgetent(char *, const char *);], | 3460 AC_LINK_IFELSE([AC_LANG_PROGRAM([int tgetent(char *, const char *);], |
3462 [char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");], | 3461 [[char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");]])], |
3463 AC_MSG_RESULT(yes), | 3462 AC_MSG_RESULT(yes), |
3464 AC_MSG_ERROR([NOT FOUND! | 3463 AC_MSG_ERROR([NOT FOUND! |
3465 You need to install a terminal library; for example ncurses. | 3464 You need to install a terminal library; for example ncurses. |
3466 On Linux that would be the libncurses-dev package. | 3465 On Linux that would be the libncurses-dev package. |
3467 Or specify the name of the library with --with-tlib.])) | 3466 Or specify the name of the library with --with-tlib.])) |
3521 if test "x$vim_cv_tgetent" = "xzero" ; then | 3520 if test "x$vim_cv_tgetent" = "xzero" ; then |
3522 AC_DEFINE(TGETENT_ZERO_ERR, 0) | 3521 AC_DEFINE(TGETENT_ZERO_ERR, 0) |
3523 fi | 3522 fi |
3524 | 3523 |
3525 AC_MSG_CHECKING(whether termcap.h contains ospeed) | 3524 AC_MSG_CHECKING(whether termcap.h contains ospeed) |
3526 AC_TRY_LINK([ | 3525 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3527 #ifdef HAVE_TERMCAP_H | 3526 #ifdef HAVE_TERMCAP_H |
3528 # include <termcap.h> | 3527 # include <termcap.h> |
3529 #endif | 3528 #endif |
3530 ], [ospeed = 20000], | 3529 ], [ospeed = 20000])], |
3531 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OSPEED), | 3530 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OSPEED), |
3532 [AC_MSG_RESULT(no) | 3531 [AC_MSG_RESULT(no) |
3533 AC_MSG_CHECKING(whether ospeed can be extern) | 3532 AC_MSG_CHECKING(whether ospeed can be extern) |
3534 AC_TRY_LINK([ | 3533 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3535 #ifdef HAVE_TERMCAP_H | 3534 #ifdef HAVE_TERMCAP_H |
3536 # include <termcap.h> | 3535 # include <termcap.h> |
3537 #endif | 3536 #endif |
3538 extern short ospeed; | 3537 extern short ospeed; |
3539 ], [ospeed = 20000], | 3538 ], [ospeed = 20000])], |
3540 AC_MSG_RESULT(yes); AC_DEFINE(OSPEED_EXTERN), | 3539 AC_MSG_RESULT(yes); AC_DEFINE(OSPEED_EXTERN), |
3541 AC_MSG_RESULT(no))] | 3540 AC_MSG_RESULT(no))] |
3542 ) | 3541 ) |
3543 | 3542 |
3544 AC_MSG_CHECKING([whether termcap.h contains UP, BC and PC]) | 3543 AC_MSG_CHECKING([whether termcap.h contains UP, BC and PC]) |
3545 AC_TRY_LINK([ | 3544 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3546 #ifdef HAVE_TERMCAP_H | 3545 #ifdef HAVE_TERMCAP_H |
3547 # include <termcap.h> | 3546 # include <termcap.h> |
3548 #endif | 3547 #endif |
3549 ], [if (UP == 0 && BC == 0) PC = 1], | 3548 ], [if (UP == 0 && BC == 0) PC = 1])], |
3550 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UP_BC_PC), | 3549 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UP_BC_PC), |
3551 [AC_MSG_RESULT(no) | 3550 [AC_MSG_RESULT(no) |
3552 AC_MSG_CHECKING([whether UP, BC and PC can be extern]) | 3551 AC_MSG_CHECKING([whether UP, BC and PC can be extern]) |
3553 AC_TRY_LINK([ | 3552 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3554 #ifdef HAVE_TERMCAP_H | 3553 #ifdef HAVE_TERMCAP_H |
3555 # include <termcap.h> | 3554 # include <termcap.h> |
3556 #endif | 3555 #endif |
3557 extern char *UP, *BC, PC; | 3556 extern char *UP, *BC, PC; |
3558 ], [if (UP == 0 && BC == 0) PC = 1], | 3557 ], [if (UP == 0 && BC == 0) PC = 1])], |
3559 AC_MSG_RESULT(yes); AC_DEFINE(UP_BC_PC_EXTERN), | 3558 AC_MSG_RESULT(yes); AC_DEFINE(UP_BC_PC_EXTERN), |
3560 AC_MSG_RESULT(no))] | 3559 AC_MSG_RESULT(no))] |
3561 ) | 3560 ) |
3562 | 3561 |
3563 AC_MSG_CHECKING(whether tputs() uses outfuntype) | 3562 AC_MSG_CHECKING(whether tputs() uses outfuntype) |
3564 AC_TRY_COMPILE([ | 3563 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
3565 #ifdef HAVE_TERMCAP_H | 3564 #ifdef HAVE_TERMCAP_H |
3566 # include <termcap.h> | 3565 # include <termcap.h> |
3567 #endif | 3566 #endif |
3568 ], [extern int xx(); tputs("test", 1, (outfuntype)xx)], | 3567 ], [extern int xx(); tputs("test", 1, (outfuntype)xx)])], |
3569 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OUTFUNTYPE), | 3568 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OUTFUNTYPE), |
3570 AC_MSG_RESULT(no)) | 3569 AC_MSG_RESULT(no)) |
3571 | 3570 |
3572 AC_MSG_CHECKING([whether del_curterm() can be used]) | 3571 AC_MSG_CHECKING([whether del_curterm() can be used]) |
3573 AC_TRY_LINK([ | 3572 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3574 #ifdef HAVE_TERMCAP_H | 3573 #ifdef HAVE_TERMCAP_H |
3575 # include <termcap.h> | 3574 # include <termcap.h> |
3576 #endif | 3575 #endif |
3577 #include <term.h> | 3576 #include <term.h> |
3578 ], [if (cur_term) del_curterm(cur_term);], | 3577 ], [if (cur_term) del_curterm(cur_term);])], |
3579 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DEL_CURTERM), | 3578 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DEL_CURTERM), |
3580 AC_MSG_RESULT(no)) | 3579 AC_MSG_RESULT(no)) |
3581 | 3580 |
3582 dnl On some SCO machines sys/select redefines struct timeval | 3581 dnl On some SCO machines sys/select redefines struct timeval |
3583 AC_MSG_CHECKING([whether sys/select.h and sys/time.h may both be included]) | 3582 AC_MSG_CHECKING([whether sys/select.h and sys/time.h may both be included]) |
3584 AC_TRY_COMPILE([ | 3583 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
3585 #include <sys/types.h> | 3584 #include <sys/types.h> |
3586 #include <sys/time.h> | 3585 #include <sys/time.h> |
3587 #include <sys/select.h>], , | 3586 #include <sys/select.h>], )], |
3588 AC_MSG_RESULT(yes) | 3587 AC_MSG_RESULT(yes) |
3589 AC_DEFINE(SYS_SELECT_WITH_SYS_TIME), | 3588 AC_DEFINE(SYS_SELECT_WITH_SYS_TIME), |
3590 AC_MSG_RESULT(no)) | 3589 AC_MSG_RESULT(no)) |
3591 | 3590 |
3592 dnl AC_DECL_SYS_SIGLIST | 3591 dnl AC_DECL_SYS_SIGLIST |
3600 AC_MSG_RESULT(no) | 3599 AC_MSG_RESULT(no) |
3601 fi | 3600 fi |
3602 | 3601 |
3603 AC_MSG_CHECKING(for SVR4 ptys) | 3602 AC_MSG_CHECKING(for SVR4 ptys) |
3604 if test -c /dev/ptmx ; then | 3603 if test -c /dev/ptmx ; then |
3605 AC_TRY_LINK([ | 3604 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3606 // These should be in stdlib.h, but it depends on _XOPEN_SOURCE. | 3605 // These should be in stdlib.h, but it depends on _XOPEN_SOURCE. |
3607 char *ptsname(int); | 3606 char *ptsname(int); |
3608 int unlockpt(int); | 3607 int unlockpt(int); |
3609 int grantpt(int); | 3608 int grantpt(int); |
3610 ], [ | 3609 ], [ |
3611 ptsname(0); | 3610 ptsname(0); |
3612 grantpt(0); | 3611 grantpt(0); |
3613 unlockpt(0);], | 3612 unlockpt(0);])], |
3614 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SVR4_PTYS), | 3613 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SVR4_PTYS), |
3615 AC_MSG_RESULT(no)) | 3614 AC_MSG_RESULT(no)) |
3616 else | 3615 else |
3617 AC_MSG_RESULT(no) | 3616 AC_MSG_RESULT(no) |
3618 fi | 3617 fi |
3644 AC_MSG_RESULT([don't know]) | 3643 AC_MSG_RESULT([don't know]) |
3645 fi | 3644 fi |
3646 | 3645 |
3647 dnl Checks for library functions. =================================== | 3646 dnl Checks for library functions. =================================== |
3648 | 3647 |
3648 dnl TODO: this generates an obsolete warning, would need to remove and replace | |
3649 dnl all RETSIGTYPE with "void" and SIGRETURN with "return". | |
3649 AC_TYPE_SIGNAL | 3650 AC_TYPE_SIGNAL |
3650 | 3651 |
3651 dnl find out what to use at the end of a signal function | 3652 dnl find out what to use at the end of a signal function |
3652 if test $ac_cv_type_signal = void; then | 3653 if test $ac_cv_type_signal = void; then |
3653 AC_DEFINE(SIGRETURN, [return]) | 3654 AC_DEFINE(SIGRETURN, [return]) |
3655 AC_DEFINE(SIGRETURN, [return 0]) | 3656 AC_DEFINE(SIGRETURN, [return 0]) |
3656 fi | 3657 fi |
3657 | 3658 |
3658 dnl check if struct sigcontext is defined (used for SGI only) | 3659 dnl check if struct sigcontext is defined (used for SGI only) |
3659 AC_MSG_CHECKING(for struct sigcontext) | 3660 AC_MSG_CHECKING(for struct sigcontext) |
3660 AC_TRY_COMPILE([ | 3661 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
3661 #include <signal.h> | 3662 #include <signal.h> |
3662 test_sig() | 3663 test_sig() |
3663 { | 3664 { |
3664 struct sigcontext *scont; | 3665 struct sigcontext *scont; |
3665 scont = (struct sigcontext *)0; | 3666 scont = (struct sigcontext *)0; |
3666 return 1; | 3667 return 1; |
3667 } ], , | 3668 } ], )], |
3668 AC_MSG_RESULT(yes) | 3669 AC_MSG_RESULT(yes) |
3669 AC_DEFINE(HAVE_SIGCONTEXT), | 3670 AC_DEFINE(HAVE_SIGCONTEXT), |
3670 AC_MSG_RESULT(no)) | 3671 AC_MSG_RESULT(no)) |
3671 | 3672 |
3672 dnl tricky stuff: try to find out if getcwd() is implemented with | 3673 dnl tricky stuff: try to find out if getcwd() is implemented with |
3751 ac_save_LIBS="$LIBS" | 3752 ac_save_LIBS="$LIBS" |
3752 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then | 3753 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then |
3753 CFLAGS="$CFLAGS $canberra_cflags" | 3754 CFLAGS="$CFLAGS $canberra_cflags" |
3754 fi | 3755 fi |
3755 LIBS="$LIBS $canberra_lib" | 3756 LIBS="$LIBS $canberra_lib" |
3756 AC_TRY_LINK([ | 3757 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3757 # include <canberra.h> | 3758 # include <canberra.h> |
3758 ], [ | 3759 ], [ |
3759 ca_context *hello; | 3760 ca_context *hello; |
3760 ca_context_create(&hello);], | 3761 ca_context_create(&hello);])], |
3761 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CANBERRA), | 3762 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CANBERRA), |
3762 AC_MSG_RESULT(no; try installing libcanberra-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS") | 3763 AC_MSG_RESULT(no; try installing libcanberra-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS") |
3763 fi | 3764 fi |
3764 | 3765 |
3765 AC_MSG_CHECKING(--enable-libsodium argument) | 3766 AC_MSG_CHECKING(--enable-libsodium argument) |
3790 AC_MSG_CHECKING(for libsodium) | 3791 AC_MSG_CHECKING(for libsodium) |
3791 ac_save_CFLAGS="$CFLAGS" | 3792 ac_save_CFLAGS="$CFLAGS" |
3792 ac_save_LIBS="$LIBS" | 3793 ac_save_LIBS="$LIBS" |
3793 CFLAGS="$CFLAGS $libsodium_cflags" | 3794 CFLAGS="$CFLAGS $libsodium_cflags" |
3794 LIBS="$LIBS $libsodium_lib" | 3795 LIBS="$LIBS $libsodium_lib" |
3795 AC_TRY_LINK([ | 3796 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3796 # include <sodium.h> | 3797 # include <sodium.h> |
3797 ], [ | 3798 ], [ |
3798 printf("%d", sodium_init()); ], | 3799 printf("%d", sodium_init()); ])], |
3799 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SODIUM), | 3800 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SODIUM), |
3800 AC_MSG_RESULT(no; try installing libsodium-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS") | 3801 AC_MSG_RESULT(no; try installing libsodium-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS") |
3801 fi | 3802 fi |
3802 | 3803 |
3803 dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible | 3804 dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible |
3804 AC_MSG_CHECKING(for st_blksize) | 3805 AC_MSG_CHECKING(for st_blksize) |
3805 AC_TRY_COMPILE( | 3806 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
3806 [#include <sys/types.h> | 3807 [#include <sys/types.h> |
3807 #include <sys/stat.h>], | 3808 #include <sys/stat.h>], |
3808 [ struct stat st; | 3809 [ struct stat st; |
3809 int n; | 3810 int n; |
3810 | 3811 |
3811 stat("/", &st); | 3812 stat("/", &st); |
3812 n = (int)st.st_blksize;], | 3813 n = (int)st.st_blksize;])], |
3813 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ST_BLKSIZE), | 3814 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ST_BLKSIZE), |
3814 AC_MSG_RESULT(no)) | 3815 AC_MSG_RESULT(no)) |
3815 | 3816 |
3816 dnl Check for timer_create. It probably requires the 'rt' library. | 3817 dnl Check for timer_create. It probably requires the 'rt' library. |
3817 AC_MSG_CHECKING([for timer_create]) | 3818 AC_MSG_CHECKING([for timer_create]) |
3818 save_LIBS="$LIBS" | 3819 save_LIBS="$LIBS" |
3819 LIBS="$LIBS -lrt" | 3820 LIBS="$LIBS -lrt" |
3820 AC_TRY_LINK([ | 3821 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3821 #include<signal.h> | 3822 #include<signal.h> |
3822 #include<time.h> | 3823 #include<time.h> |
3823 static void set_flag(union sigval) {} | 3824 static void set_flag(union sigval) {} |
3824 ], [ | 3825 ], [ |
3825 struct timespec ts; | 3826 struct timespec ts; |
3827 timer_t timer_id; | 3828 timer_t timer_id; |
3828 | 3829 |
3829 action.sigev_notify = SIGEV_THREAD; | 3830 action.sigev_notify = SIGEV_THREAD; |
3830 action.sigev_notify_function = set_flag; | 3831 action.sigev_notify_function = set_flag; |
3831 timer_create(CLOCK_REALTIME, &action, &timer_id); | 3832 timer_create(CLOCK_REALTIME, &action, &timer_id); |
3832 ], | 3833 ])], |
3833 AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE), | 3834 AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE), |
3834 LIBS="$save_LIBS" | 3835 LIBS="$save_LIBS" |
3835 AC_TRY_LINK([ | 3836 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3836 #include<signal.h> | 3837 #include<signal.h> |
3837 #include<time.h> | 3838 #include<time.h> |
3838 static void set_flag(union sigval) {} | 3839 static void set_flag(union sigval) {} |
3839 ], [ | 3840 ], [ |
3840 struct timespec ts; | 3841 struct timespec ts; |
3842 timer_t timer_id; | 3843 timer_t timer_id; |
3843 | 3844 |
3844 action.sigev_notify = SIGEV_THREAD; | 3845 action.sigev_notify = SIGEV_THREAD; |
3845 action.sigev_notify_function = set_flag; | 3846 action.sigev_notify_function = set_flag; |
3846 timer_create(CLOCK_REALTIME, &action, &timer_id); | 3847 timer_create(CLOCK_REALTIME, &action, &timer_id); |
3847 ], | 3848 ])], |
3848 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIMER_CREATE), | 3849 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIMER_CREATE), |
3849 AC_MSG_RESULT(no))) | 3850 AC_MSG_RESULT(no))) |
3850 | 3851 |
3851 AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash], | 3852 AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash], |
3852 [ | 3853 [ |
3884 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2 | 3885 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2 |
3885 # st_mtime_n -- AIX 5.2 and above | 3886 # st_mtime_n -- AIX 5.2 and above |
3886 # st_mtimespec.tv_nsec -- Darwin (Mac OSX) | 3887 # st_mtimespec.tv_nsec -- Darwin (Mac OSX) |
3887 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 | 3888 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 |
3888 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val" | 3889 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val" |
3889 AC_TRY_COMPILE([#include <sys/types.h> | 3890 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> |
3890 #include <sys/stat.h>], [struct stat s; s.ST_MTIM_NSEC;], | 3891 #include <sys/stat.h>], [struct stat s; s.ST_MTIM_NSEC;])], |
3891 [ac_cv_struct_st_mtim_nsec=$ac_val; break]) | 3892 [ac_cv_struct_st_mtim_nsec=$ac_val; break]) |
3892 done | 3893 done |
3893 CPPFLAGS="$ac_save_CPPFLAGS" | 3894 CPPFLAGS="$ac_save_CPPFLAGS" |
3894 ]) | 3895 ]) |
3895 if test $ac_cv_struct_st_mtim_nsec != no; then | 3896 if test $ac_cv_struct_st_mtim_nsec != no; then |
3902 dnl Add "-liconv" when possible; Solaris has iconv but use GNU iconv when it | 3903 dnl Add "-liconv" when possible; Solaris has iconv but use GNU iconv when it |
3903 dnl has been installed. | 3904 dnl has been installed. |
3904 AC_MSG_CHECKING(for iconv_open()) | 3905 AC_MSG_CHECKING(for iconv_open()) |
3905 save_LIBS="$LIBS" | 3906 save_LIBS="$LIBS" |
3906 LIBS="$LIBS -liconv" | 3907 LIBS="$LIBS -liconv" |
3907 AC_TRY_LINK([ | 3908 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3908 #ifdef HAVE_ICONV_H | 3909 #ifdef HAVE_ICONV_H |
3909 # include <iconv.h> | 3910 # include <iconv.h> |
3910 #endif | 3911 #endif |
3911 ], [iconv_open("fr", "to");], | 3912 ], [iconv_open("fr", "to");])], |
3912 AC_MSG_RESULT(yes; with -liconv); AC_DEFINE(HAVE_ICONV), | 3913 AC_MSG_RESULT(yes; with -liconv); AC_DEFINE(HAVE_ICONV), |
3913 LIBS="$save_LIBS" | 3914 LIBS="$save_LIBS" |
3914 AC_TRY_LINK([ | 3915 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3915 #ifdef HAVE_ICONV_H | 3916 #ifdef HAVE_ICONV_H |
3916 # include <iconv.h> | 3917 # include <iconv.h> |
3917 #endif | 3918 #endif |
3918 ], [iconv_open("fr", "to");], | 3919 ], [iconv_open("fr", "to");])], |
3919 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ICONV), | 3920 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ICONV), |
3920 AC_MSG_RESULT(no))) | 3921 AC_MSG_RESULT(no))) |
3921 | 3922 |
3922 | 3923 |
3923 AC_MSG_CHECKING(for nl_langinfo(CODESET)) | 3924 AC_MSG_CHECKING(for nl_langinfo(CODESET)) |
3924 AC_TRY_LINK([ | 3925 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3925 #ifdef HAVE_LANGINFO_H | 3926 #ifdef HAVE_LANGINFO_H |
3926 # include <langinfo.h> | 3927 # include <langinfo.h> |
3927 #endif | 3928 #endif |
3928 ], [char *cs = nl_langinfo(CODESET);], | 3929 ], [char *cs = nl_langinfo(CODESET);])], |
3929 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NL_LANGINFO_CODESET), | 3930 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NL_LANGINFO_CODESET), |
3930 AC_MSG_RESULT(no)) | 3931 AC_MSG_RESULT(no)) |
3931 | 3932 |
3932 dnl Need various functions for floating point support. Only enable | 3933 dnl Need various functions for floating point support. Only enable |
3933 dnl floating point when they are all present. | 3934 dnl floating point when they are all present. |
3934 AC_CHECK_LIB(m, strtod) | 3935 AC_CHECK_LIB(m, strtod) |
3935 AC_MSG_CHECKING([for strtod() and other floating point functions]) | 3936 AC_MSG_CHECKING([for strtod() and other floating point functions]) |
3936 AC_TRY_LINK([ | 3937 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3937 #ifdef HAVE_MATH_H | 3938 #ifdef HAVE_MATH_H |
3938 # include <math.h> | 3939 # include <math.h> |
3939 #endif | 3940 #endif |
3940 #if STDC_HEADERS | 3941 #if STDC_HEADERS |
3941 # include <stdlib.h> | 3942 # include <stdlib.h> |
3950 d = pow(1.11, 2.22); | 3951 d = pow(1.11, 2.22); |
3951 d = sqrt(1.11); | 3952 d = sqrt(1.11); |
3952 d = sin(1.11); | 3953 d = sin(1.11); |
3953 d = cos(1.11); | 3954 d = cos(1.11); |
3954 d = atan(1.11); | 3955 d = atan(1.11); |
3955 ], | 3956 ])], |
3956 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOAT_FUNCS), | 3957 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOAT_FUNCS), |
3957 AC_MSG_RESULT(no)) | 3958 AC_MSG_RESULT(no)) |
3958 | 3959 |
3959 dnl isinf() and isnan() need to include header files and may need -lm. | 3960 dnl isinf() and isnan() need to include header files and may need -lm. |
3960 AC_MSG_CHECKING([for isinf()]) | 3961 AC_MSG_CHECKING([for isinf()]) |
3961 AC_TRY_LINK([ | 3962 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3962 #ifdef HAVE_MATH_H | 3963 #ifdef HAVE_MATH_H |
3963 # include <math.h> | 3964 # include <math.h> |
3964 #endif | 3965 #endif |
3965 #if STDC_HEADERS | 3966 #if STDC_HEADERS |
3966 # include <stdlib.h> | 3967 # include <stdlib.h> |
3967 # include <stddef.h> | 3968 # include <stddef.h> |
3968 #endif | 3969 #endif |
3969 ], [int r = isinf(1.11); ], | 3970 ], [int r = isinf(1.11); ])], |
3970 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISINF), | 3971 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISINF), |
3971 AC_MSG_RESULT(no)) | 3972 AC_MSG_RESULT(no)) |
3972 | 3973 |
3973 AC_MSG_CHECKING([for isnan()]) | 3974 AC_MSG_CHECKING([for isnan()]) |
3974 AC_TRY_LINK([ | 3975 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3975 #ifdef HAVE_MATH_H | 3976 #ifdef HAVE_MATH_H |
3976 # include <math.h> | 3977 # include <math.h> |
3977 #endif | 3978 #endif |
3978 #if STDC_HEADERS | 3979 #if STDC_HEADERS |
3979 # include <stdlib.h> | 3980 # include <stdlib.h> |
3980 # include <stddef.h> | 3981 # include <stddef.h> |
3981 #endif | 3982 #endif |
3982 ], [int r = isnan(1.11); ], | 3983 ], [int r = isnan(1.11); ])], |
3983 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISNAN), | 3984 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISNAN), |
3984 AC_MSG_RESULT(no)) | 3985 AC_MSG_RESULT(no)) |
3985 | 3986 |
3986 dnl Link with -lposix1e for ACL stuff; if not found, try -lacl for SGI | 3987 dnl Link with -lposix1e for ACL stuff; if not found, try -lacl for SGI |
3987 dnl when -lacl works, also try to use -lattr (required for Debian). | 3988 dnl when -lacl works, also try to use -lattr (required for Debian). |
3995 AC_CHECK_LIB(posix1e, acl_get_file, [LIBS="$LIBS -lposix1e"], | 3996 AC_CHECK_LIB(posix1e, acl_get_file, [LIBS="$LIBS -lposix1e"], |
3996 AC_CHECK_LIB(acl, acl_get_file, [LIBS="$LIBS -lacl" | 3997 AC_CHECK_LIB(acl, acl_get_file, [LIBS="$LIBS -lacl" |
3997 AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),) | 3998 AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),) |
3998 | 3999 |
3999 AC_MSG_CHECKING(for POSIX ACL support) | 4000 AC_MSG_CHECKING(for POSIX ACL support) |
4000 AC_TRY_LINK([ | 4001 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
4001 #include <sys/types.h> | 4002 #include <sys/types.h> |
4002 #ifdef HAVE_SYS_ACL_H | 4003 #ifdef HAVE_SYS_ACL_H |
4003 # include <sys/acl.h> | 4004 # include <sys/acl.h> |
4004 #endif | 4005 #endif |
4005 acl_t acl;], [acl = acl_get_file("foo", ACL_TYPE_ACCESS); | 4006 acl_t acl;], [acl = acl_get_file("foo", ACL_TYPE_ACCESS); |
4006 acl_set_file("foo", ACL_TYPE_ACCESS, acl); | 4007 acl_set_file("foo", ACL_TYPE_ACCESS, acl); |
4007 acl_free(acl);], | 4008 acl_free(acl);])], |
4008 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_POSIX_ACL), | 4009 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_POSIX_ACL), |
4009 AC_MSG_RESULT(no)) | 4010 AC_MSG_RESULT(no)) |
4010 | 4011 |
4011 AC_CHECK_LIB(sec, acl_get, [LIBS="$LIBS -lsec"; AC_DEFINE(HAVE_SOLARIS_ZFS_ACL)], | 4012 AC_CHECK_LIB(sec, acl_get, [LIBS="$LIBS -lsec"; AC_DEFINE(HAVE_SOLARIS_ZFS_ACL)], |
4012 AC_MSG_CHECKING(for Solaris ACL support) | 4013 AC_MSG_CHECKING(for Solaris ACL support) |
4013 AC_TRY_LINK([ | 4014 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
4014 #ifdef HAVE_SYS_ACL_H | 4015 #ifdef HAVE_SYS_ACL_H |
4015 # include <sys/acl.h> | 4016 # include <sys/acl.h> |
4016 #endif], [acl("foo", GETACLCNT, 0, NULL); | 4017 #endif], [acl("foo", GETACLCNT, 0, NULL); |
4017 ], | 4018 ])], |
4018 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOLARIS_ACL), | 4019 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOLARIS_ACL), |
4019 AC_MSG_RESULT(no))) | 4020 AC_MSG_RESULT(no))) |
4020 | 4021 |
4021 AC_MSG_CHECKING(for AIX ACL support) | 4022 AC_MSG_CHECKING(for AIX ACL support) |
4022 AC_TRY_LINK([ | 4023 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
4023 #if STDC_HEADERS | 4024 #if STDC_HEADERS |
4024 # include <stdlib.h> | 4025 # include <stdlib.h> |
4025 # include <stddef.h> | 4026 # include <stddef.h> |
4026 #endif | 4027 #endif |
4027 #ifdef HAVE_SYS_ACL_H | 4028 #ifdef HAVE_SYS_ACL_H |
4036 | 4037 |
4037 int aclsize; | 4038 int aclsize; |
4038 struct acl *aclent;], [aclsize = sizeof(struct acl); | 4039 struct acl *aclent;], [aclsize = sizeof(struct acl); |
4039 aclent = (void *)malloc(aclsize); | 4040 aclent = (void *)malloc(aclsize); |
4040 statacl("foo", STX_NORMAL, aclent, aclsize); | 4041 statacl("foo", STX_NORMAL, aclent, aclsize); |
4041 ], | 4042 ])], |
4042 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_AIX_ACL), | 4043 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_AIX_ACL), |
4043 AC_MSG_RESULT(no)) | 4044 AC_MSG_RESULT(no)) |
4044 else | 4045 else |
4045 AC_MSG_RESULT(yes) | 4046 AC_MSG_RESULT(yes) |
4046 fi | 4047 fi |
4050 AC_MSG_CHECKING(for pango_shape_full) | 4051 AC_MSG_CHECKING(for pango_shape_full) |
4051 ac_save_CFLAGS="$CFLAGS" | 4052 ac_save_CFLAGS="$CFLAGS" |
4052 ac_save_LIBS="$LIBS" | 4053 ac_save_LIBS="$LIBS" |
4053 CFLAGS="$CFLAGS $GTK_CFLAGS" | 4054 CFLAGS="$CFLAGS $GTK_CFLAGS" |
4054 LIBS="$LIBS $GTK_LIBS" | 4055 LIBS="$LIBS $GTK_LIBS" |
4055 AC_TRY_LINK( | 4056 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4056 [#include <gtk/gtk.h>], | 4057 [#include <gtk/gtk.h>], |
4057 [ pango_shape_full(NULL, 0, NULL, 0, NULL, NULL); ], | 4058 [ pango_shape_full(NULL, 0, NULL, 0, NULL, NULL); ])], |
4058 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_PANGO_SHAPE_FULL), | 4059 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_PANGO_SHAPE_FULL), |
4059 AC_MSG_RESULT(no)) | 4060 AC_MSG_RESULT(no)) |
4060 CFLAGS="$ac_save_CFLAGS" | 4061 CFLAGS="$ac_save_CFLAGS" |
4061 LIBS="$ac_save_LIBS" | 4062 LIBS="$ac_save_LIBS" |
4062 fi | 4063 fi |
4069 if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then | 4070 if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then |
4070 AC_MSG_RESULT($enable_gpm) | 4071 AC_MSG_RESULT($enable_gpm) |
4071 dnl Checking if gpm support can be compiled | 4072 dnl Checking if gpm support can be compiled |
4072 AC_CACHE_CHECK([for gpm], vi_cv_have_gpm, | 4073 AC_CACHE_CHECK([for gpm], vi_cv_have_gpm, |
4073 [olibs="$LIBS" ; LIBS="-lgpm"] | 4074 [olibs="$LIBS" ; LIBS="-lgpm"] |
4074 AC_TRY_LINK( | 4075 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4075 [#include <gpm.h> | 4076 [#include <gpm.h> |
4076 #include <linux/keyboard.h>], | 4077 #include <linux/keyboard.h>], |
4077 [Gpm_GetLibVersion(NULL);], | 4078 [Gpm_GetLibVersion(NULL);])], |
4078 dnl Configure defines HAVE_GPM, if it is defined feature.h defines | 4079 dnl Configure defines HAVE_GPM, if it is defined feature.h defines |
4079 dnl FEAT_MOUSE_GPM if mouse support is included | 4080 dnl FEAT_MOUSE_GPM if mouse support is included |
4080 [vi_cv_have_gpm=yes], | 4081 [vi_cv_have_gpm=yes], |
4081 [vi_cv_have_gpm=no]) | 4082 [vi_cv_have_gpm=no]) |
4082 [LIBS="$olibs"] | 4083 [LIBS="$olibs"] |
4102 AC_MSG_RESULT(no) | 4103 AC_MSG_RESULT(no) |
4103 dnl Checking if sysmouse support can be compiled | 4104 dnl Checking if sysmouse support can be compiled |
4104 dnl Configure defines HAVE_SYSMOUSE, if it is defined feature.h | 4105 dnl Configure defines HAVE_SYSMOUSE, if it is defined feature.h |
4105 dnl defines FEAT_SYSMOUSE if mouse support is included | 4106 dnl defines FEAT_SYSMOUSE if mouse support is included |
4106 AC_CACHE_CHECK([for sysmouse], vi_cv_have_sysmouse, | 4107 AC_CACHE_CHECK([for sysmouse], vi_cv_have_sysmouse, |
4107 AC_TRY_LINK( | 4108 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4108 [#include <sys/consio.h> | 4109 [#include <sys/consio.h> |
4109 #include <signal.h> | 4110 #include <signal.h> |
4110 #include <sys/fbio.h>], | 4111 #include <sys/fbio.h>], |
4111 [struct mouse_info mouse; | 4112 [struct mouse_info mouse; |
4112 mouse.operation = MOUSE_MODE; | 4113 mouse.operation = MOUSE_MODE; |
4113 mouse.operation = MOUSE_SHOW; | 4114 mouse.operation = MOUSE_SHOW; |
4114 mouse.u.mode.mode = 0; | 4115 mouse.u.mode.mode = 0; |
4115 mouse.u.mode.signal = SIGUSR2;], | 4116 mouse.u.mode.signal = SIGUSR2;])], |
4116 [vi_cv_have_sysmouse=yes], | 4117 [vi_cv_have_sysmouse=yes], |
4117 [vi_cv_have_sysmouse=no]) | 4118 [vi_cv_have_sysmouse=no]) |
4118 ) | 4119 ) |
4119 if test $vi_cv_have_sysmouse = yes; then | 4120 if test $vi_cv_have_sysmouse = yes; then |
4120 AC_DEFINE(HAVE_SYSMOUSE) | 4121 AC_DEFINE(HAVE_SYSMOUSE) |
4123 AC_MSG_RESULT(yes) | 4124 AC_MSG_RESULT(yes) |
4124 fi | 4125 fi |
4125 | 4126 |
4126 dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known | 4127 dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known |
4127 AC_MSG_CHECKING(for FD_CLOEXEC) | 4128 AC_MSG_CHECKING(for FD_CLOEXEC) |
4128 AC_TRY_COMPILE( | 4129 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
4129 [#if HAVE_FCNTL_H | 4130 [#if HAVE_FCNTL_H |
4130 # include <fcntl.h> | 4131 # include <fcntl.h> |
4131 #endif], | 4132 #endif], |
4132 [ int flag = FD_CLOEXEC;], | 4133 [ int flag = FD_CLOEXEC;])], |
4133 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FD_CLOEXEC), | 4134 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FD_CLOEXEC), |
4134 AC_MSG_RESULT(not usable)) | 4135 AC_MSG_RESULT(not usable)) |
4135 | 4136 |
4136 dnl rename needs to be checked separately to work on Nextstep with cc | 4137 dnl rename needs to be checked separately to work on Nextstep with cc |
4137 AC_MSG_CHECKING(for rename) | 4138 AC_MSG_CHECKING(for rename) |
4138 AC_TRY_LINK([#include <stdio.h>], [rename("this", "that")], | 4139 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [rename("this", "that")])], |
4139 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_RENAME), | 4140 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_RENAME), |
4140 AC_MSG_RESULT(no)) | 4141 AC_MSG_RESULT(no)) |
4141 | 4142 |
4142 dnl check for dirfd() | 4143 dnl check for dirfd() |
4143 AC_MSG_CHECKING(for dirfd) | 4144 AC_MSG_CHECKING(for dirfd) |
4144 AC_TRY_LINK( | 4145 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4145 [#include <sys/types.h> | 4146 [#include <sys/types.h> |
4146 #include <dirent.h>], | 4147 #include <dirent.h>], |
4147 [DIR * dir=opendir("dirname"); dirfd(dir);], | 4148 [DIR * dir=opendir("dirname"); dirfd(dir);])], |
4148 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DIRFD), AC_MSG_RESULT(not usable)) | 4149 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DIRFD), AC_MSG_RESULT(not usable)) |
4149 | 4150 |
4150 dnl check for flock() | 4151 dnl check for flock() |
4151 AC_MSG_CHECKING(for flock) | 4152 AC_MSG_CHECKING(for flock) |
4152 AC_TRY_LINK( | 4153 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4153 [#include <sys/file.h>], | 4154 [#include <sys/file.h>], |
4154 [flock(10, LOCK_SH);], | 4155 [flock(10, LOCK_SH);])], |
4155 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOCK), AC_MSG_RESULT(not usable)) | 4156 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOCK), AC_MSG_RESULT(not usable)) |
4156 | 4157 |
4157 dnl sysctl() may exist but not the arguments we use | 4158 dnl sysctl() may exist but not the arguments we use |
4158 AC_MSG_CHECKING(for sysctl) | 4159 AC_MSG_CHECKING(for sysctl) |
4159 AC_TRY_COMPILE( | 4160 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
4160 [#include <sys/types.h> | 4161 [#include <sys/types.h> |
4161 #include <sys/sysctl.h>], | 4162 #include <sys/sysctl.h>], |
4162 [ int mib[2], r; | 4163 [[ int mib[2], r; |
4163 size_t len; | 4164 size_t len; |
4164 | 4165 |
4165 mib[0] = CTL_HW; | 4166 mib[0] = CTL_HW; |
4166 mib[1] = HW_USERMEM; | 4167 mib[1] = HW_USERMEM; |
4167 len = sizeof(r); | 4168 len = sizeof(r); |
4168 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0); | 4169 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0); |
4169 ], | 4170 ]])], |
4170 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL), | 4171 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL), |
4171 AC_MSG_RESULT(not usable)) | 4172 AC_MSG_RESULT(not usable)) |
4172 | 4173 |
4173 dnl sysinfo() may exist but not be Linux compatible. | 4174 dnl sysinfo() may exist but not be Linux compatible. |
4174 dnl On some FreeBSD systems it may depend on libsysinfo, use TRY_LINK | 4175 dnl On some FreeBSD systems it may depend on libsysinfo, try to link |
4175 AC_MSG_CHECKING(for sysinfo) | 4176 AC_MSG_CHECKING(for sysinfo) |
4176 AC_TRY_LINK( | 4177 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4177 [#include <sys/types.h> | 4178 [#include <sys/types.h> |
4178 #include <sys/sysinfo.h>], | 4179 #include <sys/sysinfo.h>], |
4179 [ struct sysinfo sinfo; | 4180 [ struct sysinfo sinfo; |
4180 int t; | 4181 int t; |
4181 | 4182 |
4182 (void)sysinfo(&sinfo); | 4183 (void)sysinfo(&sinfo); |
4183 t = sinfo.totalram; | 4184 t = sinfo.totalram; |
4184 ], | 4185 ])], |
4185 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO), | 4186 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO), |
4186 AC_MSG_RESULT(not usable)) | 4187 AC_MSG_RESULT(not usable)) |
4187 | 4188 |
4188 dnl struct sysinfo may have the mem_unit field or not | 4189 dnl struct sysinfo may have the mem_unit field or not |
4189 AC_MSG_CHECKING(for sysinfo.mem_unit) | 4190 AC_MSG_CHECKING(for sysinfo.mem_unit) |
4190 AC_TRY_COMPILE( | 4191 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
4191 [#include <sys/types.h> | 4192 [#include <sys/types.h> |
4192 #include <sys/sysinfo.h>], | 4193 #include <sys/sysinfo.h>], |
4193 [ struct sysinfo sinfo; | 4194 [ struct sysinfo sinfo; |
4194 sinfo.mem_unit = 1; | 4195 sinfo.mem_unit = 1; |
4195 ], | 4196 ])], |
4196 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT), | 4197 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT), |
4197 AC_MSG_RESULT(no)) | 4198 AC_MSG_RESULT(no)) |
4198 | 4199 |
4199 dnl struct sysinfo may have the uptime field or not | 4200 dnl struct sysinfo may have the uptime field or not |
4200 AC_MSG_CHECKING(for sysinfo.uptime) | 4201 AC_MSG_CHECKING(for sysinfo.uptime) |
4201 AC_TRY_COMPILE( | 4202 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
4202 [#include <sys/types.h> | 4203 [#include <sys/types.h> |
4203 #include <sys/sysinfo.h>], | 4204 #include <sys/sysinfo.h>], |
4204 [ struct sysinfo sinfo; | 4205 [ struct sysinfo sinfo; |
4205 long ut; | 4206 long ut; |
4206 | 4207 |
4207 (void)sysinfo(&sinfo); | 4208 (void)sysinfo(&sinfo); |
4208 ut = sinfo.uptime; | 4209 ut = sinfo.uptime; |
4209 ], | 4210 ])], |
4210 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_UPTIME), | 4211 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_UPTIME), |
4211 AC_MSG_RESULT(no)) | 4212 AC_MSG_RESULT(no)) |
4212 | 4213 |
4213 dnl sysconf() may exist but not support what we want to use | 4214 dnl sysconf() may exist but not support what we want to use |
4214 AC_MSG_CHECKING(for sysconf) | 4215 AC_MSG_CHECKING(for sysconf) |
4215 AC_TRY_COMPILE( | 4216 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
4216 [#include <unistd.h>], | 4217 [#include <unistd.h>], |
4217 [ (void)sysconf(_SC_PAGESIZE); | 4218 [ (void)sysconf(_SC_PAGESIZE); |
4218 (void)sysconf(_SC_PHYS_PAGES); | 4219 (void)sysconf(_SC_PHYS_PAGES); |
4219 ], | 4220 ])], |
4220 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF), | 4221 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF), |
4221 AC_MSG_RESULT(not usable)) | 4222 AC_MSG_RESULT(not usable)) |
4222 | 4223 |
4223 dnl check if we have _SC_SIGSTKSZ via sysconf() | 4224 dnl check if we have _SC_SIGSTKSZ via sysconf() |
4224 AC_MSG_CHECKING(for _SC_SIGSTKSZ via sysconf()) | 4225 AC_MSG_CHECKING(for _SC_SIGSTKSZ via sysconf()) |
4225 AC_TRY_COMPILE( | 4226 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
4226 [#include <unistd.h>], | 4227 [#include <unistd.h>], |
4227 [ (void)sysconf(_SC_SIGSTKSZ); | 4228 [ (void)sysconf(_SC_SIGSTKSZ); |
4228 ], | 4229 ])], |
4229 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF_SIGSTKSZ), | 4230 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF_SIGSTKSZ), |
4230 AC_MSG_RESULT(not usable)) | 4231 AC_MSG_RESULT(not usable)) |
4231 | 4232 |
4232 AC_CHECK_SIZEOF([int]) | 4233 AC_CHECK_SIZEOF([int]) |
4233 AC_CHECK_SIZEOF([long]) | 4234 AC_CHECK_SIZEOF([long]) |
4238 AC_DEFINE_UNQUOTED(VIM_SIZEOF_INT, [$ac_cv_sizeof_int]) | 4239 AC_DEFINE_UNQUOTED(VIM_SIZEOF_INT, [$ac_cv_sizeof_int]) |
4239 AC_DEFINE_UNQUOTED(VIM_SIZEOF_LONG, [$ac_cv_sizeof_long]) | 4240 AC_DEFINE_UNQUOTED(VIM_SIZEOF_LONG, [$ac_cv_sizeof_long]) |
4240 | 4241 |
4241 dnl Make sure that uint32_t is really 32 bits unsigned. | 4242 dnl Make sure that uint32_t is really 32 bits unsigned. |
4242 AC_MSG_CHECKING([uint32_t is 32 bits]) | 4243 AC_MSG_CHECKING([uint32_t is 32 bits]) |
4243 AC_TRY_RUN([ | 4244 AC_RUN_IFELSE([AC_LANG_SOURCE([ |
4244 #ifdef HAVE_STDINT_H | 4245 #ifdef HAVE_STDINT_H |
4245 # include <stdint.h> | 4246 # include <stdint.h> |
4246 #endif | 4247 #endif |
4247 #ifdef HAVE_INTTYPES_H | 4248 #ifdef HAVE_INTTYPES_H |
4248 # include <inttypes.h> | 4249 # include <inttypes.h> |
4250 main() { | 4251 main() { |
4251 uint32_t nr1 = (uint32_t)-1; | 4252 uint32_t nr1 = (uint32_t)-1; |
4252 uint32_t nr2 = (uint32_t)0xffffffffUL; | 4253 uint32_t nr2 = (uint32_t)0xffffffffUL; |
4253 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1; | 4254 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1; |
4254 return 0; | 4255 return 0; |
4255 }], | 4256 }])], |
4256 AC_MSG_RESULT(ok), | 4257 AC_MSG_RESULT(ok), |
4257 AC_MSG_ERROR([WRONG! uint32_t not defined correctly.]), | 4258 AC_MSG_ERROR([WRONG! uint32_t not defined correctly.]), |
4258 AC_MSG_WARN([cannot check uint32_t when cross-compiling.])) | 4259 AC_MSG_WARN([cannot check uint32_t when cross-compiling.])) |
4259 | 4260 |
4260 dnl Check for memmove() before bcopy(), makes memmove() be used when both are | 4261 dnl Check for memmove() before bcopy(), makes memmove() be used when both are |
4339 libs_save=$LIBS | 4340 libs_save=$LIBS |
4340 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS" | 4341 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS" |
4341 CFLAGS="$CFLAGS $X_CFLAGS" | 4342 CFLAGS="$CFLAGS $X_CFLAGS" |
4342 | 4343 |
4343 AC_MSG_CHECKING(whether X_LOCALE needed) | 4344 AC_MSG_CHECKING(whether X_LOCALE needed) |
4344 AC_TRY_COMPILE([#include <X11/Xlocale.h>],, | 4345 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <X11/Xlocale.h>],)], |
4345 AC_TRY_LINK_FUNC([_Xsetlocale], [AC_MSG_RESULT(yes) | 4346 AC_LINK_IFELSE([AC_LANG_CALL([],[_Xsetlocale])], [AC_MSG_RESULT(yes) |
4346 AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)), | 4347 AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)), |
4347 AC_MSG_RESULT(no)) | 4348 AC_MSG_RESULT(no)) |
4348 | 4349 |
4349 AC_MSG_CHECKING(whether Xutf8SetWMProperties() can be used) | 4350 AC_MSG_CHECKING(whether Xutf8SetWMProperties() can be used) |
4350 AC_TRY_LINK_FUNC([Xutf8SetWMProperties], [AC_MSG_RESULT(yes) | 4351 AC_LINK_IFELSE([AC_LANG_CALL([],[Xutf8SetWMProperties])], [AC_MSG_RESULT(yes) |
4351 AC_DEFINE(HAVE_XUTF8SETWMPROPERTIES)], AC_MSG_RESULT(no)) | 4352 AC_DEFINE(HAVE_XUTF8SETWMPROPERTIES)], AC_MSG_RESULT(no)) |
4352 | 4353 |
4353 CFLAGS=$cflags_save | 4354 CFLAGS=$cflags_save |
4354 LIBS=$libs_save | 4355 LIBS=$libs_save |
4355 fi | 4356 fi |
4364 dnl -s for static functions (Elvis ctags only?) | 4365 dnl -s for static functions (Elvis ctags only?) |
4365 dnl -v for variables. Dangerous, most ctags take this for 'vgrind style'. | 4366 dnl -v for variables. Dangerous, most ctags take this for 'vgrind style'. |
4366 dnl -i+m to test for older Exuberant ctags | 4367 dnl -i+m to test for older Exuberant ctags |
4367 AC_MSG_CHECKING(how to create tags) | 4368 AC_MSG_CHECKING(how to create tags) |
4368 test -f tags && mv tags tags.save | 4369 test -f tags && mv tags tags.save |
4369 if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then | 4370 if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1; then |
4370 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" | 4371 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" |
4371 elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then | 4372 elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1; then |
4372 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" | 4373 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" |
4373 elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then | 4374 elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1; then |
4374 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" | 4375 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S" |
4375 else | 4376 else |
4376 TAGPRG="ctags" | 4377 TAGPRG="ctags" |
4377 (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" | 4378 (eval etags /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="etags" |
4378 (eval etags -c /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags -c" | 4379 (eval etags -c /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="etags -c" |
4379 (eval ctags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags" | 4380 (eval ctags /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags" |
4380 (eval ctags -t /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -t" | 4381 (eval ctags -t /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags -t" |
4381 (eval ctags -ts /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -ts" | 4382 (eval ctags -ts /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags -ts" |
4382 (eval ctags -tvs /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -tvs" | 4383 (eval ctags -tvs /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags -tvs" |
4383 (eval ctags -i+m /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -i+m" | 4384 (eval ctags -i+m /dev/null) < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&1 && TAGPRG="ctags -i+m" |
4384 fi | 4385 fi |
4385 test -f tags.save && mv tags.save tags | 4386 test -f tags.save && mv tags.save tags |
4386 AC_MSG_RESULT($TAGPRG) AC_SUBST(TAGPRG) | 4387 AC_MSG_RESULT($TAGPRG) AC_SUBST(TAGPRG) |
4387 | 4388 |
4388 dnl Check how we can run man with a section number | 4389 dnl Check how we can run man with a section number |
4389 AC_MSG_CHECKING(how to run man with a section nr) | 4390 AC_MSG_CHECKING(how to run man with a section nr) |
4390 MANDEF="man" | 4391 MANDEF="man" |
4391 (eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&AC_FD_CC && MANDEF="man -s" | 4392 (eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&AS_MESSAGE_LOG_FD && MANDEF="man -s" |
4392 AC_MSG_RESULT($MANDEF) | 4393 AC_MSG_RESULT($MANDEF) |
4393 if test "$MANDEF" = "man -s"; then | 4394 if test "$MANDEF" = "man -s"; then |
4394 AC_DEFINE(USEMAN_S) | 4395 AC_DEFINE(USEMAN_S) |
4395 fi | 4396 fi |
4396 | 4397 |
4416 if test -f po/Makefile; then | 4417 if test -f po/Makefile; then |
4417 have_gettext="no" | 4418 have_gettext="no" |
4418 if test -n "$MSGFMT"; then | 4419 if test -n "$MSGFMT"; then |
4419 olibs=$LIBS | 4420 olibs=$LIBS |
4420 LIBS="" | 4421 LIBS="" |
4421 AC_TRY_LINK( | 4422 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4422 [#include <libintl.h>], | 4423 [#include <libintl.h>], |
4423 [gettext("Test");], | 4424 [gettext("Test");])], |
4424 AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs, | 4425 AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs, |
4425 LIBS="-lintl" | 4426 LIBS="-lintl" |
4426 AC_TRY_LINK( | 4427 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4427 [#include <libintl.h>], | 4428 [#include <libintl.h>], |
4428 [gettext("Test");], | 4429 [gettext("Test");])], |
4429 AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes"; | 4430 AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes"; |
4430 LIBS="$olibs -lintl", | 4431 LIBS="$olibs -lintl", |
4431 AC_MSG_RESULT([gettext() doesn't work]); | 4432 AC_MSG_RESULT([gettext() doesn't work]); |
4432 LIBS=$olibs)) | 4433 LIBS=$olibs)) |
4433 else | 4434 else |
4439 AC_SUBST(MAKEMO) | 4440 AC_SUBST(MAKEMO) |
4440 dnl this was added in GNU gettext 0.10.36 | 4441 dnl this was added in GNU gettext 0.10.36 |
4441 AC_CHECK_FUNCS(bind_textdomain_codeset) | 4442 AC_CHECK_FUNCS(bind_textdomain_codeset) |
4442 dnl _nl_msg_cat_cntr is required for GNU gettext | 4443 dnl _nl_msg_cat_cntr is required for GNU gettext |
4443 AC_MSG_CHECKING([for _nl_msg_cat_cntr]) | 4444 AC_MSG_CHECKING([for _nl_msg_cat_cntr]) |
4444 AC_TRY_LINK( | 4445 AC_LINK_IFELSE([AC_LANG_PROGRAM( |
4445 [#include <libintl.h> | 4446 [#include <libintl.h> |
4446 extern int _nl_msg_cat_cntr;], | 4447 extern int _nl_msg_cat_cntr;], |
4447 [++_nl_msg_cat_cntr;], | 4448 [++_nl_msg_cat_cntr;])], |
4448 AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_NL_MSG_CAT_CNTR), | 4449 AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_NL_MSG_CAT_CNTR), |
4449 AC_MSG_RESULT([no])) | 4450 AC_MSG_RESULT([no])) |
4450 AC_MSG_CHECKING([if msgfmt supports --desktop]) | 4451 AC_MSG_CHECKING([if msgfmt supports --desktop]) |
4451 MSGFMT_DESKTOP= | 4452 MSGFMT_DESKTOP= |
4452 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then | 4453 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then |
4473 dnl Check for dynamic linking loader | 4474 dnl Check for dynamic linking loader |
4474 AC_CHECK_HEADER(dlfcn.h, DLL=dlfcn.h, [AC_CHECK_HEADER(dl.h, DLL=dl.h)]) | 4475 AC_CHECK_HEADER(dlfcn.h, DLL=dlfcn.h, [AC_CHECK_HEADER(dl.h, DLL=dl.h)]) |
4475 if test x${DLL} = xdlfcn.h; then | 4476 if test x${DLL} = xdlfcn.h; then |
4476 AC_DEFINE(HAVE_DLFCN_H, 1, [ Define if we have dlfcn.h. ]) | 4477 AC_DEFINE(HAVE_DLFCN_H, 1, [ Define if we have dlfcn.h. ]) |
4477 AC_MSG_CHECKING([for dlopen()]) | 4478 AC_MSG_CHECKING([for dlopen()]) |
4478 AC_TRY_LINK(,[ | 4479 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ |
4479 extern void* dlopen(); | 4480 extern void* dlopen(); |
4480 dlopen(); | 4481 dlopen(); |
4481 ], | 4482 ])], |
4482 AC_MSG_RESULT(yes); | 4483 AC_MSG_RESULT(yes); |
4483 AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]), | 4484 AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]), |
4484 AC_MSG_RESULT(no); | 4485 AC_MSG_RESULT(no); |
4485 AC_MSG_CHECKING([for dlopen() in -ldl]) | 4486 AC_MSG_CHECKING([for dlopen() in -ldl]) |
4486 olibs=$LIBS | 4487 olibs=$LIBS |
4487 LIBS="$LIBS -ldl" | 4488 LIBS="$LIBS -ldl" |
4488 AC_TRY_LINK(,[ | 4489 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ |
4489 extern void* dlopen(); | 4490 extern void* dlopen(); |
4490 dlopen(); | 4491 dlopen(); |
4491 ], | 4492 ])], |
4492 AC_MSG_RESULT(yes); | 4493 AC_MSG_RESULT(yes); |
4493 AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]), | 4494 AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]), |
4494 AC_MSG_RESULT(no); | 4495 AC_MSG_RESULT(no); |
4495 LIBS=$olibs)) | 4496 LIBS=$olibs)) |
4496 dnl ReliantUNIX has dlopen() in libc but everything else in libdl | 4497 dnl ReliantUNIX has dlopen() in libc but everything else in libdl |
4497 dnl ick :-) | 4498 dnl ick :-) |
4498 AC_MSG_CHECKING([for dlsym()]) | 4499 AC_MSG_CHECKING([for dlsym()]) |
4499 AC_TRY_LINK(,[ | 4500 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ |
4500 extern void* dlsym(); | 4501 extern void* dlsym(); |
4501 dlsym(); | 4502 dlsym(); |
4502 ], | 4503 ])], |
4503 AC_MSG_RESULT(yes); | 4504 AC_MSG_RESULT(yes); |
4504 AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]), | 4505 AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]), |
4505 AC_MSG_RESULT(no); | 4506 AC_MSG_RESULT(no); |
4506 AC_MSG_CHECKING([for dlsym() in -ldl]) | 4507 AC_MSG_CHECKING([for dlsym() in -ldl]) |
4507 olibs=$LIBS | 4508 olibs=$LIBS |
4508 LIBS="$LIBS -ldl" | 4509 LIBS="$LIBS -ldl" |
4509 AC_TRY_LINK(,[ | 4510 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ |
4510 extern void* dlsym(); | 4511 extern void* dlsym(); |
4511 dlsym(); | 4512 dlsym(); |
4512 ], | 4513 ])], |
4513 AC_MSG_RESULT(yes); | 4514 AC_MSG_RESULT(yes); |
4514 AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]), | 4515 AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]), |
4515 AC_MSG_RESULT(no); | 4516 AC_MSG_RESULT(no); |
4516 LIBS=$olibs)) | 4517 LIBS=$olibs)) |
4517 elif test x${DLL} = xdl.h; then | 4518 elif test x${DLL} = xdl.h; then |
4518 AC_DEFINE(HAVE_DL_H, 1, [ Define if we have dl.h. ]) | 4519 AC_DEFINE(HAVE_DL_H, 1, [ Define if we have dl.h. ]) |
4519 AC_MSG_CHECKING([for shl_load()]) | 4520 AC_MSG_CHECKING([for shl_load()]) |
4520 AC_TRY_LINK(,[ | 4521 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ |
4521 extern void* shl_load(); | 4522 extern void* shl_load(); |
4522 shl_load(); | 4523 shl_load(); |
4523 ], | 4524 ])], |
4524 AC_MSG_RESULT(yes); | 4525 AC_MSG_RESULT(yes); |
4525 AC_DEFINE(HAVE_SHL_LOAD, 1, [ Define if we have shl_load() ]), | 4526 AC_DEFINE(HAVE_SHL_LOAD, 1, [ Define if we have shl_load() ]), |
4526 AC_MSG_RESULT(no); | 4527 AC_MSG_RESULT(no); |
4527 AC_MSG_CHECKING([for shl_load() in -ldld]) | 4528 AC_MSG_CHECKING([for shl_load() in -ldld]) |
4528 olibs=$LIBS | 4529 olibs=$LIBS |
4529 LIBS="$LIBS -ldld" | 4530 LIBS="$LIBS -ldld" |
4530 AC_TRY_LINK(,[ | 4531 AC_LINK_IFELSE([AC_LANG_PROGRAM(,[ |
4531 extern void* shl_load(); | 4532 extern void* shl_load(); |
4532 shl_load(); | 4533 shl_load(); |
4533 ], | 4534 ])], |
4534 AC_MSG_RESULT(yes); | 4535 AC_MSG_RESULT(yes); |
4535 AC_DEFINE(HAVE_SHL_LOAD, 1, [ Define if we have shl_load() ]), | 4536 AC_DEFINE(HAVE_SHL_LOAD, 1, [ Define if we have shl_load() ]), |
4536 AC_MSG_RESULT(no); | 4537 AC_MSG_RESULT(no); |
4537 LIBS=$olibs)) | 4538 LIBS=$olibs)) |
4538 fi | 4539 fi |
4641 if test "$zOSUnix" = "yes"; then | 4642 if test "$zOSUnix" = "yes"; then |
4642 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll" | 4643 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll" |
4643 fi | 4644 fi |
4644 | 4645 |
4645 dnl write output files | 4646 dnl write output files |
4646 AC_OUTPUT(auto/config.mk:config.mk.in) | 4647 AC_CONFIG_FILES(auto/config.mk:config.mk.in) |
4648 AC_OUTPUT | |
4647 | 4649 |
4648 dnl vim: set sw=2 tw=78 fo+=l: | 4650 dnl vim: set sw=2 tw=78 fo+=l: |