Overview
Comment: | Use a better mechanism for checking for functions which require libraries+headers |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | trunk |
Files: | files | file ages | folders |
SHA3-256: |
79081a9bf190d6130d50d4e5784a078c |
User & Date: | rkeene on 2019-01-23 22:03:00 |
Other Links: | manifest | tags |
Context
2019-01-23
| ||
22:03 | Use a better mechanism for checking for functions which require libraries+headers Leaf check-in: 79081a9bf1 user: rkeene tags: trunk | |
20:33 | Use Autoconf Archive OpenMP check check-in: 494f675279 user: rkeene tags: trunk | |
Changes
Added aclocal/xax_check_func_in_lib.m4 version [3bca7447d3].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | dnl XAX_CHECK_FUNC_IN_LIB(headers..., libraries..., function, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) AC_DEFUN([XAX_CHECK_FUNC_IN_LIB], [ m4_define([CACHE_VARIABLE], [xax_cv_func_]$3[_in]) AC_CACHE_CHECK([for $3 in $2], CACHE_VARIABLE, [ save_LIBS="${LIBS}" LIBS="${save_LIBS} $2" m4_define([HEADERS], []) m4_foreach_w([HEADER], [$1], [ m4_append([HEADERS], [#include <]HEADER[> ]) ]) AC_LINK_IFELSE([AC_LANG_PROGRAM([HEADERS], [[ $3; ]])], [ CACHE_VARIABLE='yes' ], [ CACHE_VARIABLE='no' ]) LIBS="${save_LIBS}" ]) if test "x$CACHE_VARIABLE" = 'xyes'; then LIBS="${LIBS} $2" AC_DEFINE(AS_TR_CPP([HAVE_$3]), [1], [Define if we have $3]) m4_foreach_w([HEADER], [$1], [ AC_DEFINE(AS_TR_CPP([HAVE_]HEADER), [1], [Define if we have <]HEADER[>]) ]) m4_default([$4], :) else m4_default([$5], :) fi ]) |
Modified autogen.sh from [a208158f34] to [834e7f414f].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | http://chiselapp.com/user/rkeene/repository/autoconf/doc/trunk/versionscript.m4 'http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_compile_flag.m4' 'http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_link_flag.m4' 'http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_openmp.m4' ) localFiles=( ) failed='0' for command in "${commands[@]}"; do if [ ! -f "$(which "${command}" 2>/dev/null)" ]; then echo "error: Unable to locate ${command}" >&2 failed='1' | > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | http://chiselapp.com/user/rkeene/repository/autoconf/doc/trunk/versionscript.m4 'http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_compile_flag.m4' 'http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_link_flag.m4' 'http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_openmp.m4' ) localFiles=( aclocal/xax_check_func_in_lib.m4 ) failed='0' for command in "${commands[@]}"; do if [ ! -f "$(which "${command}" 2>/dev/null)" ]; then echo "error: Unable to locate ${command}" >&2 failed='1' |
︙ | ︙ |
Modified configure.ac from [a03ae74853] to [5539a13b22].
︙ | ︙ | |||
102 103 104 105 106 107 108 | AC_DEFINE([NANO_TCL_HAVE_OPENMP], [1], [Define if you have support for OpenMP]) ]) dnl Random number generation mechanisms AC_CHECK_FUNCS(getrandom,, [ AC_CHECK_FUNCS(getentropy,, [ | < < < < < < < < < | < < < < < < < < < < < < < < < < < < | < < < | < < < < < < < < < < < < < | < < < < < < < < < | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | AC_DEFINE([NANO_TCL_HAVE_OPENMP], [1], [Define if you have support for OpenMP]) ]) dnl Random number generation mechanisms AC_CHECK_FUNCS(getrandom,, [ AC_CHECK_FUNCS(getentropy,, [ XAX_CHECK_FUNC_IN_LIB(windows.h wincrypt.h, -ladvapi32, CryptGenRandom) ]) ]) dnl Check for name resolution capabilities AC_CHECK_FUNCS(getaddrinfo, [ AC_CHECK_FUNCS(getnameinfo, [ AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h) ]) ], [ XAX_CHECK_FUNC_IN_LIB(ws2tcpip.h windows.h, -lws2_32, getaddrinfo, [ XAX_CHECK_FUNC_IN_LIB(ws2tcpip.h windows.h, -lws2_32, getnameinfo) ]) ]) dnl Handle specifying where TCLLIB is, for testing AC_SUBST(TCLLIB_PATH) TCLLIB_PATH='/dev/null' AC_ARG_WITH([tcllib-path], AS_HELP_STRING([--with-tcllib-path], [Specify a path to Tcllib for the test suite]), [ if test "$withval" != "no" -a "$withval" != "yes"; then |
︙ | ︙ |