updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / autotrace / build-fixes.patch
blob533e770e68c7d333385df16ea302188cbd6a5f4b
1 --- autotrace-0.31.1-orig/autotrace.m4 2010-08-18 15:28:56.000000000 +0200
2 +++ autotrace-0.31.1/autotrace.m4 2010-08-18 16:06:08.000000000 +0200
3 @@ -4,7 +4,7 @@
4 dnl AM_PATH_AUTOTRACE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
5 dnl Test to see if libautotrace is installed, and define AUTOTRACE_CFLAGS, LIBS
6 dnl
7 -AC_DEFUN(AM_PATH_AUTOTRACE,
8 +AC_DEFUN([AM_PATH_AUTOTRACE],
9 [dnl
10 dnl Get the cflags and libraries from the autotrace-config script
11 dnl
12 @@ -157,4 +157,4 @@
13 AC_SUBST(AUTOTRACE_CFLAGS)
14 AC_SUBST(AUTOTRACE_LIBS)
15 rm -f conf.autotracetest
16 -])
17 \ Kein Zeilenumbruch am Dateiende.
18 +])
19 --- autotrace-0.31.1-orig/configure.in 2010-08-18 15:28:56.000000000 +0200
20 +++ autotrace-0.31.1/configure.in 2010-08-18 16:43:58.000000000 +0200
21 @@ -43,6 +43,7 @@
22 AM_SANITY_CHECK
23 AC_PROG_INSTALL
24 AC_CHECK_HEADERS(malloc.h)
25 +PKG_PROG_PKG_CONFIG
27 dnl
28 dnl ImageMagick
29 @@ -72,15 +73,20 @@
30 MAGICK_VERSION=`Magick-config --version`
31 changequote(,)dnl
32 MAGICK_MAJOR_VERSION=`echo $MAGICK_VERSION \
33 - | sed -e 's/^\([0-9]*\).[0-9]*.[0-9]*$/\1/'`
34 + | sed -e 's/^\([0-9]*\)\.[0-9]*\.[0-9]*.*$/\1/'`
35 MAGICK_MINOR_VERSION=`echo $MAGICK_VERSION \
36 - | sed -e 's/^[0-9]*.\([0-9]*\).[0-9]*$/\1/'`
37 + | sed -e 's/^[0-9]*\.\([0-9]*\)\.[0-9]*.*$/\1/'`
38 MAGICK_MICRO_VERSION=`echo $MAGICK_VERSION \
39 - | sed -e 's/^[0-9]*.[0-9]*.\([0-9]*\)$/\1/'`
40 + | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\).*$/\1/'`
41 changequote([,])dnl
42 - MAGICK_MAJOR_VERSION_CHECK=`expr $MAGICK_MAJOR_VERSION \>= 5`
43 - MAGICK_MINOR_VERSION_CHECK=`expr $MAGICK_MINOR_VERSION \>= 2`
44 - dnl I don't consider ImageMagick 6.x.
45 + MAGICK_MAJOR_VERSION_CHECK=`expr $MAGICK_MAJOR_VERSION '>=' 5`
46 + if test $MAGICK_MAJOR_VERSION -gt 5; then
47 + # We don't need to check the minor version.
48 + MAGICK_MINOR_VERSION_CHECK=1
49 + else
50 + MAGICK_MINOR_VERSION_CHECK=`expr $MAGICK_MINOR_VERSION '>=' 2`
51 + fi
53 if test "$MAGICK_VERSION" = "5.2.0" \
54 || test "$MAGICK_MAJOR_VERSION_CHECK" = 0 \
55 || test "$MAGICK_MINOR_VERSION_CHECK" = 0 ; then
56 @@ -250,88 +256,41 @@
57 dnl pstoedit library
58 dnl
59 HAVE_LIBPSTOEDIT=no
60 -HAVE_LIBPSTOEDIT_320=no
61 -HAVE_LIBPSTOEDIT_321=no
62 LIBPSTOEDIT_CFLAGS=
63 LIBPSTOEDIT_LIBS=
64 -LIBPSTOEDIT_EXTRA_LIBS=
66 AC_ARG_WITH(pstoedit,
67 [ --with-pstoedit link with pstoedit library(default)
68 --without-pstoedit link without pstoedit library],,with_pstoedit=yes)
70 if test "x${with_pstoedit}" = xyes; then
71 -dnl
72 -dnl
73 -dnl
74 -AC_PROG_CXX
75 -dnl Standard C++ library and C++ Runtime
76 -dnl --- WORKAROUND for pstoedit 3.32.0
77 -CXX_RUNTIME_LIB=
78 -CXX_STD_LIB=
79 -if test x"$GXX" = xyes; then
80 - AC_CHECK_LIB(g++,main,CXX_RUNTIME_LIB=-lg++)
81 - AC_CHECK_LIB(stdc++,main,CXX_STD_LIB=-lstdc++,,${CXX_RUNTIME_LIB})
82 -fi
83 -AC_MSG_CHECKING([for C++ runtime])
84 -LIBPSTOEDIT_EXTRA_LIBS="${CXX_STD_LIB} ${CXX_RUNTIME_LIB}"
85 -AC_MSG_RESULT([${CXX_STD_LIB} ${CXX_RUNTIME_LIB}])
86 -dnl dl library
87 -dnl --- WORKAROUND for pstoedit 3.32.0
88 -LIBLD_LDFLAGS=
89 -AC_CHECK_LIB(dl,main,[LIBLD_LDFLAGS=-ldl])
90 -if test "x${LIBLD_LDFLAGS}" != x; then
91 - LIBPSTOEDIT_EXTRA_LIBS="${LIBPSTOEDIT_EXTRA_LIBS} ${LIBLD_LDFLAGS}"
92 -fi
93 + PKG_CHECK_MODULES( [LIBPSTOEDIT], [pstoedit], HAVE_LIBPSTOEDIT=yes )
95 -echo '*** Checking pstoedit existence TWICE(if needed) ***'
96 -echo '*** This is the 1st check ***'
97 -AM_PATH_PSTOEDIT(3.32.1,HAVE_LIBPSTOEDIT_321=yes)
98 -if test ${HAVE_LIBPSTOEDIT_321} != yes; then
99 - echo '*** The 1st check is failed. ***'
100 - LIBS_BAKCUP=$LIBS
101 - LIBS="$LIBS ${LIBPSTOEDIT_EXTRA_LIBS}"
102 - echo '*** This is the 2nd check ***'
103 - AM_PATH_PSTOEDIT(3.32.0,HAVE_LIBPSTOEDIT_320=yes)
104 - LIBS=${LIBS_BAKCUP}
106 - if test ${HAVE_LIBPSTOEDIT_320} = yes; then
107 - echo '*** The 2nd check is passed. ***'
108 - HAVE_LIBPSTOEDIT=yes
109 + if test ${HAVE_LIBPSTOEDIT} = yes; then
110 AC_DEFINE(HAVE_LIBPSTOEDIT)
111 - LIBPSTOEDIT_LIBS="${PSTOEDIT_LIBS} ${LIBPSTOEDIT_EXTRA_LIBS}"
112 - LIBPSTOEDIT_CFLAGS="${PSTOEDIT_CFLAGS}"
113 - else
114 - echo '*** The 2nd check is failed. ***'
115 - fi
116 -else
117 - echo '*** The 1st check is passed. ***'
118 - HAVE_LIBPSTOEDIT=yes
119 - AC_DEFINE(HAVE_LIBPSTOEDIT)
120 - LIBPSTOEDIT_LIBS="${PSTOEDIT_LIBS} ${LIBPSTOEDIT_EXTRA_LIBS}"
121 - LIBPSTOEDIT_CFLAGS="${PSTOEDIT_CFLAGS}"
124 -if test ${HAVE_LIBPSTOEDIT} = yes; then
125 AC_CHECK_FUNCS([mkstemp])
127 echo '*** pstoedit output functions are enabled. ***'
128 echo '*** However, these are experimental functions in autotrace. ***'
129 echo '*** If you get an error in building time about pstoedit, ***'
130 echo '*** you can run configure with --without-pstoedit option again. ***'
131 -else
132 + else
133 AC_MSG_WARN([
134 -*** Cannot find libpstoedit. ***
135 -*** Output functions using libpstoedit are disabled ***])
137 -dnl
138 -dnl
139 -dnl
140 + *** Cannot find libpstoedit. ***
141 + *** Output functions using libpstoedit are disabled ***])
142 + fi
143 + dnl
144 + dnl
145 + dnl
146 else
147 -AC_MSG_WARN([pstoedit output functions are disabled from command line.])
148 + AC_MSG_WARN([pstoedit output functions are disabled from command line.])
151 AC_SUBST(LIBPSTOEDIT_CFLAGS)
152 AC_SUBST(LIBPSTOEDIT_LIBS)
153 AM_CONDITIONAL(HAVE_LIBPSTOEDIT, test x$HAVE_LIBPSTOEDIT = xyes)
157 dnl Vender's cc(not gcc)