Debian Codegraph @

texk/upmendex/configure.ac

raw
1 dnl $Id: configure.ac 77026 2025-12-05 10:46:17Z takuji $
2 dnl Process this file with autoconf to produce a configure script.
3 dnl
4 dnl Copyright 2015-2021 Karl Berry <[email protected]>
5 dnl Copyright 2010-2015 Peter Breitenlohner <[email protected]>
6 dnl
7 dnl This file is free software; the copyright holder
8 dnl gives unlimited permission to copy and/or distribute it,
9 dnl with or without modifications, as long as this notice is preserved.
10 dnl
11 AC_INIT([upmendex (TeX Live)],[1.22])
12 AC_PREREQ([2.71])
13 AC_CONFIG_SRCDIR([main.c])
14 AC_CONFIG_AUX_DIR([../../build-aux])
15 AC_CONFIG_MACRO_DIR([../../m4])
16
17 dnl Common code for all programs using libkpathsea.
18 KPSE_COMMON([upmendex], [no-define])
19
20 AC_CONFIG_HEADERS([c-auto.h:c-auto.in])
21
22 m4_include([../../version.ac])[] dnl define tex_live_version
23 AC_DEFINE([TL_VERSION], ["TeX Live tex_live_version()"],
24 [Define to the current TeX Live version string.])
25
26 AC_CACHE_CHECK([if C99 variadic macros are supported],
27 [kpse_cv_have___VA_ARGS__],
28 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
29 #define foo(format, ...) printf(format, __VA_ARGS__)]],
30 [[foo("%s\n", "Hi, there");]])],
31 [kpse_cv_have___VA_ARGS__=yes],
32 [kpse_cv_have___VA_ARGS__=no])])
33 AS_CASE([$kpse_cv_have___VA_ARGS__],
34 [yes], [AC_DEFINE([HAVE___VA_ARGS__], 1,
35 [Define to 1 if you have C99 variadic macros.])])
36
37 AC_PROG_CXX
38 KPSE_CXX_HACK
39
40 dnl As of ICU 65.1, ICU requires -lpthread on x86_64-linux and, most
41 dnl likely, on other platforms. Otherwise there is a crash in
42 dnl std::call_once, as shown in ChangeLog. OpenBSD already has to link
43 dnl with -lpthread on all platforms (see m4/kpse-icu-flags.m4), but the
44 dnl double inclusion of -lpthread on obsd should be harmless. bibtexu
45 dnl also needs pthread to avoid failures.
46 dnl
47 dnl The autoconf-archive ax_pthread macro (used in asymptote) goes to
48 dnl much greater lengths to find the best thread library and support all
49 dnl platforms. We can switch to that if necessary, but hopefully this
50 dnl simple test will be enough.
51 dnl
52 KPSE_KPATHSEA_FLAGS
53 KPSE_SEARCH_LIBS([PTHREAD_LIB], [pthread_create], [pthread])
54 KPSE_ICU_FLAGS([icuio icui18n], [--ldflags-icuio])
55
56 AC_CONFIG_FILES([Makefile])
57
58 AC_OUTPUT