2023-12-26 07:21:45 -05:00
|
|
|
project('elinks', ['c','cpp'], version:'0.18.GIT', license:'GPLv2', default_options:['cpp_std=gnu++17'])
|
2020-09-05 16:02:16 -04:00
|
|
|
srcs=[]
|
|
|
|
|
|
|
|
srcdir = meson.source_root()
|
|
|
|
|
2023-04-22 04:28:40 -04:00
|
|
|
git = find_program('git', required: false)
|
|
|
|
|
|
|
|
if git.found()
|
|
|
|
txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD', check:false).stdout().strip()
|
2024-06-03 11:22:24 -04:00
|
|
|
dirty = run_command(srcdir / 'git-dirty.sh', check:false).stdout().strip()
|
2023-04-22 04:28:40 -04:00
|
|
|
else
|
|
|
|
txt = ''
|
|
|
|
dirty = ''
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
add_global_arguments('-DBUILD_ID="' + txt + dirty + '"', language : 'c')
|
|
|
|
|
|
|
|
conf_data = configuration_data()
|
2020-12-27 13:39:52 -05:00
|
|
|
conf_data.set('VERSION', meson.project_version())
|
|
|
|
conf_data.set('PACKAGE', meson.project_name())
|
2023-04-26 12:57:45 -04:00
|
|
|
conf_data.set('DATE', run_command('date', '%Y-%m-%d', check:false).stdout().strip())
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
conf_data.set('CONFIG_LARGEFILE', get_option('largefile'))
|
|
|
|
conf_data.set('CONFIG_BOOKMARKS', get_option('bookmarks'))
|
|
|
|
conf_data.set('CONFIG_XBEL_BOOKMARKS', get_option('xbel'))
|
|
|
|
conf_data.set('CONFIG_SCRIPTING_SPIDERMONKEY', get_option('sm-scripting'))
|
2021-03-28 12:47:35 -04:00
|
|
|
conf_data.set('CONFIG_NLS', get_option('nls'))
|
2021-08-08 15:25:08 -04:00
|
|
|
conf_data.set('CONFIG_GETTEXT', get_option('gettext'))
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
conf_data.set('CONFIG_COOKIES', get_option('cookies'))
|
|
|
|
conf_data.set('CONFIG_FORMHIST', get_option('formhist'))
|
|
|
|
conf_data.set('CONFIG_GLOBHIST', get_option('globhist'))
|
|
|
|
conf_data.set('CONFIG_MAILCAP', get_option('mailcap'))
|
|
|
|
conf_data.set('CONFIG_MIMETYPES', get_option('mimetypes'))
|
|
|
|
conf_data.set('CONFIG_IPV6', get_option('ipv6'))
|
2020-09-13 10:12:57 -04:00
|
|
|
conf_data.set('CONFIG_BITTORRENT', get_option('bittorrent'))
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_DATA', get_option('data'))
|
2021-07-02 15:28:48 -04:00
|
|
|
conf_data.set('CONFIG_GEMINI', get_option('gemini'))
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
conf_data.set('CONFIG_URI_REWRITE', get_option('uri-rewrite'))
|
|
|
|
conf_data.set('CONFIG_CGI', get_option('cgi'))
|
2022-05-16 16:01:41 -04:00
|
|
|
conf_data.set('CONFIG_DGI', get_option('dgi'))
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_FINGER', get_option('finger'))
|
|
|
|
conf_data.set('CONFIG_FSP', get_option('fsp'))
|
2023-07-07 15:49:39 -04:00
|
|
|
conf_data.set('CONFIG_FSP2', get_option('fsp2'))
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_FTP', get_option('ftp'))
|
2024-05-27 10:31:25 -04:00
|
|
|
conf_data.set('CONFIG_SFTP', get_option('sftp'))
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_GOPHER', get_option('gopher'))
|
|
|
|
conf_data.set('CONFIG_NNTP', get_option('nntp'))
|
|
|
|
conf_data.set('CONFIG_SMB', get_option('smb'))
|
|
|
|
conf_data.set('CONFIG_MOUSE', get_option('mouse'))
|
|
|
|
conf_data.set('CONFIG_SYSMOUSE', get_option('sysmouse'))
|
|
|
|
conf_data.set('CONFIG_88_COLORS', get_option('88-colors'))
|
|
|
|
|
|
|
|
conf_data.set('CONFIG_256_COLORS', get_option('256-colors'))
|
|
|
|
conf_data.set('CONFIG_TRUE_COLOR', get_option('true-color'))
|
|
|
|
conf_data.set('CONFIG_EXMODE', get_option('exmode'))
|
|
|
|
conf_data.set('CONFIG_LEDS', get_option('leds'))
|
|
|
|
conf_data.set('CONFIG_MARKS', get_option('marks'))
|
2021-06-21 15:01:37 -04:00
|
|
|
conf_data.set('CONFIG_CSS', get_option('css'))
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_DOM', get_option('html-highlight'))
|
|
|
|
|
|
|
|
conf_data.set('CONFIG_BACKTRACE', get_option('backtrace'))
|
2024-04-19 12:12:31 -04:00
|
|
|
conf_data.set('CONFIG_NO_ROOT_EXEC', get_option('no-root'))
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_DEBUG', get_option('withdebug'))
|
|
|
|
conf_data.set('CONFIG_FASTMEM', get_option('fastmem'))
|
|
|
|
conf_data.set('CONFIG_OWN_LIBC', get_option('own-libc'))
|
|
|
|
conf_data.set('CONFIG_SMALL', get_option('small'))
|
|
|
|
conf_data.set('CONFIG_UTF8', get_option('utf-8'))
|
2022-03-03 10:29:25 -05:00
|
|
|
conf_data.set('CONFIG_COMBINE', get_option('combining'))
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
conf_data.set('CONFIG_XTERM', get_option('xterm'))
|
|
|
|
conf_data.set('CONFIG_GPM', get_option('gpm'))
|
|
|
|
conf_data.set('CONFIG_TERMINFO', get_option('terminfo'))
|
|
|
|
conf_data.set('CONFIG_GZIP', get_option('zlib'))
|
|
|
|
conf_data.set('CONFIG_BZIP2', get_option('bzlib'))
|
|
|
|
conf_data.set('CONFIG_BROTLI', get_option('brotli'))
|
|
|
|
|
|
|
|
conf_data.set('CONFIG_ZSTD', get_option('zstd'))
|
2023-01-02 11:09:24 -05:00
|
|
|
conf_data.set('CONFIG_IDN2', get_option('idn'))
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_LZMA', get_option('lzma'))
|
|
|
|
conf_data.set('CONFIG_GSSAPI', get_option('gssapi'))
|
|
|
|
conf_data.set('CONFIG_ECMASCRIPT_SMJS', get_option('spidermonkey'))
|
|
|
|
conf_data.set('CONFIG_SCRIPTING_GUILE', get_option('guile'))
|
|
|
|
conf_data.set('CONFIG_SCRIPTING_PERL', get_option('perl'))
|
|
|
|
conf_data.set('CONFIG_SCRIPTING_PYTHON', get_option('python'))
|
|
|
|
|
2023-05-18 04:21:08 -04:00
|
|
|
conf_data.set('CONFIG_LIBSIXEL', get_option('libsixel'))
|
|
|
|
|
2022-03-25 09:13:03 -04:00
|
|
|
conf_data.set('CONFIG_REPRODUCIBLE', get_option('reproducible'))
|
|
|
|
conf_data.set('SOURCE_DATE_EPOCH', get_option('source-date-epoch'))
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
luapkg = get_option('luapkg')
|
|
|
|
if luapkg != ''
|
|
|
|
conf_data.set('CONFIG_SCRIPTING_LUA', true)
|
|
|
|
else
|
|
|
|
conf_data.set('CONFIG_SCRIPTING_LUA', false)
|
|
|
|
endif
|
|
|
|
|
|
|
|
conf_data.set('CONFIG_TRE', get_option('tre'))
|
|
|
|
conf_data.set('CONFIG_SCRIPTING_RUBY', get_option('ruby'))
|
|
|
|
conf_data.set('CONFIG_GNUTLS', get_option('gnutls'))
|
|
|
|
conf_data.set('CONFIG_OPENSSL', get_option('openssl'))
|
|
|
|
conf_data.set('CONFIG_LIBEV', get_option('libev'))
|
|
|
|
conf_data.set('CONFIG_LIBEVENT', get_option('libevent'))
|
|
|
|
conf_data.set('CONFIG_X', get_option('x'))
|
2021-10-16 14:54:08 -04:00
|
|
|
conf_data.set('CONFIG_QUICKJS', get_option('quickjs'))
|
2022-08-01 15:31:07 -04:00
|
|
|
conf_data.set('CONFIG_MUJS', get_option('mujs'))
|
2022-10-16 13:26:20 -04:00
|
|
|
conf_data.set('CONFIG_CODEPOINT', get_option('codepoint'))
|
2022-08-01 15:31:07 -04:00
|
|
|
|
|
|
|
if conf_data.get('CONFIG_SCRIPTING_SPIDERMONKEY') or conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS')
|
2020-09-11 15:05:26 -04:00
|
|
|
conf_data.set('CONFIG_ECMASCRIPT', true)
|
|
|
|
else
|
|
|
|
conf_data.set('CONFIG_ECMASCRIPT', false)
|
|
|
|
endif
|
2023-11-21 08:25:30 -05:00
|
|
|
|
|
|
|
if conf_data.get('CONFIG_SCRIPTING_SPIDERMONKEY') and conf_data.get('CONFIG_QUICKJS')
|
|
|
|
error('quickjs and sm-scripting cannot be both enabled')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_SCRIPTING_SPIDERMONKEY') and conf_data.get('CONFIG_MUJS')
|
|
|
|
error('mujs and sm-scripting cannot be both enabled')
|
|
|
|
endif
|
|
|
|
|
2023-11-21 09:27:17 -05:00
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') and conf_data.get('CONFIG_QUICKJS')
|
|
|
|
error('quickjs and spidermonkey cannot be both enabled')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') and conf_data.get('CONFIG_MUJS')
|
|
|
|
error('mujs and spidermonkey cannot be both enabled')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_QUICKJS') and conf_data.get('CONFIG_MUJS')
|
|
|
|
error('mujs and quickjs cannot be both enabled')
|
|
|
|
endif
|
|
|
|
|
2023-11-21 09:31:22 -05:00
|
|
|
if conf_data.get('CONFIG_LIBEV') and conf_data.get('CONFIG_LIBEVENT')
|
|
|
|
error('libev and libevent cannot be both enabled')
|
|
|
|
endif
|
|
|
|
|
2023-11-21 09:34:17 -05:00
|
|
|
if conf_data.get('CONFIG_FSP') and conf_data.get('CONFIG_FSP2')
|
|
|
|
error('fsp and fsp2 cannot be both enabled')
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_ECMASCRIPT_SMJS_HEARTBEAT', true)
|
2020-10-05 14:14:55 -04:00
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_SCRIPTING', true)
|
|
|
|
|
2024-04-06 14:13:24 -04:00
|
|
|
if get_option('msys2')
|
|
|
|
system = 'msys2'
|
|
|
|
else
|
|
|
|
system = host_machine.system()
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if system == 'haiku'
|
|
|
|
conf_data.set('CONFIG_OS_BEOS', true)
|
|
|
|
else
|
|
|
|
conf_data.set('CONFIG_OS_BEOS', false)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if system == 'windows'
|
|
|
|
conf_data.set('CONFIG_OS_WIN32', true)
|
|
|
|
else
|
|
|
|
conf_data.set('CONFIG_OS_WIN32', false)
|
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if system == 'dos'
|
|
|
|
conf_data.set('CONFIG_OS_DOS', true)
|
|
|
|
else
|
|
|
|
conf_data.set('CONFIG_OS_DOS', false)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if system != 'dos' and system != 'haiku' and system != 'windows'
|
2022-03-13 07:24:52 -04:00
|
|
|
conf_data.set('CONFIG_OS_UNIX', true)
|
2020-09-05 16:02:16 -04:00
|
|
|
else
|
2022-03-13 07:24:52 -04:00
|
|
|
conf_data.set('CONFIG_OS_UNIX', false)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2022-10-08 05:21:25 -04:00
|
|
|
|
|
|
|
if conf_data.get('CONFIG_GNUTLS') or conf_data.get('CONFIG_OPENSSL')
|
|
|
|
conf_data.set('CONFIG_SSL', true)
|
|
|
|
else
|
|
|
|
conf_data.set('CONFIG_SSL', false)
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_OS_OS2', false)
|
|
|
|
conf_data.set('CONFIG_OS_RISCOS', false)
|
|
|
|
|
|
|
|
# AC_HEADER_DIRENT
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_DIRENT_H', 1)
|
2023-11-04 15:30:25 -04:00
|
|
|
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
# AC_HEADER_TIME
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_SYS_TIME_H', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
compiler = meson.get_compiler('c')
|
|
|
|
|
2022-07-31 10:44:11 -04:00
|
|
|
extracflags = []
|
|
|
|
extracppflags = []
|
|
|
|
|
2021-06-12 07:29:05 -04:00
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT')
|
2022-10-13 09:53:54 -04:00
|
|
|
extracppflags += ['-fpermissive', '-Wno-sign-compare']
|
2020-10-05 14:14:55 -04:00
|
|
|
endif
|
|
|
|
|
2024-04-19 10:47:55 -04:00
|
|
|
if compiler.has_header('argz.h')
|
|
|
|
conf_data.set('HAVE_ARGZ_H', 1)
|
|
|
|
endif
|
|
|
|
|
2023-11-04 15:30:25 -04:00
|
|
|
if compiler.has_header('sys/wait.h')
|
|
|
|
conf_data.set('HAVE_SYS_WAIT_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('wchar.h')
|
|
|
|
conf_data.set('HAVE_WCHAR_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('wctype.h')
|
|
|
|
conf_data.set('HAVE_WCTYPE_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('fcntl.h')
|
|
|
|
conf_data.set('HAVE_FCNTL_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-05-08 07:59:24 -04:00
|
|
|
if compiler.has_header('libgen.h')
|
|
|
|
conf_data.set('HAVE_LIBGEN_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('unistd.h')
|
|
|
|
conf_data.set('HAVE_UNISTD_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('arpa/inet.h')
|
|
|
|
conf_data.set('HAVE_ARPA_INET_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('netinet/in_systm.h')
|
|
|
|
conf_data.set('HAVE_NETINET_IN_SYSTM_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('netinet/in_system.h')
|
|
|
|
conf_data.set('HAVE_NETINET_IN_SYSTEM_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('netinet/ip.h')
|
|
|
|
conf_data.set('HAVE_NETINET_IP_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('netdb.h')
|
|
|
|
conf_data.set('HAVE_NETDB_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('netinet/in.h')
|
|
|
|
conf_data.set('HAVE_NETINET_IN_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('netinet/in6_var.h')
|
|
|
|
conf_data.set('HAVE_NETINET_IN6_VAR_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('ifaddrs.h')
|
|
|
|
conf_data.set('HAVE_IFADDRS_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('sys/cygwin.h')
|
|
|
|
conf_data.set('HAVE_SYS_CYGWIN_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('io.h')
|
|
|
|
conf_data.set('HAVE_IO_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('sys/fmutex.h')
|
|
|
|
conf_data.set('HAVE_SYS_FMUTEX_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('sys/ioctl.h')
|
|
|
|
conf_data.set('HAVE_SYS_IOCTL_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-11-21 10:51:40 -05:00
|
|
|
if compiler.has_header('sys/kd.h')
|
|
|
|
conf_data.set('HAVE_SYS_KD_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('sys/sockio.h')
|
|
|
|
conf_data.set('HAVE_SYS_SOCKIO_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('sys/resource.h')
|
|
|
|
conf_data.set('HAVE_SYS_RESOURCE_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('sys/select.h')
|
|
|
|
conf_data.set('HAVE_SYS_SELECT_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('sys/socket.h')
|
|
|
|
conf_data.set('HAVE_SYS_SOCKET_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('sys/utsname.h')
|
|
|
|
conf_data.set('HAVE_SYS_UTSNAME_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('net/if.h')
|
|
|
|
conf_data.set('HAVE_NET_IF_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('stdint.h')
|
|
|
|
conf_data.set('HAVE_STDINT_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('inttypes.h')
|
|
|
|
conf_data.set('HAVE_INTTYPES_H', 1)
|
|
|
|
endif
|
2022-03-13 12:05:41 -04:00
|
|
|
|
|
|
|
if compiler.has_header('pwd.h')
|
|
|
|
conf_data.set('HAVE_PWD_H', 1)
|
|
|
|
endif
|
2022-03-14 10:56:12 -04:00
|
|
|
|
2022-03-13 12:05:41 -04:00
|
|
|
if compiler.has_header('termios.h')
|
|
|
|
conf_data.set('HAVE_TERMIOS_H', 1)
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('poll.h')
|
|
|
|
conf_data.set('HAVE_POLL_H', 1)
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('sys/types.h')
|
|
|
|
conf_data.set('HAVE_SYS_TYPES_H', 1)
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('gpm.h')
|
|
|
|
conf_data.set('HAVE_GPM_H', 1)
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
|
2023-01-02 11:09:24 -05:00
|
|
|
if compiler.has_header('idn2.h')
|
|
|
|
conf_data.set('HAVE_IDN2_H', 1)
|
2022-03-14 10:56:12 -04:00
|
|
|
endif
|
2021-01-13 16:02:30 -05:00
|
|
|
|
2023-12-26 09:53:22 -05:00
|
|
|
if compiler.has_header('event2/event.h')
|
|
|
|
conf_data.set('HAVE_EVENT2_EVENT_H', 1)
|
2022-03-14 10:56:12 -04:00
|
|
|
endif
|
|
|
|
|
2024-03-06 10:52:18 -05:00
|
|
|
if compiler.has_header('event.h')
|
|
|
|
conf_data.set('HAVE_EVENT_H', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-19 10:47:55 -04:00
|
|
|
if compiler.has_header('ev-event.h')
|
|
|
|
conf_data.set('HAVE_EV_EVENT_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('alloca.h')
|
|
|
|
conf_data.set('HAVE_ALLOCA_H', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-19 10:47:55 -04:00
|
|
|
if compiler.has_header('lauxlib.h')
|
|
|
|
conf_data.set('HAVE_LAUXLIB_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('machine/console.h')
|
|
|
|
conf_data.set('HAVE_MACHINE_CONSOLE_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('malloc.h')
|
|
|
|
conf_data.set('HAVE_MALLOC_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('stdalign.h')
|
|
|
|
conf_data.set('HAVE_STDALIGN_H', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-19 10:47:55 -04:00
|
|
|
if compiler.has_header('sys/consio.h')
|
|
|
|
conf_data.set('HAVE_SYS_CONSIO_H', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_header('sys/param.h')
|
|
|
|
conf_data.set('HAVE_SYS_PARAM_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
if compiler.has_header('term.h')
|
|
|
|
conf_data.set('HAVE_TERM_H', 1)
|
|
|
|
endif
|
2021-04-12 15:17:27 -04:00
|
|
|
|
2024-04-17 09:53:08 -04:00
|
|
|
if compiler.has_header('execinfo.h')
|
|
|
|
conf_data.set('HAVE_EXECINFO_H', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-06 14:13:24 -04:00
|
|
|
if conf_data.get('CONFIG_OS_WIN32') and compiler.has_header('windows.h')
|
2023-11-04 15:30:25 -04:00
|
|
|
conf_data.set('HAVE_WINDOWS_H', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-06 14:13:24 -04:00
|
|
|
if conf_data.get('CONFIG_OS_WIN32') and compiler.has_header('winsock2.h')
|
2023-11-08 06:28:00 -05:00
|
|
|
conf_data.set('HAVE_WINSOCK2_H', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-06 14:13:24 -04:00
|
|
|
if conf_data.get('CONFIG_OS_WIN32') and compiler.has_header('ws2tcpip.h')
|
2023-11-04 15:30:25 -04:00
|
|
|
conf_data.set('HAVE_WS2TCPIP_H', 1)
|
|
|
|
endif
|
|
|
|
|
2022-01-06 10:07:04 -05:00
|
|
|
st = get_option('static')
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
deps = []
|
|
|
|
if conf_data.get('CONFIG_GZIP')
|
2023-11-07 13:16:24 -05:00
|
|
|
zdeps = dependency('zlib', static: st, required: false)
|
|
|
|
if not zdeps.found()
|
2024-06-03 08:47:40 -04:00
|
|
|
zdeps = compiler.find_library('z', static: st)
|
2023-11-07 13:16:24 -05:00
|
|
|
endif
|
|
|
|
if zdeps.found()
|
|
|
|
deps += zdeps
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_TRE')
|
2022-01-06 10:07:04 -05:00
|
|
|
tredeps = dependency('tre', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += tredeps
|
|
|
|
endif
|
|
|
|
|
2021-07-05 08:28:25 -04:00
|
|
|
eh = ''
|
|
|
|
if conf_data.get('CONFIG_LIBEV')
|
|
|
|
conf_data.set('HAVE_LIBEV_EVENT_H', compiler.has_header('libev/event.h'))
|
|
|
|
conf_data.set('HAVE_LIBEV', true)
|
|
|
|
eh = '#include <libev/event.h>'
|
2022-01-06 10:07:04 -05:00
|
|
|
eventdeps = compiler.find_library('ev', static: st)
|
2021-07-05 08:28:25 -04:00
|
|
|
deps += eventdeps
|
2021-07-05 08:53:38 -04:00
|
|
|
conf_data.set('CONFIG_LIBEVENT', false)
|
2024-03-08 10:03:49 -05:00
|
|
|
code1 = '''#include <libev/event.h>
|
|
|
|
struct ev_timer timer;
|
|
|
|
'''
|
|
|
|
code2 = '''#include <event.h>
|
|
|
|
struct ev_timer timer;
|
|
|
|
'''
|
|
|
|
if not compiler.compiles(code1) and not compiler.compiles(code2)
|
|
|
|
error('libev cannot be used. Likely not installed libev-libevent-dev')
|
|
|
|
endif
|
2021-07-05 08:28:25 -04:00
|
|
|
elif conf_data.get('CONFIG_LIBEVENT')
|
2023-12-26 09:53:22 -05:00
|
|
|
eh = '#include <event2/event.h>'
|
|
|
|
eventdeps = dependency('libevent', static: st, version: '>=2.0.0')
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += eventdeps
|
|
|
|
conf_data.set('HAVE_LIBEVENT', true)
|
|
|
|
else
|
|
|
|
eventdeps = []
|
|
|
|
endif
|
|
|
|
|
2021-07-05 08:53:38 -04:00
|
|
|
gnutlsdeps = []
|
|
|
|
ssldeps = []
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if conf_data.get('CONFIG_OPENSSL')
|
2023-11-06 13:03:14 -05:00
|
|
|
ssldeps = dependency('openssl', static: st, required: false)
|
|
|
|
if not ssldeps.found()
|
2024-06-03 08:47:40 -04:00
|
|
|
ssldeps = compiler.find_library('ssl', static: st)
|
2023-11-06 13:03:14 -05:00
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += ssldeps
|
|
|
|
conf_data.set('USE_OPENSSL', true)
|
2021-07-05 08:53:38 -04:00
|
|
|
conf_data.set('CONFIG_GNUTLS', false)
|
|
|
|
elif conf_data.get('CONFIG_GNUTLS')
|
2022-01-06 10:07:04 -05:00
|
|
|
gnutlsdeps = dependency('gnutls', static: st)
|
|
|
|
libgcryptdeps = dependency('libgcrypt', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += gnutlsdeps
|
|
|
|
deps += libgcryptdeps
|
|
|
|
endif
|
|
|
|
|
2022-08-21 06:55:07 -04:00
|
|
|
if conf_data.get('CONFIG_GSSAPI')
|
|
|
|
gssapideps = dependency('krb5-gssapi', static: st)
|
|
|
|
deps += gssapideps
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if conf_data.get('CONFIG_BROTLI')
|
2022-01-06 10:07:04 -05:00
|
|
|
brotlideps = dependency('libbrotlidec', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += brotlideps
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_ZSTD')
|
2023-10-26 12:17:16 -04:00
|
|
|
zstatic = st
|
|
|
|
if conf_data.get('CONFIG_DEBUG')
|
|
|
|
zstatic = true
|
|
|
|
endif
|
|
|
|
zstddeps = dependency('libzstd', static: zstatic)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += zstddeps
|
|
|
|
endif
|
|
|
|
|
2021-12-13 10:22:50 -05:00
|
|
|
if conf_data.get('CONFIG_LZMA')
|
2022-01-06 10:07:04 -05:00
|
|
|
lzmadeps = dependency('liblzma', static: st)
|
2021-12-13 10:22:50 -05:00
|
|
|
deps += lzmadeps
|
|
|
|
endif
|
|
|
|
|
2023-01-02 11:09:24 -05:00
|
|
|
if conf_data.get('CONFIG_IDN2')
|
|
|
|
idndeps = dependency('libidn2', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += idndeps
|
|
|
|
endif
|
|
|
|
|
2022-10-13 10:56:40 -04:00
|
|
|
x11deps = []
|
2020-09-14 14:11:53 -04:00
|
|
|
conf_data.set('HAVE_X11', false)
|
2020-09-05 16:02:16 -04:00
|
|
|
if conf_data.get('CONFIG_X')
|
2022-01-06 10:07:04 -05:00
|
|
|
x11deps = dependency('x11', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += x11deps
|
2020-09-14 14:11:53 -04:00
|
|
|
conf_data.set('HAVE_X11', compiler.has_header('X11/Xlib.h'))
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_BZIP2')
|
2022-02-27 12:38:36 -05:00
|
|
|
bz2deps = dependency('bzip2', static: st, required: false)
|
|
|
|
if not bz2deps.found()
|
2024-06-03 08:47:40 -04:00
|
|
|
bz2deps = compiler.find_library('bz2', static: st)
|
2022-02-27 12:38:36 -05:00
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += bz2deps
|
|
|
|
endif
|
|
|
|
|
2022-10-13 09:53:54 -04:00
|
|
|
mozjsdeps = []
|
2022-06-16 11:33:06 -04:00
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_SCRIPTING_SPIDERMONKEY')
|
2024-01-01 07:24:32 -05:00
|
|
|
mozjsdeps = dependency('mozjs-115', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += mozjsdeps
|
2021-10-17 12:17:48 -04:00
|
|
|
endif
|
|
|
|
|
2022-08-01 15:31:07 -04:00
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS')
|
2022-01-06 10:07:04 -05:00
|
|
|
sqlite3deps = dependency('sqlite3', static: st)
|
2021-02-24 04:01:02 -05:00
|
|
|
deps += sqlite3deps
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2023-06-11 10:39:56 -04:00
|
|
|
conf_data.set('CONFIG_LIBCURL', false)
|
|
|
|
curldeps = false
|
2023-01-29 12:29:07 -05:00
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS')
|
2023-11-07 13:16:24 -05:00
|
|
|
curldeps = dependency('libcurl', static: st, required: false)
|
|
|
|
if not curldeps.found()
|
2024-06-03 08:47:40 -04:00
|
|
|
curldeps = compiler.find_library('curl', static: st)
|
2023-11-07 13:16:24 -05:00
|
|
|
endif
|
|
|
|
if curldeps.found()
|
|
|
|
deps += curldeps
|
|
|
|
conf_data.set('CONFIG_LIBCURL', true)
|
|
|
|
endif
|
2023-06-11 10:39:56 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if not conf_data.get('CONFIG_LIBCURL') and get_option('libcurl')
|
2023-11-06 13:03:14 -05:00
|
|
|
curldeps = dependency('libcurl', static: st, required: false)
|
|
|
|
if not curldeps.found()
|
2024-06-03 08:47:40 -04:00
|
|
|
curldeps = compiler.find_library('curl', static: st)
|
2023-11-06 13:03:14 -05:00
|
|
|
endif
|
2023-11-07 13:16:24 -05:00
|
|
|
if curldeps.found()
|
|
|
|
deps += curldeps
|
|
|
|
conf_data.set('CONFIG_LIBCURL', true)
|
|
|
|
endif
|
2023-01-29 12:29:07 -05:00
|
|
|
endif
|
|
|
|
|
2023-02-28 12:38:33 -05:00
|
|
|
conf_data.set('CONFIG_LIBCSS', false)
|
2023-05-15 13:13:38 -04:00
|
|
|
cssdeps = false
|
2023-02-28 12:38:33 -05:00
|
|
|
|
2023-02-01 11:43:21 -05:00
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS')
|
2024-04-01 11:48:48 -04:00
|
|
|
cssdeps = dependency('libcss', static: st, version: '>=0.9.2', required: false)
|
|
|
|
if not cssdeps.found()
|
|
|
|
cssdeps = dependency('libcss', static: true, version: '>=0.9.2')
|
|
|
|
endif
|
2023-02-01 11:43:21 -05:00
|
|
|
deps += cssdeps
|
2023-02-28 12:38:33 -05:00
|
|
|
conf_data.set('CONFIG_LIBCSS', true)
|
2023-02-01 11:43:21 -05:00
|
|
|
endif
|
|
|
|
|
2023-03-12 12:29:59 -04:00
|
|
|
conf_data.set('CONFIG_LIBDOM', false)
|
2023-05-15 13:13:38 -04:00
|
|
|
libdomdeps = false
|
2023-03-12 12:29:59 -04:00
|
|
|
|
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS')
|
2024-04-01 11:48:48 -04:00
|
|
|
libdomdeps = dependency('libdom', static: st, version: '>=0.4.2', required: false)
|
|
|
|
if not libdomdeps.found()
|
|
|
|
libdomdeps = dependency('libdom', static: true, version: '>=0.4.2')
|
|
|
|
endif
|
2023-05-15 13:13:38 -04:00
|
|
|
deps += libdomdeps
|
2023-03-12 12:29:59 -04:00
|
|
|
conf_data.set('CONFIG_LIBDOM', true)
|
|
|
|
endif
|
|
|
|
|
2023-05-15 13:26:27 -04:00
|
|
|
if not conf_data.get('CONFIG_LIBCSS') and get_option('libcss')
|
2024-04-01 11:48:48 -04:00
|
|
|
cssdeps = dependency('libcss', static: st, version: '>=0.9.2', required: false)
|
|
|
|
if not cssdeps.found()
|
|
|
|
cssdeps = dependency('libcss', static: true, version: '>=0.9.2')
|
|
|
|
endif
|
2023-05-15 13:13:38 -04:00
|
|
|
deps += cssdeps
|
|
|
|
conf_data.set('CONFIG_LIBCSS', true)
|
2023-05-15 13:26:27 -04:00
|
|
|
if not conf_data.get('CONFIG_LIBDOM')
|
2024-04-01 11:48:48 -04:00
|
|
|
libdomdeps = dependency('libdom', static: st, version: '>=0.4.2', required: false)
|
|
|
|
if not libdomdeps.found()
|
|
|
|
libdomdeps = dependency('libdom', static: true, version: '>=0.4.2')
|
|
|
|
endif
|
2023-05-15 13:13:38 -04:00
|
|
|
deps += libdomdeps
|
|
|
|
conf_data.set('CONFIG_LIBDOM', true)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if conf_data.get('CONFIG_SCRIPTING_LUA')
|
2023-11-08 03:07:57 -05:00
|
|
|
luadeps = dependency(luapkg, static: st, required: false)
|
|
|
|
if not luadeps.found()
|
2024-06-03 08:47:40 -04:00
|
|
|
luadeps = compiler.find_library(luapkg, static: st)
|
2023-11-08 03:07:57 -05:00
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += luadeps
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_XBEL_BOOKMARKS')
|
2022-07-12 15:18:35 -04:00
|
|
|
expatdeps = dependency('expat', static: st, required: false)
|
|
|
|
if not expatdeps.found()
|
2024-06-03 08:47:40 -04:00
|
|
|
expatdeps = compiler.find_library('expat', static: st)
|
2022-07-12 15:18:35 -04:00
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += expatdeps
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_GPM')
|
2022-01-06 10:07:04 -05:00
|
|
|
libgpmdeps = compiler.find_library('gpm', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += libgpmdeps
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_SCRIPTING_PYTHON')
|
2022-01-06 10:07:04 -05:00
|
|
|
python3deps = dependency('python3-embed', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += python3deps
|
|
|
|
endif
|
|
|
|
|
2021-07-03 14:39:38 -04:00
|
|
|
if conf_data.get('CONFIG_SCRIPTING_PERL')
|
|
|
|
perl_libs = ''
|
2022-11-25 11:53:36 -05:00
|
|
|
perl_l = run_command('perl', '-MExtUtils::Embed', '-e', 'ldopts', check:true)
|
2021-07-03 14:39:38 -04:00
|
|
|
if perl_l.returncode() == 0
|
|
|
|
perl_libs = perl_l.stdout().strip().split()
|
|
|
|
endif
|
|
|
|
|
|
|
|
perl_cflags = ''
|
2022-11-25 11:53:36 -05:00
|
|
|
perl_c = run_command('perl', '-MExtUtils::Embed', '-e', 'ccopts', check:true)
|
2021-07-03 14:39:38 -04:00
|
|
|
if perl_c.returncode() == 0
|
|
|
|
perl_cflags = perl_c.stdout().strip().split()
|
|
|
|
endif
|
|
|
|
perl_dep = declare_dependency(compile_args: perl_cflags, link_args: perl_libs)
|
|
|
|
deps += perl_dep
|
|
|
|
endif
|
|
|
|
|
2022-01-29 05:38:31 -05:00
|
|
|
conf_data.set('CONFIG_PERL_POPPX_WITHOUT_N_A', 1)
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
rubydeps = []
|
|
|
|
if conf_data.get('CONFIG_SCRIPTING_RUBY')
|
2022-01-06 10:07:04 -05:00
|
|
|
rubydeps = dependency('ruby', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += rubydeps
|
|
|
|
endif
|
|
|
|
|
|
|
|
guiledeps = []
|
|
|
|
if conf_data.get('CONFIG_SCRIPTING_GUILE')
|
2022-01-06 10:07:04 -05:00
|
|
|
guiledeps = dependency('guile-3.0', static: st)
|
2020-09-05 16:02:16 -04:00
|
|
|
deps += guiledeps
|
|
|
|
endif
|
|
|
|
|
2020-09-12 12:29:23 -04:00
|
|
|
if conf_data.get('CONFIG_FSP')
|
2022-01-06 10:07:04 -05:00
|
|
|
fspdeps = compiler.find_library('fsplib', static: st)
|
2020-09-12 12:29:23 -04:00
|
|
|
deps += fspdeps
|
|
|
|
endif
|
|
|
|
|
2022-01-11 14:34:35 -05:00
|
|
|
if conf_data.get('CONFIG_SMB')
|
|
|
|
smbdeps = dependency('smbclient', static: st)
|
|
|
|
deps += smbdeps
|
|
|
|
endif
|
|
|
|
|
2021-12-05 11:26:35 -05:00
|
|
|
dep_atomic = dependency('', required: false)
|
|
|
|
|
|
|
|
if not compiler.links('''#include <stdint.h>
|
|
|
|
int main() {
|
|
|
|
struct {
|
|
|
|
uint64_t *v;
|
|
|
|
} x;
|
|
|
|
return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) & (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
|
|
|
|
}''',
|
|
|
|
name: 'GCC atomic builtins required -latomic')
|
2023-11-28 09:15:56 -05:00
|
|
|
dep_atomic = compiler.find_library('atomic', static: st, required: false)
|
2021-12-05 11:26:35 -05:00
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
|
2021-10-16 14:54:08 -04:00
|
|
|
if conf_data.get('CONFIG_QUICKJS')
|
2023-12-27 13:53:20 -05:00
|
|
|
quickjsdeps = compiler.find_library('quickjs', static: st, required: false)
|
|
|
|
if not quickjsdeps.found()
|
2024-06-03 08:47:40 -04:00
|
|
|
quickjsdeps = compiler.find_library('quickjs/libquickjs', static: true)
|
2023-12-27 13:53:20 -05:00
|
|
|
endif
|
2021-10-16 14:54:08 -04:00
|
|
|
deps += quickjsdeps
|
2021-12-05 11:26:35 -05:00
|
|
|
deps += dep_atomic
|
2021-10-16 14:54:08 -04:00
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
|
2022-08-01 15:31:07 -04:00
|
|
|
if conf_data.get('CONFIG_MUJS')
|
|
|
|
mujsdeps = dependency('mujs', static: st)
|
|
|
|
deps += mujsdeps
|
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if not conf_data.get('CONFIG_OS_DOS') and compiler.has_header('sys/un.h')
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('CONFIG_INTERLINK', true)
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_SYS_UN_H', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
else
|
|
|
|
conf_data.set('CONFIG_INTERLINK', false)
|
|
|
|
endif
|
|
|
|
|
2021-04-12 15:17:27 -04:00
|
|
|
if conf_data.get('CONFIG_TERMINFO')
|
2022-01-06 10:07:04 -05:00
|
|
|
terminfodeps = dependency('ncursesw', static: st)
|
2021-04-12 15:17:27 -04:00
|
|
|
deps += terminfodeps
|
|
|
|
endif
|
|
|
|
|
2023-05-18 04:21:08 -04:00
|
|
|
if conf_data.get('CONFIG_LIBSIXEL')
|
|
|
|
sixeldeps = dependency('libsixel', static: st)
|
|
|
|
deps += sixeldeps
|
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if conf_data.get('CONFIG_OS_DOS')
|
2024-06-03 08:47:40 -04:00
|
|
|
wattdeps = compiler.find_library('watt', static: st)
|
2022-06-28 14:24:22 -04:00
|
|
|
deps += wattdeps
|
|
|
|
else
|
|
|
|
wattdeps = []
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
#AC_STRUCT_TM
|
|
|
|
#AC_C_CONST
|
|
|
|
#AC_C_INLINE
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
if conf_data.get('CONFIG_ECMASCRIPT')
|
|
|
|
conf_data.set('NONSTATIC_INLINE', '')
|
|
|
|
else
|
|
|
|
conf_data.set('NONSTATIC_INLINE', 'inline')
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
#AC_SYS_LARGEFILE
|
|
|
|
|
|
|
|
#AC_TYPE_SIZE_T
|
|
|
|
#AC_TYPE_OFF_T
|
|
|
|
#EL_CHECK_TYPE(ssize_t, int)
|
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_LONG_LONG', 1)
|
|
|
|
conf_data.set('HAVE_OFF_T', 1)
|
|
|
|
conf_data.set('HAVE_INT32_T', 1)
|
|
|
|
conf_data.set('HAVE_UINT32_T', 1)
|
|
|
|
conf_data.set('HAVE_UINT16_T', 1)
|
|
|
|
conf_data.set('HAVE_VARIADIC_MACROS', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
#AC_FUNC_MEMCMP
|
|
|
|
#AC_FUNC_MMAP
|
|
|
|
|
2024-04-19 11:32:38 -04:00
|
|
|
if compiler.has_function('_beginthread', prefix: '#include <stdlib.h>')
|
|
|
|
conf_data.set('HAVE_BEGINTHREAD', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('cygwin_conv_to_full_win32_path', prefix: '#include <stdlib.h>')
|
|
|
|
conf_data.set('HAVE_CYGWIN_CONV_TO_FULL_WIN32_PATH', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('feof_unlocked', prefix: '#include <stdio.h>')
|
|
|
|
conf_data.set('HAVE_FEOF_UNLOCKED', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('fgets_unlocked', prefix: '#include <stdio.h>', args: '-D_GNU_SOURCE')
|
|
|
|
conf_data.set('HAVE_FGETS_UNLOCKED', 1)
|
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if compiler.has_function('mmap', prefix: '#include <sys/mman.h>')
|
|
|
|
conf_data.set('HAVE_MMAP', 1)
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
|
2024-04-19 11:32:38 -04:00
|
|
|
if compiler.has_function('MouOpen', prefix: '#include <stdlib.h>')
|
|
|
|
conf_data.set('HAVE_MOUOPEN', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('munmap', prefix: '#include <sys/mman.h>')
|
|
|
|
conf_data.set('HAVE_MUNMAP', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('_read_kbd', prefix: '#include <stdlib.h>')
|
|
|
|
conf_data.set('HAVE_READ_KBD', 1)
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if compiler.has_function('strftime', prefix: '#include <time.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STRFTIME', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('strptime', prefix: '#include <time.h>', args: '-D_XOPEN_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STRPTIME', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2024-04-19 11:32:38 -04:00
|
|
|
if compiler.has_function('tsearch', prefix: '#include <search.h>')
|
|
|
|
conf_data.set('HAVE_TSEARCH', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('__argz_count', prefix: '#include <argz.h>')
|
|
|
|
conf_data.set('HAVE___ARGZ_COUNT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('__argz_next', prefix: '#include <argz.h>')
|
|
|
|
conf_data.set('HAVE___ARGZ_NEXT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('__argz_stringify', prefix: '#include <argz.h>')
|
|
|
|
conf_data.set('HAVE___ARGZ_STRINGIFY', 1)
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if compiler.has_function('atoll', prefix : '#include <stdlib.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_ATOLL', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('gethostbyaddr', prefix : '#include <netdb.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_GETHOSTBYADDR', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('herror', prefix : '#include <netdb.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_HERROR', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('strerror', prefix : '#include <string.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STRERROR', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('popen', prefix : '#include <stdio.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_POPEN', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('uname', prefix : '#include <sys/utsname.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_UNAME', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('access', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_ACCESS', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('chmod', prefix : '#include <sys/stat.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_CHMOD', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('alarm', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_ALARM', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('timegm', prefix : '#include <time.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_TIMEGM', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('mremap', prefix : '#include <sys/mman.h>', args: '-D_GNU_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_MREMAP', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('strcasecmp', prefix : '#include <strings.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STRCASECMP', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('strncasecmp', prefix : '#include <strings.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STRNCASECMP', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('strcasestr', prefix : '#include <string.h>', args: '-D_GNU_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STRCASESTR', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STRSTR', 1)
|
|
|
|
conf_data.set('HAVE_STRCHR', 1)
|
|
|
|
conf_data.set('HAVE_STRRCHR', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
if compiler.has_function('memmove', prefix : '#include <string.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_MEMMOVE', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('bcopy', prefix : '#include <strings.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_BCOPY', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('stpcpy', prefix : '#include <string.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STPCPY', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('strdup', prefix : '#include <string.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_STRDUP', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('index', prefix : '#include <strings.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_INDEX', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('isdigit', prefix : '#include <ctype.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_ISDIGIT', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2022-03-03 10:20:24 -05:00
|
|
|
if compiler.has_function('mempcpy', prefix : '#include <string.h>', args: '-D_GNU_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_MEMPCPY', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('memrchr', prefix : '#include <string.h>', args: '-D_GNU_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_MEMRCHR', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('snprintf', prefix : '#include <stdio.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_SNPRINTF', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2022-02-28 09:55:23 -05:00
|
|
|
if compiler.has_function('vsnprintf', prefix : '#include <stdio.h>\n#include <stdarg.h>', args: '-D_ISOC99_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_VSNPRINTF', 1)
|
|
|
|
conf_data.set('HAVE_C99_VSNPRINTF', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('asprintf', prefix : '#include <stdio.h>', args: '-D_GNU_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_ASPRINTF', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('vasprintf', prefix : '#include <stdio.h>', args: '-D_GNU_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_VASPRINTF', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('getifaddrs', prefix : '#include <ifaddrs.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_GETIFADDRS', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('getpwnam', prefix : '#include <pwd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_GETPWNAM', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if compiler.has_function('inet_aton', prefix : '#include <arpa/inet.h>', dependencies: wattdeps)
|
2022-05-03 09:33:48 -04:00
|
|
|
conf_data.set('HAVE_INET_ATON', 1)
|
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if compiler.has_function('inet_pton', prefix : '#include <arpa/inet.h>', dependencies: wattdeps)
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_INET_PTON', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if compiler.has_function('inet_ntop', prefix : '#include <arpa/inet.h>', dependencies: wattdeps)
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_INET_NTOP', 1)
|
2023-11-08 14:10:04 -05:00
|
|
|
elif compiler.has_function('inet_ntop', prefix : '#include <ws2tcpip.h>')
|
|
|
|
conf_data.set('HAVE_INET_NTOP', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('fflush', prefix : '#include <stdio.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_FFLUSH', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('fsync', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_FSYNC', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('fseeko', prefix : '#include <stdio.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_FSEEKO', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('ftello', prefix : '#include <stdio.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_FTELLO', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('sigaction', prefix : '#include <signal.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_SIGACTION', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('gettimeofday', prefix : '#include <sys/time.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_GETTIMEOFDAY', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('clock_gettime', prefix : '#include <time.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_CLOCK_GETTIME', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('setenv', prefix : '#include <stdlib.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_SETENV', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('HAVE_SETENV_OR_PUTENV', true)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('putenv', prefix : '#include <stdlib.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_PUTENV', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('HAVE_SETENV_OR_PUTENV', true)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('unsetenv', prefix : '#include <stdlib.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_UNSETENV', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2024-04-19 05:14:18 -04:00
|
|
|
if compiler.has_function('getegid', prefix : '#include <unistd.h>')
|
|
|
|
conf_data.set('HAVE_GETEGID', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('getgid', prefix : '#include <unistd.h>')
|
|
|
|
conf_data.set('HAVE_GETGID', 1)
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if compiler.has_function('getuid', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_GETUID', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('geteuid', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_GETEUID', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('wcwidth', prefix : '#include <wchar.h>', args: '-D_XOPEN_SOURCE')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_WCWIDTH', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if not conf_data.get('CONFIG_OS_DOS') and compiler.has_function('fork', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_FORK', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('setpgid', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_SETPGID', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('getpgid', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_GETPGID', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('setpgrp', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_SETPGRP', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('getpgrp', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_GETPGRP', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('raise', prefix : '#include <signal.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_RAISE', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('kill', prefix : '#include <signal.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_KILL', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('fpathconf', prefix : '#include <unistd.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_FPATHCONF', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('poll', prefix : '#include <poll.h>')
|
2022-03-14 10:56:12 -04:00
|
|
|
conf_data.set('HAVE_POLL', 1)
|
2020-09-05 16:02:16 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_base_set', prefix: eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_BASE_SET', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_get_version', prefix: eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_GET_VERSION', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_get_method', prefix : eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_GET_METHD', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_base_free', prefix : eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_BASE_FREE', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_base_new', prefix : eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_BASE_NEW', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_reinit', prefix : eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_REINIT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_base_get_method', prefix : eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_BASE_GET_METHOD', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_reinit', prefix : eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_REINIT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_config_set_flag', prefix : eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_CONFIG_SET_FLAG', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('event_get_struct_event_size', prefix : eh, dependencies: eventdeps)
|
|
|
|
conf_data.set('HAVE_EVENT_GET_STRUCT_EVENT_SIZE', 1)
|
|
|
|
endif
|
|
|
|
|
2022-05-10 10:56:46 -04:00
|
|
|
if compiler.has_function('RAND_add', prefix: '#include <openssl/rand.h>', dependencies: ssldeps)
|
|
|
|
conf_data.set('HAVE_RAND_ADD', 1)
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if compiler.has_function('RAND_bytes', prefix: '#include <openssl/rand.h>', dependencies: ssldeps)
|
|
|
|
conf_data.set('HAVE_RAND_BYTES', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('ASN1_STRING_get0_data', prefix: '#include <openssl/asn1.h>', dependencies: ssldeps)
|
|
|
|
conf_data.set('HAVE_ASN1_STRING_GET0_DATA', 1)
|
|
|
|
endif
|
|
|
|
|
2024-06-03 08:47:40 -04:00
|
|
|
iconvdeps = compiler.find_library('iconv', static: st, required: false)
|
2022-06-28 14:30:49 -04:00
|
|
|
if iconvdeps.found()
|
|
|
|
deps += iconvdeps
|
|
|
|
endif
|
2022-06-28 14:24:22 -04:00
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
if compiler.has_function('nl_langinfo', prefix: '#include <langinfo.h>')
|
|
|
|
conf_data.set('HAVE_LANGINFO_CODESET', 1)
|
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if compiler.has_function('iconv', prefix: '#include <iconv.h>', dependencies: iconvdeps)
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('HAVE_ICONV', 1)
|
|
|
|
endif
|
|
|
|
|
2022-06-28 14:24:22 -04:00
|
|
|
if conf_data.get('CONFIG_OS_DOS') or compiler.has_function('alloca', prefix: '#include <alloca.h>')
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('HAVE_ALLOCA', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('rb_errinfo', prefix: '#include <ruby.h>', dependencies: rubydeps)
|
|
|
|
conf_data.set('HAVE_RB_ERRINFO', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('gnutls_priority_set_direct', prefix: '#include <gnutls/gnutls.h>', dependencies: gnutlsdeps)
|
|
|
|
conf_data.set('HAVE_GNUTLS_PRIORITY_SET_DIRECT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if compiler.has_function('gnutls_certificate_set_x509_system_trust', prefix: '#include <gnutls/gnutls.h>', dependencies: gnutlsdeps)
|
|
|
|
conf_data.set('HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST', 1)
|
|
|
|
endif
|
|
|
|
|
2022-01-06 13:51:18 -05:00
|
|
|
if compiler.has_function('mkstemps', prefix: '#include <stdlib.h>', args: '-D_GNU_SOURCE')
|
|
|
|
conf_data.set('HAVE_MKSTEMPS', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-19 12:26:07 -04:00
|
|
|
if compiler.has_function('setlocale', prefix: '#include <locale.h>')
|
|
|
|
conf_data.set('HAVE_SETLOCALE', 1)
|
|
|
|
endif
|
|
|
|
|
2022-03-03 10:26:24 -05:00
|
|
|
if compiler.has_function('strtoul', prefix: '#include <stdlib.h>')
|
|
|
|
conf_data.set('HAVE_STRTOUL', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-19 11:54:14 -04:00
|
|
|
if compiler.compiles('int a; typeof(a) b;', name: 'typeof')
|
2022-01-22 09:00:10 -05:00
|
|
|
conf_data.set('HAVE_TYPEOF', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-19 11:54:14 -04:00
|
|
|
if compiler.compiles('''#include <unistd.h>
|
|
|
|
int func(void) { return sysconf(_SC_PAGE_SIZE); }
|
|
|
|
''', name: '_SC_PAGE_SIZE')
|
|
|
|
conf_data.set('HAVE_SC_PAGE_SIZE', 1)
|
|
|
|
endif
|
|
|
|
|
2024-04-19 12:26:07 -04:00
|
|
|
if compiler.compiles('''#include <locale.h>
|
|
|
|
int func(void) { return LC_MESSAGES; }
|
|
|
|
''', name: 'LC_MESSAGES')
|
|
|
|
conf_data.set('HAVE_LC_MESSAGES', 1)
|
|
|
|
endif
|
|
|
|
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('ICONV_CONST', true)
|
|
|
|
|
2020-09-07 11:48:37 -04:00
|
|
|
sysconfdir = get_option('prefix') / get_option('sysconfdir')/'elinks'
|
|
|
|
conf_data.set('CONFDIR', sysconfdir)
|
|
|
|
conf_data.set('sysconfdir', sysconfdir)
|
|
|
|
conf_data.set('SOMETHING', '@SOMETHING@')
|
2024-06-03 11:22:24 -04:00
|
|
|
conf_data.set('api_srcdir', srcdir / 'src')
|
2020-09-05 16:02:16 -04:00
|
|
|
conf_data.set('LIBDIR', get_option('prefix') / 'lib')
|
|
|
|
conf_data.set('LOCALEDIR', get_option('prefix') / 'share/locale')
|
|
|
|
|
|
|
|
conf_data.set('HAVE_SA_STORAGE', true)
|
2022-03-03 11:11:10 -05:00
|
|
|
conf_data.set('HAVE_SA_IN6', true)
|
2020-09-05 16:02:16 -04:00
|
|
|
|
|
|
|
conf_data.set('SIZEOF_CHAR', compiler.sizeof('char'))
|
|
|
|
conf_data.set('SIZEOF_SHORT', compiler.sizeof('short'))
|
|
|
|
conf_data.set('SIZEOF_INT', compiler.sizeof('int'))
|
|
|
|
conf_data.set('SIZEOF_LONG', compiler.sizeof('long'))
|
|
|
|
conf_data.set('SIZEOF_LONG_LONG', compiler.sizeof('long long'))
|
|
|
|
conf_data.set('SIZEOF_OFF_T', compiler.sizeof('off_t'))
|
|
|
|
|
|
|
|
conf_data.set('CONFIG_GNUTLS_OPENSSL_COMPAT', false)
|
|
|
|
|
|
|
|
configure_file(input : 'config2.h.in',
|
|
|
|
output : 'config.h',
|
|
|
|
configuration : conf_data)
|
|
|
|
|
2022-10-08 05:05:15 -04:00
|
|
|
testdeps = files('src/intl/charsets.c', 'src/osdep/stub.c', 'src/util/conv.c', 'src/util/error.c',
|
2022-10-04 15:23:31 -04:00
|
|
|
'src/util/file.c', 'src/util/hash.c', 'src/util/memory.c', 'src/util/string.c', 'src/util/time.c')
|
|
|
|
|
2022-10-08 05:05:15 -04:00
|
|
|
if conf_data.get('CONFIG_DEBUG')
|
|
|
|
testdeps += files('src/util/memdebug.c')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf_data.get('CONFIG_UTF8')
|
|
|
|
testdeps += files('src/intl/width.c')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not conf_data.get('CONFIG_SMALL')
|
|
|
|
testdeps += files('src/util/fastfind.c')
|
|
|
|
endif
|
|
|
|
|
2023-11-23 15:14:44 -05:00
|
|
|
if conf_data.get('CONFIG_NLS')
|
|
|
|
subdir('po')
|
|
|
|
endif
|
2020-09-05 16:02:16 -04:00
|
|
|
subdir('src')
|
2020-09-07 11:48:37 -04:00
|
|
|
subdir('contrib')
|
2023-12-23 08:12:46 -05:00
|
|
|
|
|
|
|
if get_option('doc')
|
|
|
|
subdir('doc')
|
|
|
|
endif
|
2024-06-01 15:24:56 -04:00
|
|
|
|
|
|
|
if get_option('test')
|
2024-06-02 04:13:35 -04:00
|
|
|
subdir('test/ecmascript/assert')
|
2024-06-01 15:24:56 -04:00
|
|
|
endif
|