diff -rNu3 build.xml build.xml
--- build.xml 2012-08-22 12:35:55.000000000 -0700
+++ build.xml 2012-08-17 11:48:37.000000000 -0700
@@ -453,7 +453,7 @@
stripcommand="${archutil}strip"
objcopycommand="${archutil}objcopy">
- -mwindows
+ -mconsole
-mthreads
@@ -527,7 +527,7 @@
stripcommand="${archutil}strip"
objcopycommand="${archutil}objcopy">
- -mwindows
+ -mconsole
-mthreads
diff -rNu3 build.xml.~1~ build.xml.~1~
--- build.xml.~1~ 2012-08-22 12:34:16.000000000 -0700
+++ build.xml.~1~ 1969-12-31 16:00:00.000000000 -0800
@@ -1,929 +0,0 @@
-
-
-
-
-
-
-
- Build file for the Inkscape SVG editor. This file
- was written for GTK-2.10 on Win32, but it should work
- well for other types of builds with only minor adjustments.
- Note that the default target is 'dist-all'. You can execute other
- targets instead, by "btool {target}", like "btool compile", if
- you want to save time, or "dist-inkscape" if you don't want inkview.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace Inkscape {
- char const *version_string = "${version} ${bzr.revision}";
- }
-
-
- #ifndef _CONFIG_H_
- #define _CONFIG_H_
-
- #ifndef WIN32
- #define WIN32
- #endif
-
- /*######################################
- ## This is for require-config.h, whose
- ## purpose I cannot fathom.
- ######################################*/
-
- #define PACKAGE_TARNAME
-
- /*######################################
- #### RESOURCE DIRECTORIES
- ######################################*/
-
- #define INKSCAPE_DATADIR "."
- #define PACKAGE_LOCALE_DIR "locale"
-
-
- /*######################################
- #### OTHER DEFINITIONS
- ######################################*/
-
- #define GETTEXT_PACKAGE "inkscape"
-
- #define PACKAGE_STRING VERSION
-
- #define HAVE_GETOPT_H 1
- #define HAVE_STRING_H 1
- #define HAVE_LIBINTL_H 1
- #define HAVE_MALLOC_H 1
- #define HAVE_STDLIB_H 1
- #define HAVE_SYS_STAT_H 1
- #define HAVE_INTTYPES_H 1
- #define HAVE_OPENMP 1
- #define HAVE_TR1_UNORDERED_SET 1
-
- #define HAVE_LIBLCMS1 1
-
- #define ENABLE_NLS 1
- #define HAVE_BIND_TEXTDOMAIN_CODESET 1
-
- /* keep binreloc off */
- #define BR_PTHREADS 0
- #undef ENABLE_BINRELOC
-
- /* CairoPDF options */
- #define HAVE_CAIRO_PDF 1
- #define PANGO_ENABLE_ENGINE 1
- #define RENDER_WITH_PANGO_CAIRO 1
-
- #define HAVE_GTK_WINDOW_FULLSCREEN 1
-
- /* internal interpreter */
- #define WITH_PYTHON 1
-
- /* shared whiteboard */
- #undef WITH_INKBOARD
- #undef HAVE_SSL
-
- /* use poppler for pdf import? */
- #define HAVE_POPPLER 1
- #define HAVE_POPPLER_GLIB 1
- #define HAVE_POPPLER_CAIRO 1
-
- /* do we want bitmap manipulation? */
- #define WITH_IMAGE_MAGICK 1
-
- /* Allow reading WordPerfect? */
- #define WITH_LIBWPG 1
-
- /* Default to libwpg 0.1.x */
- #define WITH_LIBWPG01 1
-
- /* Do we support SVG Fonts? */
- #define ENABLE_SVG_FONTS 1
-
- /* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
- #define LPE_ENABLE_TEST_EFFECTS 1
-
- #define HAVE_ASPELL 1
-
- #endif /* _CONFIG_H_ */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
- -Werror=return-type
- -O2
- -mms-bitfields
- -fopenmp
-
-
- -DVERSION=\"${version}\"
- -DHAVE_CONFIG_H
- -D_INTL_REDIRECT_INLINE
- -DHAVE_SSL
- -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }"
- -DPOPPLER_NEW_GFXFONT
-
-
-
- -DGLIBMM_DISABLE_DEPRECATED
- -DG_DISABLE_DEPRECATED
- -DGTK_DISABLE_SINGLE_INCLUDES
-
-
- -DGDKMM_DISABLE_DEPRECATED
- -DGSEAL_ENABLE
-
-
- -I${devlibs}/include
-
- ${pcc.gtkmm-2.4}
-
- ${pcc.Magick++}
- ${pcc.libxml-2.0}
- ${pcc.freetype2}
- ${pcc.cairo}
- ${pcc.poppler}
- -I${devlibs}/include/gc
- ${pcc.libwpg-0.1} ${pcc.libwpg-stream-0.1}
- -I${cxxtest}
-
-
-
- -I${devlibs}/python/include
-
- -I${src}/bind/javainc -I${src}/bind/javainc/win32
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- --include-dir=${src}
-
-
-
-
- -mconsole
- -mthreads
-
-
-
-
-
-
-
-
-
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${devlibs}/bin/libxml2.dll
- ${devlibs}/bin/libxslt.dll
- ${devlibs}/bin/libexslt.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lpopt -lz
- -lgc
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lpthreadGC2 -laspell
- -lmscms
-
-
-
-
-
-
-
-
-
- -mconsole
- -mthreads
-
-
-
-
-
-
-
-
-
-
-
-
-
- --include-dir=${src}
-
-
-
-
- -mconsole
- -mthreads
-
-
-
-
-
-
-
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${devlibs}/bin/libxml2.dll
- ${devlibs}/bin/libxslt.dll
- ${devlibs}/bin/libexslt.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lpopt -lz
- -lgc
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lpthreadGC2 -laspell
- -lmscms
-
-
-
-
-
-
-
-
-
-
-
- -mthreads
-
-
-
-
-
-
-
-
-
-
-
-
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${devlibs}/bin/libxml2.dll
- ${devlibs}/bin/libxslt.dll
- ${devlibs}/bin/libexslt.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lpopt -lz
- -lgc
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lpthreadGC2 -laspell
- -lmscms
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- gtk-icon-sizes = "gtk-menu=16,16:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32:inkscape-decoration=16,16"
- gtk-toolbar-icon-size = small-toolbar
-
- # disable images in buttons. i've only seen ugly delphi apps use this feature.
- gtk-button-images = 0
-
- # disable the annoying beep in editable controls
- gtk-error-bell = 0
-
- # enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
- # the office apps use them heavily, though.
- gtk-menu-images = 1
-
- # use the win32 button ordering instead of the GNOME HIG one, where applicable
- gtk-alternative-button-order = 1
-
- style "msw-default"
- {
- GtkWidget::interior-focus = 1
- GtkOptionMenu::indicator-size = { 9, 5 }
- GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
- GtkSpinButton::shadow-type = in
-
- # Owen and I disagree that these should be themable
- #GtkUIManager::add-tearoffs = 0
- #GtkComboBox::add-tearoffs = 0
-
- GtkComboBox::appears-as-list = 1
- GtkComboBox::focus-on-click = 0
-
- GOComboBox::add_tearoffs = 0
-
- GtkTreeView::allow-rules = 0
- GtkTreeView::expander-size = 12
-
- GtkExpander::expander-size = 12
-
- GtkScrolledWindow::scrollbar_spacing = 1
-
- GtkSeparatorMenuItem::horizontal-padding = 2
-
- engine "wimp"
- {
- }
- }
- class "*" style "msw-default"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Binary files .bzr/checkout/dirstate and .bzr/checkout/dirstate differ
diff -rNu3 .bzr/checkout/merge-hashes .bzr/checkout/merge-hashes
--- .bzr/checkout/merge-hashes 2012-08-22 12:35:55.000000000 -0700
+++ .bzr/checkout/merge-hashes 1969-12-31 16:00:00.000000000 -0800
@@ -1 +0,0 @@
-BZR merge-modified list format 1
diff -rNu3 configure.ac configure.ac
--- configure.ac 2012-08-22 12:35:55.000000000 -0700
+++ configure.ac 2012-08-08 09:04:00.000000000 -0700
@@ -11,6 +11,7 @@
AC_CANONICAL_HOST
AC_CONFIG_SRCDIR([src/main.cpp])
+AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax])
AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
@@ -69,7 +70,7 @@
AC_MSG_CHECKING([compiler support for -Werror=format-security])
ink_svd_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-Werror=format-security $CPPFLAGS"
- AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
AC_MSG_RESULT([$ink_opt_ok])
if test "x$ink_opt_ok" != "xyes"; then
CPPFLAGS="$ink_svd_CPPFLAGS"
@@ -83,7 +84,7 @@
AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
ink_svd_CFLAGS="$CFLAGS"
CFLAGS="-Wno-pointer-sign $CFLAGS"
- AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
AC_MSG_RESULT([$ink_opt_ok])
if test "x$ink_opt_ok" != "xyes"; then
CFLAGS="$ink_svd_CFLAGS"
@@ -96,7 +97,7 @@
AC_MSG_CHECKING([linker tolerates -z relro])
ink_svd_LDFLAGS="$LDFLAGS"
LDFLAGS="-Wl,-z,relro $LDFLAGS"
- AC_LINK_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
AC_MSG_RESULT([$ink_opt_ok])
if test "x$ink_opt_ok" != "xyes"; then
LDFLAGS="$ink_svd_LDFLAGS"
@@ -137,14 +138,14 @@
# Detect a working version of unordered containers.
AC_MSG_CHECKING([TR1 unordered_set usability])
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include
int main() {
std::tr1::unordered_set i, j;
i = j;
return 0;
}
-], [unordered_set_works=yes], [unordered_set_works=no])
+])], [unordered_set_works=yes], [unordered_set_works=no])
if test "x$unordered_set_works" = "xyes"; then
AC_MSG_RESULT([ok])
AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set])
@@ -161,13 +162,13 @@
ignore_strict_aliasing=no
CXXFLAGS_SAVE=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -Werror=strict-aliasing"
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include
boost::optional x;
int func() {
return *x;
}
-], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes])
+])], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes])
AC_MSG_RESULT($ignore_strict_aliasing)
CXXFLAGS=$CXXFLAGS_SAVE
if test "x$ignore_strict_aliasing" = "xyes"; then
@@ -609,7 +610,7 @@
AC_MSG_CHECKING(for new color space API in Poppler)
popplercolor="no"
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include
int main() {
@@ -618,7 +619,7 @@
p = &GfxColorSpace::parse;
return 0;
}
-], [popplercolor=yes])
+])], [popplercolor=yes])
if test "x$popplercolor" = "xyes"; then
AC_DEFINE(POPPLER_NEW_COLOR_SPACE_API, 1, [Use color space API from Poppler >= 0.12.2])
AC_MSG_RESULT(yes)
@@ -629,7 +630,7 @@
# Poppler's b604a008 commit changes this
AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor])
popplergfxcolor="no"
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include
int main() {
@@ -638,7 +639,7 @@
patch.color[[0]][[0]] = color;
return 0;
}
-], [popplergfxcolor=yes])
+])], [popplergfxcolor=yes])
if test "x$popplergfxcolor" = "xyes"; then
AC_DEFINE(POPPLER_NEW_GFXPATCH, 1, [GfxPatch no longer uses GfxColor in >= 0.15.1])
AC_MSG_RESULT(yes)
@@ -843,10 +844,10 @@
# Check for Apple Mac OS X Carbon framework
carbon_ok=no
AC_MSG_CHECKING([for Mac OS X Carbon support])
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include
#include
-], [carbon_ok=yes])
+])], [carbon_ok=yes])
AC_MSG_RESULT($carbon_ok)
if test "x$carbon_ok" = "xyes"; then
AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
@@ -1012,8 +1013,8 @@
ink_svd_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="-Wno-unused-parameter $CXXFLAGS"
# -Wno-unused-parameter isn't accepted by gcc 2.95.
- AC_COMPILE_IFELSE([int dummy;
-], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([int dummy;
+])], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",)
# Note: At least one bug has been caught from unused parameter warnings,
# so it might be worth trying not to disable it.
# One way of selectively disabling the warnings (i.e. only where the
@@ -1065,6 +1066,7 @@
src/libgdl/makefile
src/libnrtype/makefile
src/libavoid/makefile
+src/libunicode-convert/makefile
src/livarot/makefile
src/live_effects/makefile
src/live_effects/parameter/makefile
diff -rNu3 configure.ac.~1~ configure.ac.~1~
--- configure.ac.~1~ 2012-08-22 12:34:16.000000000 -0700
+++ configure.ac.~1~ 1969-12-31 16:00:00.000000000 -0800
@@ -1,1152 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.53)
-
-# Always use 0.xx+devel instead of 0.xxdevel for the version, e.g. 0.46+devel.
-# Rationale: (i) placate simple version comparison software such as
-# `dpkg --compare-versions'. (ii) We don't always know what the next
-# version is going to be called until about the time we release it
-# (whereas we always know what the previous version was called).
-AC_INIT(inkscape, 0.48+devel)
-
-AC_CANONICAL_HOST
-AC_CONFIG_SRCDIR([src/main.cpp])
-AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax])
-
-AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
- prefix=/opt/inkscape
- PATH="/opt/lsb/bin:$PATH"
- CC=lsbcc
- CXX=lsbc++
- export CC CXX
-])
-
-AM_CONFIG_HEADER(config.h)
-
-AC_LANG(C++)
-AC_ISC_POSIX
-AC_PROG_CXX
-AM_PROG_CC_STDC
-AM_PROG_AS
-AC_PROG_RANLIB
-AC_PROG_INTLTOOL(0.22)
-AC_PROG_LIBTOOL
-AC_HEADER_STDC
-INK_BZR_SNAPSHOT_BUILD
-
-dnl If automake 1.11 shave the output to look nice
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-
-dnl These next few lines are needed only while libcroco is in our source tree.
-AC_PROG_CC
-AM_PROG_CC_C_O
-if test "$GCC" = "yes"; then
- # Enable some warnings from gcc.
- AC_LANG_PUSH(C)
-
- ####
- # Generic cpp flags...
-
- # What is just plain "-W" ?
- # Fortify source requires -O2 or higher, which is handled with newer autoconf
- CPPFLAGS="-W -D_FORTIFY_SOURCE=2 $CPPFLAGS"
- # Enable format and format security warnings
- CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS"
- # Enable all default warnings
- CPPFLAGS="-Wall $CPPFLAGS"
- # Ensure that no deprecated glibmm symbols are introduced.
- # lp:inkscape builds cleanly with this option at r10957
- CPPFLAGS="-DGLIBMM_DISABLE_DEPRECATED $CPPFLAGS"
- CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS"
- CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
-
- # Ensure that private GTK+ fields are not accessible. This is the case for
- # GTK+ 3, so it is important to avoid using them in GTK+ 2.
- CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS"
-
- # Test for -Werror=... (introduced some time post-4.0)
- # If we hit a format error -- it should be fatal.
- AC_MSG_CHECKING([compiler support for -Werror=format-security])
- ink_svd_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-Werror=format-security $CPPFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
- AC_MSG_RESULT([$ink_opt_ok])
- if test "x$ink_opt_ok" != "xyes"; then
- CPPFLAGS="$ink_svd_CPPFLAGS"
- fi
-
- ####
- # C-specific flags...
-
- # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
- # by gcc 2.95.
- AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
- ink_svd_CFLAGS="$CFLAGS"
- CFLAGS="-Wno-pointer-sign $CFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
- AC_MSG_RESULT([$ink_opt_ok])
- if test "x$ink_opt_ok" != "xyes"; then
- CFLAGS="$ink_svd_CFLAGS"
- fi
-
- ####
- # Linker flags...
-
- # Have linker produce read-only relocations, if it knows how
- AC_MSG_CHECKING([linker tolerates -z relro])
- ink_svd_LDFLAGS="$LDFLAGS"
- LDFLAGS="-Wl,-z,relro $LDFLAGS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
- AC_MSG_RESULT([$ink_opt_ok])
- if test "x$ink_opt_ok" != "xyes"; then
- LDFLAGS="$ink_svd_LDFLAGS"
- fi
-
- AC_LANG_POP
-
- # C++-specific flags are defined further below. Look for CXXFLAGS...
-fi
-
-dnl Honor aclocal flags
-ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-
-dnl Verify our GCC version
-if test "x$GXX" = "xyes"; then
- AC_MSG_CHECKING([GNU compiler version])
-
- # Don't pass CXXFLAGS to the following CXX command as some
- # of them can't be specified along with '-v'.
- cc_version=["`$CXX -v 2>&1 = 3.0 is needed to compile inkscape])
- fi
-fi
-
-# Detect a working version of unordered containers.
-AC_MSG_CHECKING([TR1 unordered_set usability])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include
-int main() {
- std::tr1::unordered_set i, j;
- i = j;
- return 0;
-}
-])], [unordered_set_works=yes], [unordered_set_works=no])
-if test "x$unordered_set_works" = "xyes"; then
- AC_MSG_RESULT([ok])
- AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set])
-else
- AC_MSG_RESULT([not working])
-fi
-AC_CHECK_HEADER([boost/unordered_set.hpp], [AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1, [Boost unordered_set (Boost >= 1.36)])], [])
-AC_CHECK_HEADER([ext/hash_set], [AC_DEFINE(HAVE_EXT_HASH_SET, 1, [Legacy GNU ext/hash_set])], [])
-
-# Test whether GCC emits a spurious warning when using boost::optional
-# If yes, turn off strict aliasing warnings to reduce noise
-# and allow the legitimate warnings to stand out
-AC_MSG_CHECKING([for overzealous strict aliasing warnings])
-ignore_strict_aliasing=no
-CXXFLAGS_SAVE=$CXXFLAGS
-CXXFLAGS="$CXXFLAGS -Werror=strict-aliasing"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include
-boost::optional x;
-int func() {
- return *x;
-}
-])], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes])
-AC_MSG_RESULT($ignore_strict_aliasing)
-CXXFLAGS=$CXXFLAGS_SAVE
-if test "x$ignore_strict_aliasing" = "xyes"; then
- CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing"
-fi
-
-dnl ******************************
-dnl Gettext stuff
-dnl ******************************
-GETTEXT_PACKAGE="AC_PACKAGE_NAME"
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
-dnl Add the languages which your application supports here.
-ALL_LINGUAS="am ar az be bg bn bn_BD br ca ca@valencia cs da de dz el en_AU en_CA en_GB en_US@piglatin eo es_MX es et eu fa fi fr ga gl he hr hu hy id it ja km ko lt lv mk mn nb ne nl nn pa pl pt_BR pt ro ru rw sk sl sq sr@latin sr sv te_IN th tr uk vi zh_CN zh_TW"
-AM_GLIB_GNU_GETTEXT
-
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test "x$PKG_CONFIG" = "xno"; then
- AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
-fi
-
-dnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
-AC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
-AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-dnl ******************************
-dnl Check for OpenMP
-dnl Replace this with AC_OPENMP once Autoconf 2.62 is widespread
-dnl ******************************
-AX_OPENMP([openmp_ok=yes],[openmp_ok=no])
-if test "x$openmp_ok" = "xyes"; then
- dnl We have it, now set up the flags
- CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
- AC_CHECK_HEADER(omp.h)
- AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
-fi
-
-dnl ******************************
-dnl Check for libpng
-dnl ******************************
-AC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=no)], png_ok=no, -lz -lm)
-if test "x$png_ok" != "xyes"; then
- AC_MSG_ERROR([libpng >= 1.2 is needed to compile inkscape])
-fi
-
-dnl ******************************
-dnl Check for libexif
-dnl ******************************
-AC_CHECK_LIB(exif, exif_data_new_from_file, [AC_CHECK_HEADER(libexif/exif-data.h, exif_ok=yes, exif_ok=no)], exif_ok=no, -lm)
-if test "x$exif_ok" = "xyes"; then
- LIBS="-lexif $LIBS"
- AC_DEFINE(HAVE_EXIF, 1, [Use libexif])
-fi
-
-dnl ******************************
-dnl Check for libjpeg
-dnl ******************************
-AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no)], jpeg_ok=no)
-if test "x$jpeg_ok" = "xyes"; then
- LIBS="-ljpeg $LIBS"
- AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
-fi
-
-dnl Handle possible dlopen requirement for libgc
-dnl Isn't this internal to something in autoconf? Couldn't find it...
-AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
- ])
- ])
- ])
- ])
-
-AC_CHECK_HEADERS([gc.h gc/gc.h],
- [
- # To test for the different required libs, I have to
- # overcome autoconf's caching system, so I change the
- # desired function name. They're all in libgc.
- # The "break" will exit from the top level
- # AC_CHECK_HEADERS.
- gc_libs=""
- AC_CHECK_LIB(gc, GC_init,
- [gc_ok=yes;
- LIBS="-lgc $gc_libs $LIBS";
- break], [gc_ok=no], [$gc_libs])
- gc_libs="-lpthread"
- AC_CHECK_LIB(gc, GC_malloc,
- [gc_ok=yes;
- LIBS="-lgc $gc_libs $LIBS";
- break], [gc_ok=no], [$gc_libs])
- gc_libs="$lt_cv_dlopen_libs"
- AC_CHECK_LIB(gc, GC_realloc,
- [gc_ok=yes;
- LIBS="-lgc $gc_libs $LIBS";
- break], [gc_ok=no], [$gc_libs])
- gc_libs="-lpthread $lt_cv_dlopen_libs"
- AC_CHECK_LIB(gc, GC_free,
- [gc_ok=yes;
- LIBS="-lgc $gc_libs $LIBS";
- break], [gc_ok=no], [$gc_libs])
- break],
- [gc_ok=no])
-if test "x$gc_ok" = "xyes" && test "x$cross_compiling" = "xno" ; then
- AC_MSG_CHECKING([libgc version 6.4+])
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
- #ifdef HAVE_GC_GC_H
- # include
- #else
- # include
- #endif
- #include
- extern unsigned GC_version;
- int main(void){
- unsigned min = ((6 << 16) | (4 << 8) | 0);
- printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF);
- if (GC_version>=min) return 0;
- return 1;
- }]])],
- [gc_ok=yes],
- [gc_ok=no]
- )
- AC_MSG_RESULT([$gc_ok])
-fi
-if test "x$gc_ok" != "xyes"; then
- AC_MSG_ERROR([libgc (the Boehm Conservative Collector) 6.4+, is needed to compile inkscape -- http://www.hpl.hp.com/personal/Hans_Boehm/gc])
-fi
-
-dnl This check is to get a FIONREAD definition on Solaris 8
-AC_CHECK_HEADERS([sys/filio.h])
-
-
-AC_CHECK_HEADERS([malloc.h])
-AC_CHECK_FUNCS([mallinfo], [
- AC_CHECK_MEMBERS([struct mallinfo.usmblks,
- struct mallinfo.fsmblks,
- struct mallinfo.uordblks,
- struct mallinfo.fordblks,
- struct mallinfo.hblkhd],,,
- [#include ])
-])
-
-AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
-if test "x$FREETYPE_CONFIG" = "xno"; then
- AC_MSG_ERROR([Cannot find freetype-config])
-fi
-FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
-FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
-AC_SUBST(FREETYPE_CFLAGS)
-AC_SUBST(FREETYPE_LIBS)
-
-dnl ******************************
-dnl Win32
-dnl ******************************
-AC_MSG_CHECKING([for Win32 platform])
-case "$host" in
- *-*-mingw*)
- platform_win32=yes
- WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
- ;;
- *)
- platform_win32=no
- ;;
-esac
-AC_MSG_RESULT([$platform_win32])
-AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
-AC_SUBST(WIN32_CFLAGS)
-
-dnl TODO - switch to a linker/libtool/feature check, not OS check:
-dnl ******************************
-dnl MacOS X
-dnl ******************************
-AC_MSG_CHECKING([for OSX platform])
-if test "x$build_vendor" = "xapple" ; then
- platform_osx=yes
-else
- platform_osx=no
-fi
-AC_MSG_RESULT([$platform_osx])
-
-AC_MSG_CHECKING([for Solaris platform])
-case "$host" in
- *-solaris2.*)
- platform_solaris=yes
- solaris_version=`echo $host|sed -e 's/^.*-solaris2\.//' -e s'/\..*$//'`
- CFLAGS="$CFLAGS -DSOLARIS=$solaris_version"
- CXXFLAGS="$CXXFLAGS -DSOLARIS=$solaris_version"
- ;;
- *)
- platform_solaris=no
- ;;
-esac
-AC_MSG_RESULT([$platform_solaris])
-AM_CONDITIONAL(PLATFORM_SOLARIS, test "$platform_solaris" = "yes")
-
-dnl ******************************
-dnl gnome vfs checking
-dnl ******************************
-
-AC_ARG_WITH(gnome-vfs,
- AC_HELP_STRING([--with-gnome-vfs], [use gnome vfs for loading files]),
- [with_gnome_vfs=$withval], [with_gnome_vfs=auto])
-
-if test "x$with_gnome_vfs" = "xno"; then
- dnl Asked to ignore gnome-vfs
- gnome_vfs=no
-else
- dnl Have to test gnome-vfs presence
- PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.0, gnome_vfs=yes, gnome_vfs=no)
- if test "x$gnome_vfs" != "xyes"; then
- dnl No gnome-vfs found
- if test "x$with_gnome_vfs" = "xyes"; then
- dnl Gnome-VFS was explicitly asked for, so stop
- AC_MSG_ERROR([--with-gnome-vfs was specified, but appropriate libgnomevfs development packages could not be found])
- else
- # gnome-vfs is no, tell us for the log file
- AC_MSG_RESULT($gnome_vfs)
- fi
- fi
-fi
-
-AM_CONDITIONAL(USE_GNOME_VFS, test "x$gnome_vfs" = "xyes")
-if test "x$gnome_vfs" = "xyes"; then
- AC_DEFINE(WITH_GNOME_VFS, 1, [Use gnome vfs file load functionality])
-fi
-
-AC_SUBST(GNOME_VFS_CFLAGS)
-AC_SUBST(GNOME_VFS_LIBS)
-
-dnl ******************************
-dnl libinkjar checking
-dnl ******************************
-
-AC_ARG_WITH(inkjar,
- AC_HELP_STRING([--without-inkjar], [disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
-
-if test "x$with_ij" = "xyes"; then
- AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)])
- AC_C_BIGENDIAN
- AC_CHECK_HEADERS(zlib.h)
- ij=yes
-else
- ij=no
-fi
-AM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
-
-dnl ******************************
-dnl PERL checking
-dnl ******************************
-
-AC_MSG_CHECKING(for Perl development environment)
-AC_ARG_WITH(perl,
- AC_HELP_STRING([--with-perl], [use Perl for embedded scripting (EXPERIMENTAL)]),
- [with_perl=$withval], [with_perl=skipped])
-
-if test "x$with_perl" = "xyes"; then
- checkPERL_CFLAGS=`perl -MExtUtils::Embed -e perl_inc 2>/dev/null`
- if test "$?" -gt "0"; then
- with_perl="no"
- else
- checkPERL_LIBS=`perl -MExtUtils::Embed -e ldopts 2>/dev/null`
- if test "$?" -gt "0"; then
- with_perl="no"
- else
- with_perl="yes"
- fi
- fi
-fi
-AC_MSG_RESULT([$with_perl])
-if test "x$with_perl" = "xyes"; then
- # Test that we actually have the perl libraries installed
- oldCFLAGS="$CFLAGS"
- oldLIBS="$LIBS"
- CFLAGS="$CFLAGS $checkPERL_CFLAGS"
- LIBS="$LIBS $checkPERL_LIBS"
- AC_CHECK_FUNC([perl_parse],[
- PERL_CFLAGS="$checkPERL_CFLAGS"
- PERL_LIBS="$checkPERL_LIBS"
- AC_DEFINE(WITH_PERL, 1, [use Perl for embedded scripting])
- ],[
- with_perl="no"
- ])
- CFLAGS="$oldCFLAGS"
- LIBS="$oldLIBS"
-fi
-AM_CONDITIONAL(WITH_PERL, test "x$with_perl" = "xyes")
-AC_SUBST(PERL_CFLAGS)
-AC_SUBST(PERL_LIBS)
-
-dnl ******************************
-dnl Python checking
-dnl ******************************
-
-AC_MSG_CHECKING(for Python development environment)
-AC_ARG_WITH(python,
- AC_HELP_STRING([--with-python], [use Python for embedded scripting (EXPERIMENTAL)]),
- [with_python=$withval], [with_python=skipped])
-
-if test "x$with_python" = "xyes"; then
- checkPYTHON_CFLAGS=`python -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
- if test "$?" -gt "0"; then
- with_python="no"
- else
- checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '%s/%s %s' % (distutils.sysconfig.get_config_var('LIBPL'),distutils.sysconfig.get_config_var('LDLIBRARY'),distutils.sysconfig.get_config_var('LIBS'))" 2>/dev/null`
- if test "$?" -gt "0"; then
- with_python="no"
- else
- with_python="yes"
- fi
- fi
-fi
-AC_MSG_RESULT([$with_python])
-if test "x$with_python" = "xyes"; then
- # Test that we actually have the python libraries installed
- oldCFLAGS="$CFLAGS"
- oldLIBS="$LIBS"
- CFLAGS="$CFLAGS $checkPYTHON_CFLAGS"
- LIBS="$LIBS $checkPYTHON_LIBS"
- AC_CHECK_FUNC([Py_Initialize],[
- PYTHON_CFLAGS="$checkPYTHON_CFLAGS"
- PYTHON_LIBS="$checkPYTHON_LIBS"
- AC_DEFINE(WITH_PYTHON, 1, [use Python for embedded scripting])
- ],[
- with_python="no"
- ])
- CFLAGS="$oldCFLAGS"
- LIBS="$oldLIBS"
-fi
-AM_CONDITIONAL(WITH_PYTHON, test "x$with_python" = "xyes")
-AC_SUBST(PYTHON_CFLAGS)
-AC_SUBST(PYTHON_LIBS)
-
-dnl ******************************
-dnl LittleCms checking
-dnl ******************************
-
-AC_ARG_ENABLE(lcms,
- AC_HELP_STRING([--enable-lcms], [enable LittleCms for color management]),
- [enable_lcms=$enableval], [enable_lcms=yes])
-
-if test "x$enable_lcms" = "xno"; then
- # Asked to ignore LittleCms
- lcms=no
- have_lcms2=no
-else
- # Have to test LittleCms presence
- if test "x${platform_osx}" != "xyes"; then
- # lcms 2.2 & 2.3 have problems on OSX
- PKG_CHECK_MODULES(LCMS2, lcms2, have_lcms2="yes", have_lcms2="no")
- fi
-
- if test "x${have_lcms2}" = "xyes"; then
- LIBS="$LIBS $LCMS2_LIBS"
- AC_DEFINE(HAVE_LIBLCMS2, 1, [define to 1 if you have lcms version 2.x])
- AC_SUBST(LCMS2_CFLAGS)
- AC_SUBST(LCMS2_LIBS)
- else
- PKG_CHECK_MODULES(LCMS, lcms >= 1.13, lcms=yes, lcms=no)
- if test "x$lcms" = "xyes"; then
- LIBS="$LIBS $LCMS_LIBS"
- AC_DEFINE(HAVE_LIBLCMS1, 1, [define to 1 if you have lcms version 1.x])
- AC_SUBST(LCMS_CFLAGS)
- AC_SUBST(LCMS_LIBS)
- else
- # No lcms found. LittleCms was explicitly asked for, so stop
- AC_MSG_ERROR([--enable-lcms was specified, but appropriate LittleCms development packages could not be found])
- fi
- fi
-fi
-
-dnl ******************************
-dnl Libpoppler checking
-dnl ******************************
-
-AC_ARG_ENABLE(poppler-cairo,
- AC_HELP_STRING([--enable-poppler-cairo], [Enable libpoppler-cairo for rendering PDF preview]),
- [enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
-
-POPPLER_CFLAGS=""
-PKG_CHECK_MODULES(POPPLER, poppler >= 0.5.9, poppler=yes, poppler=no)
-
-if test "x$poppler" = "xyes"; then
- dnl Working libpoppler
- dnl Have to test libpoppler-glib presence
- PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.5.9, poppler_glib=yes, poppler_glib=no)
- if test "x$poppler_glib" = "xyes"; then
- dnl Working libpoppler-glib found
- dnl Check whether the Cairo SVG backend is available
- PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, cairo_svg=yes, cairo_svg=no)
- if test "x$cairo_svg" = "xyes"; then
- POPPLER_LIBS="$POPPLER_LIBS $POPPLER_GLIB_LIBS "
- fi
- fi
- if test "x$enable_poppler_cairo" = "xyes"; then
- dnl Have to test libpoppler-cairo presence for PDF preview
- dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
- PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.5.9, poppler_cairo=yes, poppler_cairo=no)
- if test "x$poppler_glib" = "xyes" -a "x$poppler_cairo" = "xyes" -a \
- "x$cairo_svg" = "xno"
- then
- POPPLER_LIBS="$POPPLER_LIBS $POPPLER_CAIRO_LIBS "
- fi
- fi
-fi
-
-if test "x$poppler" = "xyes"; then
- LIBS="$LIBS $POPPLER_LIBS"
- AC_DEFINE(HAVE_POPPLER, 1, [Use libpoppler for direct PDF import])
-fi
-if test "x$poppler_cairo" = "xyes" -a "x$poppler_glib" = "xyes"; then
- AC_DEFINE(HAVE_POPPLER_CAIRO, 1, [Use libpoppler-cairo for rendering PDF preview])
-fi
-if test "x$poppler_glib" = "xyes" -a "x$cairo_svg" = "xyes"; then
- AC_DEFINE(HAVE_POPPLER_GLIB, 1, [Use libpoppler-glib and Cairo-SVG for PDF import])
-fi
-AC_SUBST(POPPLER_CFLAGS)
-AC_SUBST(POPPLER_LIBS)
-
-PKG_CHECK_MODULES(POPPLER_GFXFONT, poppler >= 0.8.3, popplernew=yes, popplernew=no)
-if test "x$popplernew" = "xyes"; then
- AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Use GfxFont from Poppler >= 0.8.3])
-fi
-
-PKG_CHECK_MODULES(POPPLER_NEWERRORAPI, poppler >= 0.20.0, popplernewerror=yes, popplernewerror=no)
-if test "x$popplernewerror" = "xyes"; then
- AC_DEFINE(POPPLER_NEW_ERRORAPI, 1, [Use new error API from Poppler >= 0.20.0])
-fi
-
-
-ink_svd_CPPFLAGS=$CPPFLAGS
-ink_svd_LIBS=$LIBS
-CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
-LIBS="$LIBS $POPPLER_LIBS"
-
-AC_MSG_CHECKING(for new color space API in Poppler)
-popplercolor="no"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include
-
-int main() {
- typedef GfxColorSpace *(*parse_p)(Object *, Gfx *);
- parse_p p;
- p = &GfxColorSpace::parse;
- return 0;
-}
-])], [popplercolor=yes])
-if test "x$popplercolor" = "xyes"; then
- AC_DEFINE(POPPLER_NEW_COLOR_SPACE_API, 1, [Use color space API from Poppler >= 0.12.2])
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-
-# Poppler's b604a008 commit changes this
-AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor])
-popplergfxcolor="no"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include
-
-int main() {
- GfxPatch::ColorValue color = {c: {0}};
- GfxPatch patch;
- patch.color[[0]][[0]] = color;
- return 0;
-}
-])], [popplergfxcolor=yes])
-if test "x$popplergfxcolor" = "xyes"; then
- AC_DEFINE(POPPLER_NEW_GFXPATCH, 1, [GfxPatch no longer uses GfxColor in >= 0.15.1])
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-
-CPPFLAGS=$ink_svd_CPPFLAGS
-LIBS=$ink_svd_LIBS
-
-dnl ******************************
-dnl Check for libwpg for extension
-dnl ******************************
-
-AC_ARG_ENABLE(wpg,
- [ --disable-wpg compile without support for WordPerfect Graphics],
- enable_wpg=$enableval,enable_wpg=yes)
-
-with_libwpg=no
-
-if test "x$enable_wpg" = "xyes"; then
- PKG_CHECK_MODULES(LIBWPG01, libwpg-0.1 libwpg-stream-0.1, with_libwpg01=yes, with_libwpg01=no)
- if test "x$with_libwpg01" = "xyes"; then
- AC_DEFINE(WITH_LIBWPG01,1,[Build in libwpg 0.1.x])
- with_libwpg=yes
- AC_SUBST(LIBWPG_LIBS, $LIBWPG01_LIBS)
- AC_SUBST(LIBWPG_CFLAGS, $LIBWPG01_CFLAGS)
- fi
-
- PKG_CHECK_MODULES(LIBWPG02, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg02=yes, with_libwpg02=no)
- if test "x$with_libwpg02" = "xyes"; then
- AC_DEFINE(WITH_LIBWPG02,1,[Build in libwpg 0.2.x])
- with_libwpg=yes
- AC_SUBST(LIBWPG_LIBS, $LIBWPG02_LIBS)
- AC_SUBST(LIBWPG_CFLAGS, $LIBWPG02_CFLAGS)
- fi
-
- if test "x$with_libwpg" = "xyes"; then
- AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
- fi
-fi
-AM_CONDITIONAL(WITH_LIBWPG01, test "x$with_libwpg01" = "xyes")
-AM_CONDITIONAL(WITH_LIBWPG02, test "x$with_libwpg02" = "xyes")
-AM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
-
-dnl ******************************
-dnl Support doing a local install
-dnl (mostly for distcheck)
-dnl ******************************
-
-with_localinstall="no"
-AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install system files in the local path (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
-
-dnl ******************************
-dnl Check for dbus functionality
-dnl ******************************
-
-AC_ARG_ENABLE(dbusapi,
- [ --enable-dbusapi compile with support for DBus interface],
- enable_dbusapi=$enableval,enable_dbusapi=no)
-
-with_dbus="no"
-if test "x$enable_dbusapi" = "xyes"; then
- PKG_CHECK_MODULES(DBUS, dbus-glib-1, with_dbus=yes, with_dbus=no)
- if test "x$with_dbus" = "xyes"; then
- if test "x$with_localinstall" = "xyes"; then
- DBUSSERVICEDIR="${datadir}/dbus-1/services/"
- else
- DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
- fi
- AC_SUBST(DBUSSERVICEDIR)
- AC_DEFINE(WITH_DBUS,1,[Build in dbus])
- fi
-fi
-AC_SUBST(DBUS_LIBS)
-AC_SUBST(DBUS_CFLAGS)
-AM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
-
-dnl ******************************
-dnl Check for ImageMagick Magick++
-dnl ******************************
-
-PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
-if test "x$magick_ok" = "xyes"; then
- AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
-fi
-AM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
-
-AC_SUBST(IMAGEMAGICK_LIBS)
-AC_SUBST(IMAGEMAGICK_CFLAGS)
-
-dnl ***********************************************************************************************************
-dnl Check for a Cairo version that implements user-fonts feature (with a stable API, that is cairo > 1.7.6),
-dnl so that we conditionally add SVGFonts support
-dnl ***********************************************************************************************************
-
-PKG_CHECK_MODULES(CAIRO_USER_FONTS, cairo > 1.7.6, cairouserfonts=yes, cairouserfonts=no)
-if test "x$cairouserfonts" = "xyes"; then
- AC_DEFINE(ENABLE_SVG_FONTS, 1, [SVG Fonts should be used])
-fi
-
-dnl ******************************
-dnl Unconditional dependencies
-dnl ******************************
-
-dnl sigc++-2.0 >= 2.0.12: using "visit_each" not available in 2.0.10
-if test $cc_vers_major -gt 3; then
- min_sigc_version=2.0.12
-else
- min_sigc_version=2.0.11
-fi
-
-dnl *********************************
-dnl Allow experimental GTK+3 build
-dnl *********************************
-AC_ARG_ENABLE(gtk3-experimental,
- AC_HELP_STRING([--enable-gtk3-experimental], [enable compilation with GTK+3 (EXPERIMENTAL!)]),
- [enable_gtk3=$enableval], [enable_gtk3=no])
-
-with_gtkmm_3_0="no"
-if test "x$enable_gtk3" = "xyes"; then
-
- ink_spell_pkg=
- if pkg-config --exists gtkspell-3.0; then
- ink_spell_pkg=gtkspell-3.0
- AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
- fi
-
- PKG_CHECK_MODULES(INKSCAPE, gtkmm-3.0 gdkmm-3.0 gtk+-3.0 gdk-3.0 gdl-3.0 > 3.3.4 glib-2.0 >= 2.24 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 cairo >= 1.10 cairomm-1.0 >= 1.9.8 sigc++-2.0 >= $min_sigc_version $ink_spell_pkg gthread-2.0 >= 2.0 libpng >= 1.2 gsl glibmm-2.4 giomm-2.4, with_gtkmm_3_0=yes, with_gtkmm_3_0=no)
-
- if test "x$with_gtkmm_3_0" = "xyes"; then
- AC_MSG_RESULT([Using EXPERIMENTAL Gtkmm 3 build])
- AC_DEFINE(WITH_GTKMM_3_0,1,[Build with Gtkmm 3.0.x or higher])
-
- AC_MSG_RESULT([Using external GDL])
- AC_DEFINE(WITH_EXT_GDL,1,[Build with external GDL])
- else
- AC_MSG_ERROR([Some dependencies were not fulfilled for the experimental GTK+ 3 build. One possible cause for this is a new dependency on the gdl-3.0 development package.])
- fi
-else
-
- ink_spell_pkg=
- if pkg-config --exists gtkspell-2.0; then
- ink_spell_pkg=gtkspell-2.0
- AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
- fi
-
- PKG_CHECK_MODULES(INKSCAPE, glib-2.0 >= 2.24 gtk+-2.0 >= 2.22 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 cairo >= 1.10 cairomm-1.0 >= 1.9.8 sigc++-2.0 >= $min_sigc_version $ink_spell_pkg gthread-2.0 >= 2.0 libpng >= 1.2 gsl glibmm-2.4 giomm-2.4 gdkmm-2.4 gtkmm-2.4 >= 2.22)
-
- # Disable deprecated symbols to make GTK+ 3 migration easier.
- # This should also be applied to GTK+ 3 builds too,
- # once the migration is complete.
- CPPFLAGS="-DGTKMM_DISABLE_DEPRECATED $CPPFLAGS"
- CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
- CPPFLAGS="-DGDKMM_DISABLE_DEPRECATED $CPPFLAGS"
-
- # FIXME: This is disabled because our internal
- # copy of GDL still uses deprecated GTK+ 2 symbols.
- #
- # This shouldn't be a big problem for GTK+ 3 builds because
- # we can build against external GDL >= 3.3.4 rather than using
- # the deprecated internal code
-# CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
-fi
-
-AM_CONDITIONAL(WITH_EXT_GDL, test "x$with_gtkmm_3_0" = "xyes")
-
-dnl ***********************************
-dnl Checks for specific series of Gtkmm
-dnl - There are no convenient macros
-dnl defined in Gtkmm itself, so we
-dnl need to perform these checks
-dnl ourselves.
-dnl ***********************************
-
-PKG_CHECK_MODULES(GTKMM_2_24, gtkmm-2.4 >= 2.24, with_gtkmm_2_24=yes, with_gtkmm_2_24=no)
-if test "x$with_gtkmm_2_24" = "xyes"; then
- AC_DEFINE(WITH_GTKMM_2_24,1,[Build with Gtkmm 2.24.x or higher])
-fi
-
-dnl Ideally, we want to avoid including any glib headers other than the
-dnl top-level , because they are all deprecated in glib >= 2.31.
-dnl However, glibmm < 2.28 *does* include the deprecated glib headers, so we
-dnl can only define the deprecation-checking compiler flag if we're using
-dnl glibmm versions.
-PKG_CHECK_MODULES(GLIBMM_2_28, glibmm-2.4 >= 2.28, with_glibmm_2_28=yes, with_glibmm_2_28=no)
-if test "x$with_glibmm_2_28" = "xyes"; then
- AC_DEFINE(WITH_GLIBMM_2_28,1,[Build with Glibmm 2.28.x or higher])
- CPPFLAGS="-DG_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
-fi
-
-# Check for GTK+ backend target
-AC_MSG_CHECKING([for GTK+ backend target])
-gtk_backend_target=`pkg-config --variable=target gtk+-2.0`
-AC_MSG_RESULT($gtk_backend_target)
-
-# Add X11 library if needed
-if test "x$gtk_backend_target" = "xx11"; then
- INKSCAPE_LIBS="$INKSCAPE_LIBS -lX11"
-fi
-
-# Check for Apple Mac OS X Carbon framework
-carbon_ok=no
-AC_MSG_CHECKING([for Mac OS X Carbon support])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include
-#include
-])], [carbon_ok=yes])
-AC_MSG_RESULT($carbon_ok)
-if test "x$carbon_ok" = "xyes"; then
- AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
- CARBON_LDFLAGS="-framework Carbon"
- AC_SUBST(CARBON_LDFLAGS)
-fi
-AM_CONDITIONAL(HAVE_CARBON, test "x$carbon_ok" = "xyes")
-
-# Check for some boost header files
-AC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)]))
-
-PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no)
-if test "x$cairo_pdf" = "xyes"; then
- AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
-fi
-
-dnl Shouldn't we test for libpng and libz?
-INKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz -lxml2 -ldl"
-if test "x$openmp_ok" = "xyes"; then
- INKSCAPE_LIBS="$INKSCAPE_LIBS -lgomp"
-fi
-
-AC_CHECK_HEADER(popt.h,
- [INKSCAPE_LIBS="$INKSCAPE_LIBS -lpopt"],
- AC_MSG_ERROR([libpopt is required]))
-
-dnl **************************
-dnl Check for aspell
-dnl ******************************
-AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
-if test "x$aspell_ok" = "xyes"; then
- AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
- INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
-else
- AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
-fi
-
-dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
-sp_save_LIBS=$LIBS
-LIBS="$LIBS $INKSCAPE_LIBS"
-AC_CHECK_FUNCS(bind_textdomain_codeset)
-dnl Check for gtk_window_fullscreen in gtk (>= 2.2)
-AC_CHECK_FUNCS(gtk_window_set_default_icon_from_file)
-AC_CHECK_FUNCS(gtk_window_fullscreen)
-LIBS=$sp_save_LIBS
-
-
-dnl Check for binary relocation support
-dnl Hongli Lai
-
-AC_ARG_ENABLE(binreloc,
- [ --enable-binreloc compile with binary relocation support],
- enable_binreloc=$enableval,enable_binreloc=no)
-
-AC_MSG_CHECKING(whether binary relocation support should be enabled)
-if test "$enable_binreloc" = "yes"; then
- AC_MSG_RESULT(yes)
- AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
- if test -e /proc/self/maps; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
- enable_binreloc="no"
- fi
-
-elif test "$enable_binreloc" = "auto"; then
- AC_MSG_RESULT(yes when available)
- AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
- if test -e /proc/self/maps; then
- AC_MSG_RESULT(yes)
- enable_binreloc=yes
-
- AC_MSG_CHECKING(whether everything is installed to the same prefix)
- if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
- "$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
- "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
- then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- AC_MSG_NOTICE(Binary relocation support will be disabled.)
- enable_binreloc=no
- fi
-
- else
- AC_MSG_RESULT(no)
- enable_binreloc=no
- fi
-
-elif test "$enable_binreloc" = "no"; then
- AC_MSG_RESULT(no)
-else
- AC_MSG_RESULT([no (unknown value "$enable_binreloc")])
- enable_binreloc=no
-fi
-AC_DEFINE(BR_PTHREADS,[0],[Use binreloc thread support?])
-if test "$enable_binreloc" = "yes"; then
- AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
-fi
-
-AC_ARG_ENABLE(osxapp,
- [ --enable-osxapp compile with OSX .app data dir paths],
- enable_osxapp=$enableval,enable_osxapp=no)
-if test "$enable_osxapp" = "yes"; then
- AC_DEFINE(ENABLE_OSX_APP_LOCATIONS,,[Build with OSX .app data dir paths?])
-fi
-
-dnl ******************************
-dnl Reported by autoscan
-dnl ******************************
-AC_CHECK_FUNCS(pow)
-# if we did not find pow(), see if it's in libm.
-if test x"$ac_cv_func_pow" = x"no" ; then
- AC_CHECK_LIB(m,pow)
-fi
-AC_CHECK_FUNCS(sqrt)
-AC_CHECK_FUNCS(floor)
-AC_CHECK_FUNCS(gettimeofday)
-AC_CHECK_FUNCS(memmove)
-AC_CHECK_FUNCS(memset)
-AC_CHECK_FUNCS(mkdir)
-AC_CHECK_FUNCS(strncasecmp)
-AC_CHECK_FUNCS(strpbrk)
-AC_CHECK_FUNCS(strrchr)
-AC_CHECK_FUNCS(strspn)
-AC_CHECK_FUNCS(strstr)
-AC_CHECK_FUNCS(strtoul)
-AC_CHECK_FUNCS(fpsetmask)
-AC_CHECK_FUNCS(ecvt)
-AC_CHECK_HEADERS(ieeefp.h)
-AC_CHECK_HEADERS(fcntl.h)
-AC_CHECK_HEADERS(libintl.h)
-AC_CHECK_HEADERS(stddef.h)
-AC_CHECK_HEADERS(sys/time.h)
-AC_FUNC_STAT
-AC_FUNC_STRFTIME
-AC_FUNC_STRTOD
-AC_HEADER_STAT
-AC_HEADER_TIME
-AC_STRUCT_TM
-AC_TYPE_MODE_T
-AC_TYPE_SIGNAL
-
-dnl Work around broken gcc 3.3 (seen on OSX) where "ENABLE_NLS" isn't
-dnl set correctly because the gettext function isn't noticed.
-if test "$ac_cv_header_libintl_h" = "yes" &&
- test "$ac_cv_func_bind_textdomain_codeset" = "yes" &&
- test "$gt_cv_func_have_gettext" != "yes"; then
- AC_DEFINE(ENABLE_NLS)
-fi
-
-dnl ******************************
-dnl Compilation warnings
-dnl ******************************
-if test "$GXX" = "yes"; then
- # Enable some warnings from g++.
-
- # Rationale: a number of bugs in inkscape have been fixed by enabling g++
- # warnings and addressing the produced warnings. Usually the committing
- # developer is the best person to address the warnings.
-
- ink_svd_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="-Wno-unused-parameter $CXXFLAGS"
- # -Wno-unused-parameter isn't accepted by gcc 2.95.
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([int dummy;
-])], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",)
- # Note: At least one bug has been caught from unused parameter warnings,
- # so it might be worth trying not to disable it.
- # One way of selectively disabling the warnings (i.e. only where the
- # programmer deliberately isn't using the parameter, e.g. for a callback)
- # is to remove the parameter name (leaving just its type), as is done
- # in src/seltrans.cpp:sp_seltrans_handle_event; this indicates that the
- # programmer deliberately has an unused parameter (e.g. because it's used
- # as a callback or similar function pointer use).
-
- # Add even more stuff
- CXXFLAGS="-Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
-
-fi
-
-dnl ******************************
-dnl libinkscape
-dnl ******************************
-dnl
-dnl AC_ARG_ENABLE(libinkscape, AC_HELP_STRING([--enable-libinkscape], [Compile dynamic library (experimental)]), [splib=$enableval], [splib=no])
-dnl
-dnl AM_CONDITIONAL(ENABLE_LIBINKSCAPE, test "x$splib" != "xno")
-dnl
-
-AC_SUBST(INKSCAPE_CFLAGS)
-AC_SUBST(INKSCAPE_LIBS)
-
-dnl Define our data paths for config.h
-AC_DEFINE_DIR([INKSCAPE_DATADIR], [datadir], [Base data directory])
-AC_DEFINE_DIR([PACKAGE_LOCALE_DIR], [localedir], [Locatization directory])
-
-AC_CONFIG_FILES([
-Makefile
-src/Makefile
-src/check-header-compile
-src/bind/makefile
-src/debug/makefile
-src/dialogs/makefile
-src/display/makefile
-src/dom/makefile
-src/extension/implementation/makefile
-src/extension/internal/makefile
-src/extension/makefile
-src/extension/script/makefile
-src/extension/dbus/wrapper/inkdbus.pc
-src/filters/makefile
-src/helper/makefile
-src/io/makefile
-src/libcroco/makefile
-src/libgdl/makefile
-src/libnrtype/makefile
-src/libavoid/makefile
-src/libunicode-convert/makefile
-src/livarot/makefile
-src/live_effects/makefile
-src/live_effects/parameter/makefile
-src/svg/makefile
-src/trace/makefile
-src/ui/cache/makefile
-src/ui/dialog/makefile
-src/ui/makefile
-src/ui/view/makefile
-src/ui/widget/makefile
-src/util/makefile
-src/widgets/makefile
-src/xml/makefile
-src/2geom/makefile
-doc/Makefile
-po/Makefile.in
-share/Makefile
-share/attributes/Makefile
-share/clipart/Makefile
-share/examples/Makefile
-share/extensions/Makefile
-share/extensions/alphabet_soup/Makefile
-share/extensions/Barcode/Makefile
-share/extensions/Poly3DObjects/Makefile
-share/extensions/test/Makefile
-share/extensions/xaml2svg/Makefile
-share/extensions/ink2canvas/Makefile
-share/filters/Makefile
-share/fonts/Makefile
-share/gradients/Makefile
-share/icons/Makefile
-share/icons/application/Makefile
-share/icons/application/16x16/Makefile
-share/icons/application/22x22/Makefile
-share/icons/application/24x24/Makefile
-share/icons/application/32x32/Makefile
-share/icons/application/48x48/Makefile
-share/icons/application/256x256/Makefile
-share/keys/Makefile
-share/markers/Makefile
-share/palettes/Makefile
-share/patterns/Makefile
-share/screens/Makefile
-share/templates/Makefile
-share/tutorials/Makefile
-share/ui/Makefile
-packaging/autopackage/default.apspec
-inkscape.spec
-Info.plist
-inkview.1
-])
-
-AH_BOTTOM([
-
-
-])
-
-AC_OUTPUT
-
-echo "
-Configuration:
-
- Source code location: ${srcdir}
- Destination path prefix: ${prefix}
- Compiler: ${CXX}
- CPPFLAGS: ${CPPFLAGS}
- CXXFLAGS: ${CXXFLAGS}
- CFLAGS: ${CFLAGS}
- LDFLAGS: ${LDFLAGS}
-
- Use gnome-vfs: ${gnome_vfs}
- Use openoffice files: ${ij}
- Use relocation support: ${enable_binreloc}
- Internal Python: ${with_python}
- Internal Perl: ${with_perl}
- Enable LittleCms: ${enable_lcms}
- Enable DBUS: ${with_dbus}
- Enable Poppler-Cairo: ${enable_poppler_cairo}
- ImageMagick Magick++: ${magick_ok}
- Libwpg: ${with_libwpg}
- Doing Local Install: ${with_localinstall}
- GTK+ backend target: ${gtk_backend_target}
-"
diff -rNu3 share/extensions/fontfix.conf share/extensions/fontfix.conf
--- share/extensions/fontfix.conf 1969-12-31 16:00:00.000000000 -0800
+++ share/extensions/fontfix.conf 2012-08-17 12:20:16.000000000 -0700
@@ -0,0 +1,55 @@
+# This file contains correction factors for the PowerPoint compensation method
+# when files are saved to EMF. PowerPoint applies some odd offsets when it ungroups
+# fonts from within an EMF. This file contains compensating factors so that the
+# imported, ungrouped characters end up in the desired location.
+#
+# Format(s)
+#
+# # a comment
+#
+# f1 f2 f3 FontName
+# where
+# f1: vertical (rotating) correction factor (a double)
+# f2: vertical (nonrotating) correction factor (a double)
+# f3: horizontal (nonrotating) correction factor (a double)
+# FontName: Case sensitive, may contain spaces. Example: Times New Roman
+#
+# The first font will listed will be used as the default for any font which
+# is later requested but was not explicitly listed.
+#
+# If f1 specifies a multiplicative correction factor. It is multiplied by the font size
+# and then the character is offset parallel to the (original) vertical direction of the character,
+# that is, along the long part of a capital L.
+#
+# If f2 or f3 is nonzero then for angles <1 degree from 0,90,180,270 degrees
+# the angle is snapped to n*90 and f2 is used for the vertical displacements, f3
+# for the horizontal displacements (that is, for 90 degrees, f3 is used).
+#
+# There is are one special type of fontname: Convert To FontName,
+# for instance "Convert To Symbol". It is used when EMF print converts
+# from unicode to Symbol, Wingdings, or Zapf Dingbats.
+#
+# Positive values lower the letter, negative raise it
+#
+# File history:
+# 1.0.0 03/26/2012, David Mathog, initial values
+#####################################################################
+0.05 -0.055 -0.065 Arial
+0.05 -0.055 -0.065 Times New Roman
+-0.025 -0.055 -0.065 Lucida Sans
+0.05 -0.055 -0.065 Sans
+-0.05 -0.055 -0.065 Microsoft Sans Serif
+0.05 -0.055 -0.065 Serif
+0.05 -0.055 -0.065 Garamond
+0.25 0.025 0.025 Century Schoolbook
+0.025 0.0 0.0 Verdana
+0.045 0.025 0.025 Tahoma
+0.025 0.0 0.0 Symbol
+0.05 0.0 0.0 Wingdings
+0.025 0.0 0.0 Zapf Dingbats
+0.025 0.0 0.0 Convert To Symbol
+0.05 0.0 0.0 Convert To Wingdings
+0.025 0.0 0.0 Convert To Zapf Dingbats
+0.1 0.0 0.0 Sylfaen
+0.175 0.125 0.125 Palatino Linotype
+0.1 0.0 0.0 Segoe UI
diff -rNu3 share/extensions/Makefile.am share/extensions/Makefile.am
--- share/extensions/Makefile.am 2012-08-07 12:29:10.000000000 -0700
+++ share/extensions/Makefile.am 2012-08-17 11:47:33.000000000 -0700
@@ -178,6 +178,7 @@
yocto_css.py
otherstuff = \
+ fontfix.conf \
inkweb.js \
jessyInk.js \
jessyInk_core_mouseHandler_noclick.js \
diff -rNu3 src/extension/init.cpp src/extension/init.cpp
--- src/extension/init.cpp 2012-08-07 12:29:10.000000000 -0700
+++ src/extension/init.cpp 2012-08-07 12:43:08.000000000 -0700
@@ -32,10 +32,8 @@
#include "system.h"
#include "db.h"
#include "internal/svgz.h"
-#ifdef WIN32
-# include "internal/emf-win32-inout.h"
-# include "internal/emf-win32-print.h"
-#endif
+# include "internal/emf-inout.h"
+# include "internal/emf-print.h"
#ifdef HAVE_CAIRO_PDF
# include "internal/cairo-renderer-pdf-out.h"
# include "internal/cairo-png-out.h"
@@ -171,10 +169,8 @@
Internal::PdfInputCairo::init();
}
#endif
-#ifdef WIN32
- Internal::PrintEmfWin32::init();
- Internal::EmfWin32::init();
-#endif
+ Internal::PrintEmf::init();
+ Internal::Emf::init();
Internal::PovOutput::init();
Internal::JavaFXOutput::init();
Internal::OdfOutput::init();
@@ -308,7 +304,7 @@
continue;
}
- gchar *pathname = g_build_filename(dirname, filename, NULL);
+ gchar *pathname = g_build_filename(dirname, filename, (char *) NULL);
build_from_file(pathname);
g_free(pathname);
}
diff -rNu3 src/extension/internal/emf-inout.cpp src/extension/internal/emf-inout.cpp
--- src/extension/internal/emf-inout.cpp 1969-12-31 16:00:00.000000000 -0800
+++ src/extension/internal/emf-inout.cpp 2012-08-29 16:37:24.000000000 -0700
@@ -0,0 +1,3102 @@
+/** @file
+ * @brief Windows-only Enhanced Metafile input and output.
+ */
+/* Authors:
+ * Ulf Erikson
+ * Jon A. Cruz
+ * Abhishek Sharma
+ *
+ * Copyright (C) 2006-2008 Authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ *
+ * References:
+ * - How to Create & Play Enhanced Metafiles in Win32
+ * http://support.microsoft.com/kb/q145999/
+ * - INFO: Windows Metafile Functions & Aldus Placeable Metafiles
+ * http://support.microsoft.com/kb/q66949/
+ * - Metafile Functions
+ * http://msdn.microsoft.com/library/en-us/gdi/metafile_0whf.asp
+ * - Metafile Structures
+ * http://msdn.microsoft.com/library/en-us/gdi/metafile_5hkj.asp
+ */
+
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#define EMF_DRIVER
+#include "sp-root.h"
+#include "sp-path.h"
+#include "style.h"
+#include "print.h"
+#include "extension/system.h"
+#include "extension/print.h"
+#include "extension/db.h"
+#include "extension/input.h"
+#include "extension/output.h"
+#include "display/drawing.h"
+#include "display/drawing-item.h"
+#include "unit-constants.h"
+#include "clear-n_.h"
+#include "document.h"
+#include "libunicode-convert/unicode-convert.h"
+
+
+#include "emf-print.h"
+#include "emf-inout.h"
+#include "uemf.h"
+
+#define PRINT_EMF "org.inkscape.print.emf"
+
+#ifndef U_PS_JOIN_MASK
+#define U_PS_JOIN_MASK (U_PS_JOIN_BEVEL|U_PS_JOIN_MITER|U_PS_JOIN_ROUND)
+#endif
+
+namespace Inkscape {
+namespace Extension {
+namespace Internal {
+
+
+static float device_scale = DEVICESCALE;
+static U_RECTL rc_old;
+static bool clipset = false;
+static uint32_t ICMmode=0;
+static uint32_t BLTmode=0;
+
+/** Construct a PNG in memory from an RGB from the EMF file
+
+from:
+http://www.lemoda.net/c/write-png/
+
+which was based on:
+http://stackoverflow.com/questions/1821806/how-to-encode-png-to-buffer-using-libpng
+
+gcc -Wall -o testpng testpng.c -lpng
+*/
+
+#include
+#include
+#include
+#include
+
+/* A coloured pixel. */
+
+typedef struct {
+ uint8_t red;
+ uint8_t green;
+ uint8_t blue;
+ uint8_t opacity;
+} pixel_t;
+
+/* A picture. */
+
+typedef struct {
+ pixel_t *pixels;
+ size_t width;
+ size_t height;
+} bitmap_t;
+
+/* structure to store PNG image bytes */
+typedef struct {
+ char *buffer;
+ size_t size;
+} MEMPNG, *PMEMPNG;
+
+/* Given "bitmap", this returns the pixel of bitmap at the point
+ ("x", "y"). */
+
+static pixel_t * pixel_at (bitmap_t * bitmap, int x, int y)
+{
+ return bitmap->pixels + bitmap->width * y + x;
+}
+
+/* Write "bitmap" to a PNG file specified by "path"; returns 0 on
+ success, non-zero on error. */
+
+
+
+void
+my_png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
+{
+ /* with libpng15 next line causes pointer deference error; use libpng12 */
+ PMEMPNG p=(PMEMPNG)png_ptr->io_ptr;
+ size_t nsize = p->size + length;
+
+ /* allocate or grow buffer */
+ if(p->buffer)
+ p->buffer = (char *) realloc(p->buffer, nsize);
+ else
+ p->buffer = (char *) malloc(nsize);
+
+ if(!p->buffer)
+ png_error(png_ptr, "Write Error");
+
+ /* copy new bytes to end of buffer */
+ memcpy(p->buffer + p->size, data, length);
+ p->size += length;
+}
+
+void toPNG(PMEMPNG accum, int width, int height, char *px, uint32_t cbPx){
+ bitmap_t bmstore;
+ bitmap_t *bitmap=&bmstore;
+ accum->buffer=NULL; // PNG constructed in memory will end up here, caller must free().
+ accum->size=0;
+ bitmap->pixels=(pixel_t *)px;
+ bitmap->width = width;
+ bitmap->height = height;
+
+ png_structp png_ptr = NULL;
+ png_infop info_ptr = NULL;
+ size_t x, y;
+ png_byte ** row_pointers = NULL;
+ /* The following number is set by trial and error only. I cannot
+ see where it it is documented in the libpng manual.
+ */
+ int pixel_size = 3;
+ int depth = 8;
+
+ png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ if (png_ptr == NULL){
+ accum->buffer=NULL;
+ return;
+ }
+
+ info_ptr = png_create_info_struct (png_ptr);
+ if (info_ptr == NULL){
+ png_destroy_write_struct (&png_ptr, &info_ptr);
+ accum->buffer=NULL;
+ return;
+ }
+
+ /* Set up error handling. */
+
+ if (setjmp (png_jmpbuf (png_ptr))) {
+ png_destroy_write_struct (&png_ptr, &info_ptr);
+ accum->buffer=NULL;
+ return;
+ }
+
+ /* Set image attributes. */
+
+ png_set_IHDR (png_ptr,
+ info_ptr,
+ bitmap->width,
+ bitmap->height,
+ depth,
+ PNG_COLOR_TYPE_RGB,
+ PNG_INTERLACE_NONE,
+ PNG_COMPRESSION_TYPE_DEFAULT,
+ PNG_FILTER_TYPE_DEFAULT);
+
+ /* Initialize rows of PNG. */
+
+ row_pointers = (png_byte **) png_malloc (png_ptr, bitmap->height * sizeof (png_byte *));
+ for (y = 0; y < bitmap->height; ++y) {
+ png_byte *row =
+ (png_byte *) png_malloc (png_ptr, sizeof (uint8_t) * bitmap->width * pixel_size);
+ row_pointers[bitmap->height - y - 1] = row; // Row order in EMF is reversed.
+ for (x = 0; x < bitmap->width; ++x) {
+ pixel_t * pixel = pixel_at (bitmap, x, y);
+ *row++ = pixel->red; // R & B channels were set correctly by DIB_to_RGB
+ *row++ = pixel->green;
+ *row++ = pixel->blue;
+ }
+ }
+
+ /* Write the image data to memory */
+
+ png_set_rows (png_ptr, info_ptr, row_pointers);
+
+ png_set_write_fn(png_ptr, accum, my_png_write_data, NULL);
+
+ png_write_png (png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
+
+ for (y = 0; y < bitmap->height; y++) {
+ png_free (png_ptr, row_pointers[y]);
+ }
+ png_free (png_ptr, row_pointers);
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+
+}
+
+/* Given "value" and "max", the maximum value which we expect "value"
+ to take, this returns an integer between 0 and 255 proportional to
+ "value" divided by "max". */
+
+static int pix (int value, int max)
+{
+ if (value < 0)
+ return 0;
+ return (int) (256.0 *((double) (value)/(double) max));
+}
+
+/* convert an EMF RGB(A) color to 0RGB
+inverse of gethexcolor() in emf-print.cpp
+*/
+uint32_t sethexcolor(U_COLORREF color){
+
+ uint32_t out;
+ out = (U_RGBAGetR(color) << 16) +
+ (U_RGBAGetG(color) << 8 ) +
+ (U_RGBAGetB(color) );
+ return(out);
+}
+
+
+Emf::Emf (void) // The null constructor
+{
+ return;
+}
+
+
+Emf::~Emf (void) //The destructor
+{
+ return;
+}
+
+
+bool
+Emf::check (Inkscape::Extension::Extension * /*module*/)
+{
+ if (NULL == Inkscape::Extension::db.get(PRINT_EMF))
+ return FALSE;
+ return TRUE;
+}
+
+
+static void
+emf_print_document_to_file(SPDocument *doc, gchar const *filename)
+{
+ Inkscape::Extension::Print *mod;
+ SPPrintContext context;
+ gchar const *oldconst;
+ gchar *oldoutput;
+ unsigned int ret;
+
+ doc->ensureUpToDate();
+
+ mod = Inkscape::Extension::get_print(PRINT_EMF);
+ oldconst = mod->get_param_string("destination");
+ oldoutput = g_strdup(oldconst);
+ mod->set_param_string("destination", filename);
+
+/* Start */
+ context.module = mod;
+ /* fixme: This has to go into module constructor somehow */
+ /* Create new arena */
+ mod->base = doc->getRoot();
+ Inkscape::Drawing drawing;
+ mod->dkey = SPItem::display_key_new(1);
+ mod->root = mod->base->invoke_show(drawing, mod->dkey, SP_ITEM_SHOW_DISPLAY);
+ drawing.setRoot(mod->root);
+ /* Print document */
+ ret = mod->begin(doc);
+ if (ret) {
+ g_free(oldoutput);
+ throw Inkscape::Extension::Output::save_failed();
+ }
+ mod->base->invoke_print(&context);
+ ret = mod->finish();
+ /* Release arena */
+ mod->base->invoke_hide(mod->dkey);
+ mod->base = NULL;
+ mod->root = NULL; // deleted by invoke_hide
+/* end */
+
+ mod->set_param_string("destination", oldoutput);
+ g_free(oldoutput);
+
+ return;
+}
+
+
+void
+Emf::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
+{
+ Inkscape::Extension::Extension * ext;
+
+ ext = Inkscape::Extension::db.get(PRINT_EMF);
+ if (ext == NULL)
+ return;
+
+ bool new_val = mod->get_param_bool("textToPath");
+ bool new_FixPPTCharPos = mod->get_param_bool("FixPPTCharPos"); // character position bug
+ // reserve FixPPT2 for opacity bug. Currently EMF does not export opacity values
+ bool new_FixPPTDashLine = mod->get_param_bool("FixPPTDashLine"); // dashed line bug
+ bool new_FixPPTGrad2Polys = mod->get_param_bool("FixPPTGrad2Polys"); // gradient bug
+ bool new_FixPPTPatternAsHatch = mod->get_param_bool("FixPPTPatternAsHatch"); // force all patterns as standard EMF hatch
+
+ TableGen( //possibly regenerate the unicode-convert tables
+ mod->get_param_bool("TnrToSymbol"),
+ mod->get_param_bool("TnrToWingdings"),
+ mod->get_param_bool("TnrToZapfDingbats"),
+ mod->get_param_bool("UsePUA")
+ );
+
+ ext->set_param_bool("FixPPTCharPos",new_FixPPTCharPos); // Remember to add any new ones to PrintEmf::init or a mysterious failure will result!
+ ext->set_param_bool("FixPPTDashLine",new_FixPPTDashLine);
+ ext->set_param_bool("FixPPTGrad2Polys",new_FixPPTGrad2Polys);
+ ext->set_param_bool("FixPPTPatternAsHatch",new_FixPPTPatternAsHatch);
+ ext->set_param_bool("textToPath", new_val);
+
+ emf_print_document_to_file(doc, filename);
+
+ return;
+}
+
+
+enum drawmode {DRAW_PAINT, DRAW_PATTERN, DRAW_IMAGE}; // apply to either fill or stroke
+
+typedef struct {
+ int type;
+ int level;
+ char *lpEMFR;
+} EMF_OBJECT, *PEMF_OBJECT;
+
+typedef struct {
+ int size; // number of slots allocated in strings
+ int count; // number of slots used in strings
+ char **strings; // place to store strings
+} EMF_STRINGS, *PEMF_STRINGS;
+
+typedef struct emf_device_context {
+ struct SPStyle style;
+ class SPTextStyle tstyle;
+ bool stroke_set;
+ int stroke_mode; // enumeration from drawmode, not used if fill_set is not True
+ int stroke_idx; // used with DRAW_PATTERN and DRAW_IMAGE to return the appropriate fill
+ bool fill_set;
+ int fill_mode; // enumeration from drawmode, not used if fill_set is not True
+ int fill_idx; // used with DRAW_PATTERN and DRAW_IMAGE to return the appropriate fill
+
+ U_SIZEL sizeWnd;
+ U_SIZEL sizeView;
+ float PixelsInX, PixelsInY;
+ float PixelsOutX, PixelsOutY;
+ U_POINTL winorg;
+ U_POINTL vieworg;
+ double ScaleInX, ScaleInY;
+ double ScaleOutX, ScaleOutY;
+ U_COLORREF textColor;
+ bool textColorSet;
+ U_COLORREF bkColor;
+ bool bkColorSet;
+ uint32_t textAlign;
+ U_XFORM worldTransform;
+ U_POINTL cur;
+} EMF_DEVICE_CONTEXT, *PEMF_DEVICE_CONTEXT;
+
+#define EMF_MAX_DC 128
+
+typedef struct emf_callback_data {
+ Glib::ustring *outsvg;
+ Glib::ustring *path;
+ Glib::ustring *outdef;
+ Glib::ustring *defs;
+
+ EMF_DEVICE_CONTEXT dc[EMF_MAX_DC+1]; // FIXME: This should be dynamic..
+ int level;
+
+ double xDPI, yDPI;
+ uint32_t mask; // Draw properties
+ int arcdir; //U_AD_COUNTERCLOCKWISE 1 or U_AD_CLOCKWISE 2
+
+ uint32_t dwRop2; // Binary raster operation, 0 if none (use brush/pen unmolested)
+ uint32_t dwRop3; // Ternary raster operation, 0 if none (use brush/pen unmolested)
+
+ float MMX;
+ float MMY;
+ float dwInchesX;
+ float dwInchesY;
+
+ unsigned int id;
+ unsigned int drawtype; // one of 0 or U_EMR_FILLPATH, U_EMR_STROKEPATH, U_EMR_STROKEANDFILLPATH
+ char *pDesc;
+ // both of these end up in under the names shown here. These structures allow duplicates to be avoided.
+ EMF_STRINGS hatches; // hold pattern names, all like EMFhatch#_$$$$$$ where # is the EMF hatch code and $$$$$$ is the color
+ EMF_STRINGS images; // hold images, all like Image#, where # is the slot the image lives.
+
+
+ int n_obj;
+ PEMF_OBJECT emf_obj;
+} EMF_CALLBACK_DATA, *PEMF_CALLBACK_DATA;
+
+/* Add another 100 blank slots to the hatches array.
+*/
+void enlarge_hatches(PEMF_CALLBACK_DATA d){
+ d->hatches.size += 100;
+ d->hatches.strings = (char **) realloc(d->hatches.strings,d->hatches.size + sizeof(char *));
+}
+
+/* See if the pattern name is already in the list. If it is return its position (1->n, not 1-n-1)
+*/
+int in_hatches(PEMF_CALLBACK_DATA d, char *test){
+ int i;
+ for(i=0; ihatches.count; i++){
+ if(strcmp(test,d->hatches.strings[i])==0)return(i+1);
+ }
+ return(0);
+}
+
+/* (Conditionally) add a hatch. If a matching hatch already exists nothing happens. If one
+ does not exist it is added to the hatches list and also entered into .
+*/
+uint32_t add_hatch(PEMF_CALLBACK_DATA d, uint32_t hatchType, U_COLORREF hatchColor){
+ char hatchname[64]; // big enough
+ char tmpcolor[8];
+ uint32_t idx;
+
+ if(hatchType==U_HS_DIAGCROSS){ // This is the only one with dependencies on others
+ (void) add_hatch(d,U_HS_FDIAGONAL,hatchColor);
+ (void) add_hatch(d,U_HS_BDIAGONAL,hatchColor);
+ }
+
+ sprintf(tmpcolor,"%6.6X",sethexcolor(hatchColor));
+ switch(hatchType){
+ case U_HS_SOLIDTEXTCLR:
+ case U_HS_DITHEREDTEXTCLR:
+ if(d->dc[d->level].textColorSet){
+ sprintf(tmpcolor,"%6.6X",sethexcolor(d->dc[d->level].textColor));
+ }
+ break;
+ case U_HS_SOLIDBKCLR:
+ case U_HS_DITHEREDBKCLR:
+ if(d->dc[d->level].bkColorSet){
+ sprintf(tmpcolor,"%6.6X",sethexcolor(d->dc[d->level].bkColor));
+ }
+ break;
+ default:
+ break;
+ }
+
+ // EMF can take solid colors from background or the default text color but on conversion to inkscape
+ // these need to go to a defined color. Consequently the hatchType also has to go to a solid color, otherwise
+ // on export the background/text might not match at the time this is written, and the colors will shift.
+ if(hatchType > U_HS_SOLIDCLR)hatchType = U_HS_SOLIDCLR;
+
+ sprintf(hatchname,"EMFhatch%d_%s",hatchType,tmpcolor);
+ idx = in_hatches(d,hatchname);
+ if(!idx){ // add it if not already present
+ if(d->hatches.count == d->hatches.size){ enlarge_hatches(d); }
+ d->hatches.strings[d->hatches.count++]=strdup(hatchname);
+
+ *(d->defs) += "\n";
+ *(d->defs) += " defs) += hatchname;
+ *(d->defs) += "\"\n";
+ switch(hatchType){
+ case U_HS_HORIZONTAL:
+ *(d->defs) += " patternUnits=\"userSpaceOnUse\" width=\"6\" height=\"6\" x=\"0\" y=\"0\" >\n";
+ *(d->defs) += " defs) += tmpcolor;
+ *(d->defs) += "\" />\n";
+ *(d->defs) += " \n";
+ break;
+ case U_HS_VERTICAL:
+ *(d->defs) += " patternUnits=\"userSpaceOnUse\" width=\"6\" height=\"6\" x=\"0\" y=\"0\" >\n";
+ *(d->defs) += " defs) += tmpcolor;
+ *(d->defs) += "\" />\n";
+ *(d->defs) += " \n";
+ break;
+ case U_HS_FDIAGONAL:
+ *(d->defs) += " patternUnits=\"userSpaceOnUse\" width=\"6\" height=\"6\" x=\"0\" y=\"0\" viewBox=\"0 0 6 6\" preserveAspectRatio=\"none\" >\n";
+ *(d->defs) += " defs) += tmpcolor;
+ *(d->defs) += "\" id=\"sub";
+ *(d->defs) += hatchname;
+ *(d->defs) += "\"/>\n";
+ *(d->defs) += "