Debian Codegraph @

texk/dvipdfm-x/configure.ac

raw ◀ ▶
1 Debian patch touch this file
1 dnl $Id: configure.ac 77350 2026-01-13 13:03:36Z takuji $
2 dnl Process this file with autoconf to produce a configure script.
3 dnl
4 dnl Copyright 2016-2026 Karl Berry <[email protected]>
5 dnl Copyright 2009-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([dvipdfm-x (TeX Live)], [20260317], [[email protected]])
12 AC_PREREQ([2.65])
13 AC_CONFIG_SRCDIR([agl.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([dvipdfm-x])
19
20 AC_CONFIG_HEADERS([config.h])
21
22 dnl Checks for header files.
23 AC_CHECK_HEADERS([unistd.h stdint.h inttypes.h sys/types.h sys/wait.h])
24
25 dnl Checks for library functions.
26 AC_FUNC_MEMCMP
27 AC_CHECK_FUNCS([open close getenv basename])
28
29 dnl Checks for typedefs, structures, and compiler characteristics.
30 AC_STRUCT_TM
31 AC_STRUCT_TIMEZONE
32 AC_C_BIGENDIAN
33 AC_TYPE_INT32_T
34 AC_TYPE_UINT32_T
35
36 AC_CHECK_DECL([timezone],
37 [AC_DEFINE([HAVE_TIMEZONE], 1,
38 [Define if <time.h> has timezone as an external variable.])],
39 [],
40 [[#include <time.h>]])
41 AC_CHECK_MEMBER([struct tm.tm_gmtoff],
42 [AC_DEFINE([HAVE_TM_GMTOFF], 1,
43 [Define if struct tm has tm_gmtoff as a member.])],
44 [],
45 [[#include <time.h>]])
46
47 AC_CHECK_SIZEOF([char])
48 AC_CHECK_SIZEOF([short])
49 AC_CHECK_SIZEOF([int])
50 AC_CHECK_SIZEOF([long])
51
52 AC_SEARCH_LIBS([pow], [m])
53
54 KPSE_KPATHSEA_FLAGS
55 KPSE_ZLIB_FLAGS
56 KPSE_LIBPNG_FLAGS
57 KPSE_LIBPAPER_FLAGS
58 AC_DEFINE([HAVE_LIBPAPER], [1], [Define if you have libpaper.])
59
60 KPSE_SAVE_FLAGS
61
62 if test "x$enable_build" != xno || test -f config.force; then
63
64 KPSE_ADD_FLAGS([kpathsea])
65 AC_CHECK_HEADER([kpathsea/version.h], [],
66 [AC_MSG_ERROR([Sorry, kpathsea too old])])
67
68 KPSE_ADD_FLAGS([zlib])
69 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <zlib.h>]],
70 [[Bytef *dst,*src; uLong dstlen, srclen; int lvl, err;
71 err=compress2(dst, &dstlen, src, srclen, lvl);]])],
72 [],
73 [AC_MSG_ERROR([Sorry, you need zlib with compress2])])
74
75 KPSE_ADD_FLAGS([libpng])
76 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <png.h>]],
77 [[png_const_structp png; png_const_infop info; int err;
78 err=png_get_image_width(png, info);]])],
79 [],
80 [AC_MSG_ERROR([Sorry, you need libpng])])
81
82 KPSE_RESTORE_FLAGS
83
84 echo timestamp >config.force
85 fi
86
87 dnl We require zlib with compress2 and libpng
88 AC_DEFINE([HAVE_ZLIB], 1, [Define if you have zlib and its headers.])
89 AC_DEFINE([HAVE_ZLIB_COMPRESS2], 1, [Define if your zlib has the compress2 function.])
90 AC_DEFINE([HAVE_LIBPNG], 1, [Define if you have libpng and its headers.])
91
92 KPSE_WIN32_CALL
93
94 AC_CONFIG_FILES([Makefile])
95
96 AC_OUTPUT