diff -Nurd -x'*~' autotrace-0.31.1.orig/Makefile.am autotrace-0.31.1/Makefile.am --- autotrace-0.31.1.orig/Makefile.am 2002-10-30 11:51:46.000000000 -0500 +++ autotrace-0.31.1/Makefile.am 2007-06-25 02:49:30.000000000 -0400 @@ -127,12 +127,13 @@ INCLUDES = $(MAGICK_CFLAGS) $(LIBPSTOEDIT_CFLAGS) autotrace_LDADD = \ - libautotrace.la \ + libautotrace.la + -lm +libautotrace_la_LIBADD = \ $(MAGICK_LDFLAGS) \ $(LIBPNG_LDFLAGS) \ $(LIBSWF_LDFLAGS) \ - $(LIBPSTOEDIT_LIBS) \ - -lm + $(LIBPSTOEDIT_LIBS) m4datadir = $(datadir)/aclocal m4data_DATA = autotrace.m4 diff -Nurd -x'*~' autotrace-0.31.1.orig/acconfig.h autotrace-0.31.1/acconfig.h --- autotrace-0.31.1.orig/acconfig.h 2002-10-29 23:50:13.000000000 -0500 +++ autotrace-0.31.1/acconfig.h 1969-12-31 19:00:00.000000000 -0500 @@ -1,30 +0,0 @@ -/* acconfig.h - This file is in the public domain. - - Descriptive text for the C preprocessor macros that - the distributed Autoconf macros can define. - No software package will use all of them; autoheader copies the ones - your configure.in uses into your configuration header file templates. - - The entries are in sort -df order: alphabetical, case insensitive, - ignoring punctuation (such as underscores). Although this order - can split up related entries, it makes it easier to check whether - a given entry is in the file. - - Leave the following blank line there!! Autoheader needs it. */ - - -/* Other stuff */ -#undef AUTOTRACE_VERSION -#undef AUTOTRACE_WEB -#undef HAVE_LIBPNG -#undef HAVE_LIBSWF -#undef HAVE_MAGICK -#undef HAVE_LIBPSTOEDIT -#undef HAVE_MKSTEMP - - -/* Leave that blank line there!! Autoheader needs it. - If you're adding to this file, keep in mind: - The entries are in sort -df order: alphabetical, case insensitive, - ignoring punctuation (such as underscores). */ diff -Nurd -x'*~' autotrace-0.31.1.orig/autotrace.m4 autotrace-0.31.1/autotrace.m4 --- autotrace-0.31.1.orig/autotrace.m4 2002-10-10 16:44:12.000000000 -0400 +++ autotrace-0.31.1/autotrace.m4 2007-06-25 02:48:10.000000000 -0400 @@ -4,7 +4,7 @@ dnl AM_PATH_AUTOTRACE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl Test to see if libautotrace is installed, and define AUTOTRACE_CFLAGS, LIBS dnl -AC_DEFUN(AM_PATH_AUTOTRACE, +AC_DEFUN([AM_PATH_AUTOTRACE], [dnl dnl Get the cflags and libraries from the autotrace-config script dnl diff -Nurd -x'*~' autotrace-0.31.1.orig/configure.in autotrace-0.31.1/configure.in --- autotrace-0.31.1.orig/configure.in 2002-11-08 12:49:23.000000000 -0500 +++ autotrace-0.31.1/configure.in 2007-06-25 02:48:10.000000000 -0400 @@ -11,7 +11,7 @@ AUTOTRACE_MINOR_VERSION=31 AUTOTRACE_MICRO_VERSION=1 AUTOTRACE_VERSION=${AUTOTRACE_MAJOR_VERSION}.${AUTOTRACE_MINOR_VERSION}.${AUTOTRACE_MICRO_VERSION} -AC_DEFINE_UNQUOTED(AUTOTRACE_VERSION,"$AUTOTRACE_VERSION") +AC_DEFINE_UNQUOTED(AUTOTRACE_VERSION,"$AUTOTRACE_VERSION", [Program version.]) AC_SUBST(AUTOTRACE_VERSION) AM_INIT_AUTOMAKE(autotrace, $AUTOTRACE_VERSION, no-define) @@ -30,14 +30,13 @@ AC_PROG_LIBTOOL AUTOTRACE_WEB=http://autotrace.sourceforge.net -AC_DEFINE_UNQUOTED(AUTOTRACE_WEB, "$AUTOTRACE_WEB") +AC_DEFINE_UNQUOTED(AUTOTRACE_WEB, "$AUTOTRACE_WEB", [Program homepage.]) AM_MAINTAINER_MODE AM_CONFIG_HEADER(config.h) AC_PROG_CPP -AC_PROG_RANLIB dnl AC_CANONICAL_HOST dnl AC_ARG_PROGRAM AM_SANITY_CHECK @@ -80,10 +79,10 @@ changequote([,])dnl MAGICK_MAJOR_VERSION_CHECK=`expr $MAGICK_MAJOR_VERSION \>= 5` MAGICK_MINOR_VERSION_CHECK=`expr $MAGICK_MINOR_VERSION \>= 2` - dnl I don't consider ImageMagick 6.x. - if test "$MAGICK_VERSION" = "5.2.0" \ - || test "$MAGICK_MAJOR_VERSION_CHECK" = 0 \ - || test "$MAGICK_MINOR_VERSION_CHECK" = 0 ; then + MAGICK_MICRO_VERSION_CHECK=`expr $MAGICK_MICRO_VERSION \>= 1` + if test "$MAGICK_MAJOR_VERSION_CHECK" = 0 \ + && test "$MAGICK_MINOR_VERSION_CHECK" = 0 \ + && test "$MAGICK_MICRO_VERSION_CHECK" = 0 ; then AC_MSG_RESULT(no($MAGICK_VERSION)) AC_MSG_WARN([*** Version 5.2.1 or higher is required. ***]) AC_MSG_WARN([*** ImageMagick input handler is disabled. ***]) @@ -92,7 +91,7 @@ AC_SUBST(MAGICK_CFLAGS) AC_SUBST(MAGICK_LDFLAGS) HAVE_MAGICK=yes - AC_DEFINE(HAVE_MAGICK) + AC_DEFINE([HAVE_MAGICK], 1, [Define to 1 if you have ImageMagick >= 5.2.1.]) fi else AC_MSG_WARN([*** Magick-config is found but magick/api.h is not found in $MAGICK_CFLAGS ***]) @@ -182,7 +181,7 @@ if test "x$HAVE_LIBPNG" = "xyes" ; then LIBPNG_LDFLAGS="-lpng -lz -lm" AC_SUBST(LIBPNG_LDFLAGS) - AC_DEFINE(HAVE_LIBPNG) + AC_DEFINE(HAVE_LIBPNG, 1, [Define to 1 if you have the `png' library (-lpng).]) else AC_MSG_WARN([*** libpng exists but cannot find png_read_png in the libpng. ***]) AC_MSG_WARN([*** libpng might be old. ***]) @@ -209,7 +208,7 @@ if test "$HAVE_LIBSWF" = "yes" ; then LIBSWF_LDFLAGS="-lming -lm" AC_SUBST(LIBSWF_LDFLAGS) - AC_DEFINE(HAVE_LIBSWF) + AC_DEFINE(HAVE_LIBSWF, 1, [Define to 1 if you have the `ming' library (-lming).]) else AC_MSG_WARN([*** Cannot find libming. ***]) AC_MSG_WARN([*** SWF output is disabled. ***]) @@ -250,11 +249,8 @@ dnl pstoedit library dnl HAVE_LIBPSTOEDIT=no -HAVE_LIBPSTOEDIT_320=no -HAVE_LIBPSTOEDIT_321=no LIBPSTOEDIT_CFLAGS= LIBPSTOEDIT_LIBS= -LIBPSTOEDIT_EXTRA_LIBS= AC_ARG_WITH(pstoedit, [ --with-pstoedit link with pstoedit library(default) @@ -263,53 +259,7 @@ dnl dnl dnl -AC_PROG_CXX -dnl Standard C++ library and C++ Runtime -dnl --- WORKAROUND for pstoedit 3.32.0 -CXX_RUNTIME_LIB= -CXX_STD_LIB= -if test x"$GXX" = xyes; then - AC_CHECK_LIB(g++,main,CXX_RUNTIME_LIB=-lg++) - AC_CHECK_LIB(stdc++,main,CXX_STD_LIB=-lstdc++,,${CXX_RUNTIME_LIB}) -fi -AC_MSG_CHECKING([for C++ runtime]) -LIBPSTOEDIT_EXTRA_LIBS="${CXX_STD_LIB} ${CXX_RUNTIME_LIB}" -AC_MSG_RESULT([${CXX_STD_LIB} ${CXX_RUNTIME_LIB}]) -dnl dl library -dnl --- WORKAROUND for pstoedit 3.32.0 -LIBLD_LDFLAGS= -AC_CHECK_LIB(dl,main,[LIBLD_LDFLAGS=-ldl]) -if test "x${LIBLD_LDFLAGS}" != x; then - LIBPSTOEDIT_EXTRA_LIBS="${LIBPSTOEDIT_EXTRA_LIBS} ${LIBLD_LDFLAGS}" -fi - -echo '*** Checking pstoedit existence TWICE(if needed) ***' -echo '*** This is the 1st check ***' -AM_PATH_PSTOEDIT(3.32.1,HAVE_LIBPSTOEDIT_321=yes) -if test ${HAVE_LIBPSTOEDIT_321} != yes; then - echo '*** The 1st check is failed. ***' - LIBS_BAKCUP=$LIBS - LIBS="$LIBS ${LIBPSTOEDIT_EXTRA_LIBS}" - echo '*** This is the 2nd check ***' - AM_PATH_PSTOEDIT(3.32.0,HAVE_LIBPSTOEDIT_320=yes) - LIBS=${LIBS_BAKCUP} - - if test ${HAVE_LIBPSTOEDIT_320} = yes; then - echo '*** The 2nd check is passed. ***' - HAVE_LIBPSTOEDIT=yes - AC_DEFINE(HAVE_LIBPSTOEDIT) - LIBPSTOEDIT_LIBS="${PSTOEDIT_LIBS} ${LIBPSTOEDIT_EXTRA_LIBS}" - LIBPSTOEDIT_CFLAGS="${PSTOEDIT_CFLAGS}" - else - echo '*** The 2nd check is failed. ***' - fi -else - echo '*** The 1st check is passed. ***' - HAVE_LIBPSTOEDIT=yes - AC_DEFINE(HAVE_LIBPSTOEDIT) - LIBPSTOEDIT_LIBS="${PSTOEDIT_LIBS} ${LIBPSTOEDIT_EXTRA_LIBS}" - LIBPSTOEDIT_CFLAGS="${PSTOEDIT_CFLAGS}" -fi +PKG_CHECK_MODULES(LIBPSTOEDIT, pstoedit, HAVE_LIBPSTOEDIT=yes, HAVE_LIBPSTOEDIT=no) if test ${HAVE_LIBPSTOEDIT} = yes; then AC_CHECK_FUNCS([mkstemp]) @@ -317,6 +267,7 @@ echo '*** However, these are experimental functions in autotrace. ***' echo '*** If you get an error in building time about pstoedit, ***' echo '*** you can run configure with --without-pstoedit option again. ***' + AC_DEFINE([HAVE_LIBPSTOEDIT], 1, [Define to 1 if you have the `pstoedit' library via pkg-config.]) else AC_MSG_WARN([ *** Cannot find libpstoedit. ***