Commit 851bc59c authored by Albert Astals Cid's avatar Albert Astals Cid

Remove the autotools based build system

parent 1a33f60d
.cvsignore
Makefile
Makefile.in
aclocal.m4
autom4te.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
test-driver
compile
ChangeLog
gtkdoc.pyc
poppler-cairo.pc
poppler-cpp.pc
poppler-glib.pc
......@@ -26,7 +9,6 @@ poppler-qt4.pc
poppler-qt5.pc
poppler-splash.pc
poppler.pc
stamp-h1
gtk-doc.make
*.o
*~
......
This diff is collapsed.
Installation Instructions
*************************
Basic Installation
==================
mkdir build
cd build
cmake ..
make
make install
CMake configuration options can be set using the -D option. eg
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=release
Build Options
=============
Set install prefix:
-DCMAKE_INSTALL_PREFIX=<path>
Set build type. This sets the standard compiler flags for the build
type.
-DCMAKE_BUILD_TYPE=debug or -DCMAKE_BUILD_TYPE=release
Set compiler flags:
-DCMAKE_CXX_FLAGS=<flags> or set CXXFLAGS environment variable
Set linker flags:
-DCMAKE_LD_FLAGS=<flags> or set LDFLAGS environment variable
Optional Features
=================
-D<FEATURE>=<ON|OFF>
eg
-DENABLE_SPLASH=ON -DBUILD_GTK_TESTS=OFF
A list of all options can be display with the commmand:
egrep '^ *(option|set.*STRING)' CMakeLists.txt
Alternatively, the options can be edited by running "ccmake ." in the
build directory.
Cross Compiling
===============
A toolchain file is required to specify the target specific compiler
tools. Run cmake with the option:
-DCMAKE_TOOLCHAIN_FILE=<Toolchain file>
A sample toolchain for a 64-bit mingw build is shown below. Replace
/path/to/win/root with the install prefix for the target environment.
SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /path/to/win/root )
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
ACLOCAL_AMFLAGS = -I m4
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --with-testdatadir=$(TESTDATADIR)
if BUILD_SPLASH_OUTPUT
splash_subdir = splash
splash_pc_file = poppler-splash.pc
endif
if BUILD_CAIRO_OUTPUT
cairo_pc_file = poppler-cairo.pc
endif
if BUILD_POPPLER_GLIB
glib_subdir = glib
glib_pc_file = poppler-glib.pc
endif
if BUILD_POPPLER_QT5
qt5_subdir = qt5
qt5_pc_file = poppler-qt5.pc
endif
if BUILD_POPPLER_QT4
qt4_subdir = qt4
qt4_pc_file = poppler-qt4.pc
endif
if BUILD_POPPLER_CPP
cpp_subdir = cpp
cpp_pc_file = poppler-cpp.pc
endif
SUBDIRS = goo fofi $(splash_subdir) poppler utils $(glib_subdir) test $(qt4_subdir) $(qt5_subdir) $(cpp_subdir)
EXTRA_DIST = \
README-XPDF \
poppler.pc.in \
poppler-uninstalled.pc.in \
poppler-cairo.pc.in \
poppler-cairo-uninstalled.pc.in \
poppler-splash.pc.in \
poppler-splash-uninstalled.pc.in \
poppler-qt4.pc.in \
poppler-qt4-uninstalled.pc.in \
poppler-qt5.pc.in \
poppler-qt5-uninstalled.pc.in \
poppler-cpp.pc.in \
poppler-cpp-uninstalled.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
poppler.pc \
$(cairo_pc_file) \
$(splash_pc_file) \
$(glib_pc_file) \
$(qt4_pc_file) \
$(qt5_pc_file) \
$(cpp_pc_file)
# Add CMake buildsystem files here so they get added on make dist
EXTRA_DIST += \
cpp/tests/CMakeLists.txt \
cpp/CMakeLists.txt \
glib/demo/CMakeLists.txt \
glib/CMakeLists.txt \
glib/poppler-features.h.cmake \
qt4/src/CMakeLists.txt \
qt4/tests/CMakeLists.txt \
qt4/CMakeLists.txt \
qt4/demos/CMakeLists.txt \
qt5/src/CMakeLists.txt \
qt5/tests/CMakeLists.txt \
qt5/CMakeLists.txt \
qt5/demos/CMakeLists.txt \
test/CMakeLists.txt \
utils/CMakeLists.txt \
CMakeLists.txt \
ConfigureChecks.cmake \
cmake/modules/CheckFileOffsetBits.c \
cmake/modules/CheckFileOffsetBits.cmake \
cmake/modules/COPYING-CMAKE-SCRIPTS \
cmake/modules/FindCairo.cmake \
cmake/modules/FindFontconfig.cmake \
cmake/modules/FindGLIB.cmake \
cmake/modules/FindGObjectIntrospection.cmake \
cmake/modules/FindGTK.cmake \
cmake/modules/FindIconv.cmake \
cmake/modules/FindLCMS.cmake \
cmake/modules/FindLCMS2.cmake \
cmake/modules/FindNSS3.cmake \
cmake/modules/FindQt4.cmake \
cmake/modules/GObjectIntrospectionMacros.cmake \
cmake/modules/MacroBoolTo01.cmake \
cmake/modules/MacroEnsureVersion.cmake \
cmake/modules/MacroOptionalFindPackage.cmake \
cmake/modules/MacroPushRequiredVars.cmake \
cmake/modules/PopplerDefaults.cmake \
cmake/modules/PopplerMacros.cmake \
cmake/modules/FindLIBOPENJPEG.cmake \
cmake/modules/FindLIBOPENJPEG2.cmake \
config.h.cmake \
poppler-cairo.pc.cmake \
poppler/poppler-config.h.cmake \
poppler-cpp.pc.cmake \
poppler-glib.pc.cmake \
poppler-qt4.pc.cmake \
poppler-qt5.pc.cmake \
poppler-splash.pc.cmake \
poppler.pc.cmake
distclean-local:
if test "$(srcdir)" = "."; then :; else \
rm -f ChangeLog; \
fi
ChangeLog:
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log --stat) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git log is required to generate ChangeLog >&2 && \
echo A git checkout and git log is required to generate this file >> $@); \
fi
.PHONY: ChangeLog
#!/bin/sh
# Package name
PKG_NAME=${PKG_NAME:-Poppler}
srcdir=$(dirname $0)
# Default version requirements
REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0}
# Print types
boldface="`tput bold 2>/dev/null`"
normal="`tput sgr0 2>/dev/null`"
printbold() {
echo $ECHO_N "$boldface"
echo "$@"
echo $ECHO_N "$normal"
}
printboldn() {
echo -n $ECHO_N "$boldface"
echo "$@"
echo -n $ECHO_N "$normal"
}
printerr() {
echo "$@" >&2
}
# Usage:
# compare_versions MIN_VERSION ACTUAL_VERSION
# returns true if ACTUAL_VERSION >= MIN_VERSION
compare_versions() {
ch_min_version=$1
ch_actual_version=$2
ch_status=0
IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
set $ch_actual_version
for ch_min in $ch_min_version; do
ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
if [ -z "$ch_min" ]; then break; fi
if [ -z "$ch_cur" ]; then ch_status=1; break; fi
if [ $ch_cur -gt $ch_min ]; then break; fi
if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
done
IFS="$ch_save_IFS"
return $ch_status
}
# Usage:
# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE
# checks to see if the package is available
version_check() {
vc_package=$1
vc_variable=$2
vc_checkprogs=$3
vc_min_version=$4
vc_source=$5
vc_status=1
vc_checkprog=`eval echo "\\$$vc_variable"`
if [ -n "$vc_checkprog" ]; then
printbold "using $vc_checkprog for $vc_package"
return 0
fi
printbold "Checking for $vc_package >= $vc_min_version..."
for vc_checkprog in $vc_checkprogs; do
echo -n $ECHO_N " Testing $vc_checkprog... "
if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
vc_actual_version=`$vc_checkprog --version | head -n 1 | \
sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'`
if compare_versions $vc_min_version $vc_actual_version; then
echo "found $vc_actual_version"
# set variable
eval "$vc_variable=$vc_checkprog"
vc_status=0
break
else
echo "too old (found version $vc_actual_version)"
fi
else
echo "not found."
fi
done
if [ "$vc_status" != 0 ]; then
printerr
printboldn " Error: You must have $vc_package >= $vc_min_version"
printboldn " installed to build $PKG_NAME"
printerr
printerr " Download the appropriate package for"
printerr " from your distribution or get the source tarball at"
printerr " $vc_source"
printerr
fi
return $vc_status
}
want_gtk_doc=false
if [ ! "`echo $@ |grep -- --enable-gtk-doc`" = "" ]; then
version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \
"http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" || DIE=1
want_gtk_doc=true
fi
printbold "Running autoreconf -v -i ..."
(cd $srcdir && autoreconf -v -i )
if $want_gtk_doc; then
printbold "Running $GTKDOCIZE..."
(cd $srcdir && $GTKDOCIZE --copy) || exit 1
fi
if test x$NOCONFIGURE = x; then
printbold "Running $srcdir/configure $@ ..."
$srcdir/configure "$@"
else
printbold "Skipping configure process."
fi
This diff is collapsed.
SUBDIRS = . tests
lib_LTLIBRARIES = libpoppler-cpp.la
libpoppler_cpp_includedir = $(includedir)/poppler/cpp
libpoppler_cpp_include_HEADERS = \
poppler-document.h \
poppler-embedded-file.h \
poppler-font.h \
poppler-global.h \
poppler-image.h \
poppler-page.h \
poppler-page-renderer.h \
poppler-page-transition.h \
poppler-rectangle.h \
poppler-toc.h \
$(builddir)/poppler-version.h
libpoppler_cpp_la_SOURCES = \
poppler-document.cpp \
poppler-document-private.h \
poppler-embedded-file.cpp \
poppler-embedded-file-private.h \
poppler-font.cpp \
poppler-global.cpp \
poppler-image.cpp \
poppler-image-private.h \
poppler-page.cpp \
poppler-page-private.h \
poppler-page-renderer.cpp \
poppler-page-transition.cpp \
poppler-private.cpp \
poppler-private.h \
poppler-rectangle.cpp \
poppler-toc.cpp \
poppler-toc-private.h \
poppler-version.cpp
if BUILD_LIBJPEG
libjpeg_includes = $(LIBJPEG_CFLAGS)
endif
if BUILD_LIBTIFF
libtiff_includes = $(LIBTIFF_CFLAGS)
endif
if BUILD_LIBOPENJPEG
libjpeg2000_includes = $(LIBOPENJPEG_CFLAGS)
endif
if BUILD_LIBPNG
libpng_includes = $(LIBPNG_CFLAGS)
endif
libpoppler_cpp_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/goo \
-I$(top_srcdir)/poppler \
$(libjpeg_includes) \
$(libtiff_includes) \
$(libjpeg2000_includes) \
$(libpng_includes)
libpoppler_cpp_la_CXXFLAGS = \
-Dpoppler_cpp_EXPORTS
libpoppler_cpp_la_LIBADD = \
$(top_builddir)/poppler/libpoppler.la \
$(LIBICONV)
libpoppler_cpp_la_LDFLAGS = \
-version-info 3:0:3 \
@create_shared_lib@ \
@auto_import_flags@
AM_LDFLAGS = @auto_import_flags@
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/utils \
-I$(top_srcdir)/cpp
LDADD = \
$(top_builddir)/utils/libparseargs.la \
$(top_builddir)/poppler/libpoppler.la \
$(top_builddir)/cpp/libpoppler-cpp.la
noinst_PROGRAMS = \
poppler-dump \
poppler-render
poppler_dump_SOURCES = \
poppler-dump.cpp
poppler_render_SOURCES = \
poppler-render.cpp
noinst_LTLIBRARIES = libfofi.la
if ENABLE_XPDF_HEADERS
poppler_fofi_includedir = $(includedir)/poppler/fofi
poppler_fofi_include_HEADERS = \
FoFiBase.h \
FoFiEncodings.h \
FoFiTrueType.h \
FoFiType1.h \
FoFiIdentifier.h \
FoFiType1C.h
endif
libfofi_la_SOURCES = \
FoFiBase.cc \
FoFiBase.h \
FoFiEncodings.cc \
FoFiEncodings.h \
FoFiTrueType.cc \
FoFiTrueType.h \
FoFiType1.cc \
FoFiType1.h \
FoFiType1C.cc \
FoFiIdentifier.cc \
FoFiType1C.h
libfofi_la_CPPFLAGS = \
-I$(top_srcdir)
AM_LDFLAGS = @auto_import_flags@
SUBDIRS = . reference demo
lib_LTLIBRARIES = libpoppler-glib.la
stamp_files = stamp-poppler-enums.h
poppler-enums.h: stamp-poppler-enums.h
@true
stamp-poppler-enums.h: poppler-enums.h.template $(poppler_glib_public_headers)
$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \
&& (cmp -s xgen-etbh poppler-enums.h || cp xgen-etbh poppler-enums.h ) \
&& rm -f xgen-etbh \
&& echo timestamp > $(@F)
poppler-enums.c: poppler-enums.c.template $(poppler_glib_public_headers)
$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \
&& (cmp -s xgen-etbc poppler-enums.c || cp xgen-etbc poppler-enums.c ) \
&& rm -f xgen-etbc
EXTRA_DIST = \
poppler-enums.h.template \
poppler-enums.c.template
poppler_glib_public_headers = \
poppler-action.h \
poppler-date.h \
poppler-document.h \
poppler-page.h \
poppler-attachment.h \
poppler-form-field.h \
poppler-annot.h \
poppler-layer.h \
poppler-media.h \
poppler-movie.h \
poppler-structure-element.h \
poppler.h
poppler_glib_includedir = $(includedir)/poppler/glib
poppler_glib_include_HEADERS = \
$(poppler_glib_public_headers) \
poppler-enums.h
nodist_poppler_glib_include_HEADERS = poppler-features.h
libpoppler_glib_la_SOURCES = \
$(BUILT_SOURCES) \
poppler-action.cc \
poppler-date.cc \
poppler-document.cc \
poppler-page.cc \
poppler-attachment.cc \
poppler-form-field.cc \
poppler-annot.cc \
poppler-layer.cc \
poppler-media.cc \
poppler-movie.cc \
poppler-cached-file-loader.cc \
poppler-cached-file-loader.h \
poppler-input-stream.cc \
poppler-input-stream.h \
poppler-structure-element.cc \
poppler.cc \
poppler-private.h
libpoppler_glib_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Poppler\" \
-I$(top_srcdir) \
-I$(top_srcdir)/poppler \
$(POPPLER_GLIB_CFLAGS) \
$(FREETYPE_CFLAGS) \
$(POPPLER_GLIB_DISABLE_DEPRECATED) \
$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
libpoppler_glib_la_LIBADD = \
$(top_builddir)/poppler/libpoppler.la \
$(top_builddir)/poppler/libpoppler-cairo.la \
$(PTHREAD_LIBS) \
$(POPPLER_GLIB_LIBS) \
$(FREETYPE_LIBS)
libpoppler_glib_la_LDFLAGS = \
-version-info 17:0:9 \
@create_shared_lib@ \
@auto_import_flags@
BUILT_SOURCES = \
poppler-enums.c \
poppler-enums.h
CLEANFILES = $(BUILT_SOURCES) $(stamp_files)
DISTCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
# GObject Introspection
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
introspection_files = $(filter-out poppler-private.h poppler-input-stream.h, $(libpoppler_glib_la_SOURCES)) $(poppler_glib_include_HEADERS) $(nodist_poppler_glib_include_HEADERS)
Poppler-0.18.gir: libpoppler-glib.la
Poppler_0_18_gir_INCLUDES = GObject-2.0 Gio-2.0 cairo-1.0
Poppler_0_18_gir_CFLAGS = $(INCLUDES) -I$(top_builddir)
Poppler_0_18_gir_LIBS = libpoppler-glib.la $(top_builddir)/poppler/libpoppler.la $(top_builddir)/poppler/libpoppler-cairo.la
Poppler_0_18_gir_FILES = $(introspection_files)
Poppler_0_18_gir_SCANNERFLAGS = --c-include poppler.h
Poppler_0_18_gir_EXPORT_PACKAGES = poppler-glib
INTROSPECTION_GIRS += Poppler-0.18.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
typelibsdir = $(libdir)/girepository-1.0
typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif #HAVE_INTROSPECTION
AM_LDFLAGS = @auto_import_flags@
if BUILD_GTK_TEST
bin_PROGRAMS = poppler-glib-demo
endif
poppler_glib_demo_SOURCES = \
main.c \
annots.h \
annots.c \
attachments.c \
attachments.h \
find.h \
find.c \
fonts.h \
fonts.c \
forms.h \
forms.c \
images.h \
images.c \
info.h \
info.cc \
layers.h \
layers.c \
links.h \
links.c \
outline.h \
outline.c \
page.h \
page.c \
print.h \
print.c \
render.h \
render.c \
selections.h \
selections.c \
text.h \
taggedstruct.h \
taggedstruct.c \
text.c \
transitions.h \
transitions.c \
utils.h \
utils.c
poppler_glib_demo_CPPFLAGS = \
-I$(top_srcdir)/glib \
-I$(top_builddir)/glib \
$(GTK_TEST_CFLAGS) \
$(POPPLER_GLIB_DISABLE_DEPRECATED) \
$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
poppler_glib_demo_LDADD = \
$(top_builddir)/glib/libpoppler-glib.la \
$(top_builddir)/poppler/libpoppler.la \
$(GTK_TEST_LIBS)
/* poppler-features.h: glib interface to poppler
* Copyright (C) 2006, Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __POPPLER_FEATURES_H__
#define __POPPLER_FEATURES_H__
/**
* SECTION:poppler-features
* @short_description: Variables and functions to check the poppler version and features
* @Title: Version and Features Information
*
* Poppler provides version information, and information about features
* enabled at compile time. This is primarily useful in configure checks
* for builds that have a configure script, or for allowing code to optionally
* depend but not require a specific poppler version.
*/
/**
* POPPLER_HAS_CAIRO:
*
* Defined if poppler was compiled with cairo support.
*/
@CAIRO_FEATURE@
/**
* POPPLER_MAJOR_VERSION:
*
* The major version number of the poppler header files (e.g. in poppler version
* 0.1.2 this is 0.)
*
* Since: 0.12
*/
#define POPPLER_MAJOR_VERSION (@POPPLER_MAJOR_VERSION@)
/**
* POPPLER_MINOR_VERSION:
*
* The major version number of the poppler header files (e.g. in poppler version
* 0.1.2 this is 1.)
*
* Since: 0.12
*/
#define POPPLER_MINOR_VERSION (@POPPLER_MINOR_VERSION@)
/**
* POPPLER_MICRO_VERSION:
*
* The micro version number of the poppler header files (e.g. in poppler version
* 0.1.2 this is 2.)
*
* Since: 0.12
*/
#define POPPLER_MICRO_VERSION (@POPPLER_MICRO_VERSION@)
/**
* POPPLER_CHECK_VERSION:
* @major: major version (e.g. 0 for version 0.1.2)
* @minor: minor version (e.g. 1 for version 0.1.2)
* @micro: micro version (e.g. 2 for version 0.1.2)
*
* Checks the version fo the poppler library
*
* Returns: %TRUE if the version of the poppler header files is the same
* as or newer than the passed-in version
*
* Since: 0.12
*/
#define POPPLER_CHECK_VERSION(major,minor,micro) \
(POPPLER_MAJOR_VERSION > (major) || \
(POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
(POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION == (minor) && POPPLER_MICRO_VERSION >= (micro)))
#endif /* __POPPLER_FEATURES_H__ */
## Process this file with automake to produce Makefile.in
# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6