| 1 |
dnl Process this file with autoconf to produce a configure script. |
| 2 |
dnl |
| 3 |
dnl Copyright (C) 2016 Karl Berry <[email protected]> |
| 4 |
dnl Copyright (C) 2009-2015 Peter Breitenlohner <[email protected]> |
| 5 |
dnl |
| 6 |
dnl This file is free software; the copyright holder |
| 7 |
dnl gives unlimited permission to copy and/or distribute it, |
| 8 |
dnl with or without modifications, as long as this notice is preserved. |
| 9 |
dnl |
| 10 |
m4_include([version.ac])[] dnl define xpdf_version |
| 11 |
AC_INIT([xpdf (TeX Live)], xpdf_version, [[email protected]]) |
| 12 |
AC_PREREQ([2.65]) |
| 13 |
AC_CONFIG_SRCDIR([xpdf-src/xpdf/Array.cc]) |
| 14 |
AC_CONFIG_AUX_DIR([../../build-aux]) |
| 15 |
AC_CONFIG_MACRO_DIR([../../m4]) |
| 16 |
|
| 17 |
KPSE_BASIC([xpdf], [no-define]) |
| 18 |
|
| 19 |
AC_PROG_CC |
| 20 |
AC_PROG_CXX |
| 21 |
AC_PROG_RANLIB |
| 22 |
AC_PROG_LN_S |
| 23 |
|
| 24 |
test "x$GXX" = xyes && NO_WARN_CXXFLAGS='-Wno-write-strings' |
| 25 |
AC_SUBST([NO_WARN_CXXFLAGS]) |
| 26 |
|
| 27 |
dnl ##### Optional features. |
| 28 |
AC_ARG_ENABLE([a4-paper], |
| 29 |
AS_HELP_STRING([--enable-a4-paper], |
| 30 |
[use A4 paper size instead of Letter for PostScript output]), |
| 31 |
[if test "x$enableval" = xyes; then |
| 32 |
AC_DEFINE([A4_PAPER], 1, [Use A4 paper size instead of Letter for PostScript output]) |
| 33 |
fi |
| 34 |
]) |
| 35 |
|
| 36 |
AC_ARG_ENABLE([opi], |
| 37 |
AS_HELP_STRING([--enable-opi], |
| 38 |
[include support for OPI comments]), |
| 39 |
[if test "x$enableval" = xyes; then |
| 40 |
AC_DEFINE([OPI_SUPPORT], 1, [Include support for OPI comments]) |
| 41 |
fi |
| 42 |
]) |
| 43 |
|
| 44 |
AC_ARG_ENABLE([multithreaded], |
| 45 |
AS_HELP_STRING([--enable-multithreaded], |
| 46 |
[include support for multithreading]), |
| 47 |
[if test "x$enableval" = xyes; then |
| 48 |
AC_DEFINE([MULTITHREADED], 1, [Enable multithreading support]) |
| 49 |
fi |
| 50 |
]) |
| 51 |
|
| 52 |
dnl **** Checks for header files **** |
| 53 |
|
| 54 |
AC_CHECK_HEADERS([strings.h sys/select.h time.h]) |
| 55 |
AC_HEADER_DIRENT |
| 56 |
|
| 57 |
dnl **** Checks for library functions **** |
| 58 |
|
| 59 |
AC_CHECK_FUNCS([popen mkstemp mkstemps]) |
| 60 |
AC_SYS_LARGEFILE |
| 61 |
AC_FUNC_FSEEKO |
| 62 |
AC_CHECK_FUNC([ftell64], |
| 63 |
[AC_CHECK_FUNCS([fseek64])]) |
| 64 |
|
| 65 |
AC_CONFIG_HEADERS([aconf.h], |
| 66 |
[sed -e 's/^#define PACKAGE/#define XPDF_PACKAGE/' \ |
| 67 |
-e 's/^#define VERSION/#define XPDF_VERSION/' aconf.h >aconf.tmp && mv -f aconf.tmp aconf.h]) |
| 68 |
|
| 69 |
AH_TOP([/* |
| 70 |
* aconf.h |
| 71 |
* |
| 72 |
* Copyright 2002-2003 Glyph & Cog, LLC |
| 73 |
*/ |
| 74 |
|
| 75 |
#ifndef ACONF_H |
| 76 |
#define ACONF_H |
| 77 |
|
| 78 |
|
| 79 |
/* |
| 80 |
* Enable C++ exceptions. |
| 81 |
*/ |
| 82 |
#undef USE_EXCEPTIONS]) |
| 83 |
AH_BOTTOM([#endif]) |
| 84 |
|
| 85 |
XPDF_TREE=xpdf-src |
| 86 |
AC_SUBST([XPDF_TREE]) |
| 87 |
|
| 88 |
|
| 89 |
AC_CONFIG_FILES([Makefile goo/Makefile fofi/Makefile splash/Makefile xpdf/Makefile]) |
| 90 |
|
| 91 |
AC_OUTPUT |