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