Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 361029 | Differences between
and this patch

Collapse All | Expand All

(-)libimobiledevice-1.0.6.orig/configure.ac (-2 / +3 lines)
Lines 59-67 Link Here
59
	    [build_swig=true])
59
	    [build_swig=true])
60
if test "$build_swig" = "true"; then
60
if test "$build_swig" = "true"; then
61
            AM_PATH_PYTHON(2.3)
61
            AM_PATH_PYTHON(2.3)
62
            AC_PROG_SWIG(1.3.21)
62
            AX_PKG_SWIG(1.3.21)
63
            AX_SWIG_ENABLE_CXX
63
            AX_SWIG_ENABLE_CXX
64
            SWIG_PYTHON
64
            AX_SWIG_MULTI_MODULE_SUPPORT
65
            AX_SWIG_PYTHON
65
else
66
else
66
            SWIG=false
67
            SWIG=false
67
fi
68
fi
(-)libimobiledevice-1.0.6.orig/m4/ac_pkg_swig.m4 (-122 lines)
Lines 1-122 Link Here
1
# ===========================================================================
2
#              http://autoconf-archive.cryp.to/ac_pkg_swig.html
3
# ===========================================================================
4
#
5
# SYNOPSIS
6
#
7
#   AC_PROG_SWIG([major.minor.micro])
8
#
9
# DESCRIPTION
10
#
11
#   This macro searches for a SWIG installation on your system. If found you
12
#   should call SWIG via $(SWIG). You can use the optional first argument to
13
#   check if the version of the available SWIG is greater than or equal to
14
#   the value of the argument. It should have the format: N[.N[.N]] (N is a
15
#   number between 0 and 999. Only the first N is mandatory.)
16
#
17
#   If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that
18
#   the swig package is this version number or higher.
19
#
20
#   In configure.in, use as:
21
#
22
#     AC_PROG_SWIG(1.3.17)
23
#     SWIG_ENABLE_CXX
24
#     SWIG_MULTI_MODULE_SUPPORT
25
#     SWIG_PYTHON
26
#
27
# LAST MODIFICATION
28
#
29
#   2008-04-12
30
#
31
# COPYLEFT
32
#
33
#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
34
#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
35
#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
36
#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
37
#
38
#   This program is free software; you can redistribute it and/or modify it
39
#   under the terms of the GNU General Public License as published by the
40
#   Free Software Foundation; either version 2 of the License, or (at your
41
#   option) any later version.
42
#
43
#   This program is distributed in the hope that it will be useful, but
44
#   WITHOUT ANY WARRANTY; without even the implied warranty of
45
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
46
#   Public License for more details.
47
#
48
#   You should have received a copy of the GNU General Public License along
49
#   with this program. If not, see <http://www.gnu.org/licenses/>.
50
#
51
#   As a special exception, the respective Autoconf Macro's copyright owner
52
#   gives unlimited permission to copy, distribute and modify the configure
53
#   scripts that are the output of Autoconf when processing the Macro. You
54
#   need not follow the terms of the GNU General Public License when using
55
#   or distributing such scripts, even though portions of the text of the
56
#   Macro appear in them. The GNU General Public License (GPL) does govern
57
#   all other use of the material that constitutes the Autoconf Macro.
58
#
59
#   This special exception to the GPL applies to versions of the Autoconf
60
#   Macro released by the Autoconf Macro Archive. When you make and
61
#   distribute a modified version of the Autoconf Macro, you may extend this
62
#   special exception to the GPL to apply to your modified version as well.
63
64
AC_DEFUN([AC_PROG_SWIG],[
65
        AC_PATH_PROG([SWIG],[swig])
66
        if test -z "$SWIG" ; then
67
                AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org] or install your distribution specific swig package.)
68
                SWIG=false
69
        elif test -n "$1" ; then
70
                AC_MSG_CHECKING([for SWIG version])
71
                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
72
                AC_MSG_RESULT([$swig_version])
73
                if test -n "$swig_version" ; then
74
                        # Calculate the required version number components
75
                        [required=$1]
76
                        [required_major=`echo $required | sed 's/[^0-9].*//'`]
77
                        if test -z "$required_major" ; then
78
                                [required_major=0]
79
                        fi
80
                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
81
                        [required_minor=`echo $required | sed 's/[^0-9].*//'`]
82
                        if test -z "$required_minor" ; then
83
                                [required_minor=0]
84
                        fi
85
                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
86
                        [required_patch=`echo $required | sed 's/[^0-9].*//'`]
87
                        if test -z "$required_patch" ; then
88
                                [required_patch=0]
89
                        fi
90
                        # Calculate the available version number components
91
                        [available=$swig_version]
92
                        [available_major=`echo $available | sed 's/[^0-9].*//'`]
93
                        if test -z "$available_major" ; then
94
                                [available_major=0]
95
                        fi
96
                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
97
                        [available_minor=`echo $available | sed 's/[^0-9].*//'`]
98
                        if test -z "$available_minor" ; then
99
                                [available_minor=0]
100
                        fi
101
                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
102
                        [available_patch=`echo $available | sed 's/[^0-9].*//'`]
103
                        if test -z "$available_patch" ; then
104
                                [available_patch=0]
105
                        fi
106
                        if test $available_major -ne $required_major \
107
                                -o $available_minor -ne $required_minor \
108
                                -o $available_patch -lt $required_patch ; then
109
                                AC_MSG_WARN([SWIG version >= $1 is required.  You have $swig_version.  You should look at http://www.swig.org])
110
                                SWIG=false
111
                        else
112
                                AC_MSG_NOTICE([SWIG executable is '$SWIG'])
113
                                SWIG_LIB=`$SWIG -swiglib`
114
                                AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
115
                        fi
116
                else
117
                        AC_MSG_WARN([cannot determine SWIG version])
118
                        SWIG=false
119
                fi
120
        fi
121
        AC_SUBST([SWIG_LIB])
122
])
(-)libimobiledevice-1.0.6.orig/m4/ax_pkg_swig.m4 (+135 lines)
Line 0 Link Here
1
# ===========================================================================
2
#        http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html
3
# ===========================================================================
4
#
5
# SYNOPSIS
6
#
7
#   AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found])
8
#
9
# DESCRIPTION
10
#
11
#   This macro searches for a SWIG installation on your system. If found,
12
#   then SWIG is AC_SUBST'd; if not found, then $SWIG is empty.  If SWIG is
13
#   found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd.
14
#
15
#   You can use the optional first argument to check if the version of the
16
#   available SWIG is greater than or equal to the value of the argument. It
17
#   should have the format: N[.N[.N]] (N is a number between 0 and 999. Only
18
#   the first N is mandatory.) If the version argument is given (e.g.
19
#   1.3.17), AX_PKG_SWIG checks that the swig package is this version number
20
#   or higher.
21
#
22
#   As usual, action-if-found is executed if SWIG is found, otherwise
23
#   action-if-not-found is executed.
24
#
25
#   In configure.in, use as:
26
#
27
#     AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ])
28
#     AX_SWIG_ENABLE_CXX
29
#     AX_SWIG_MULTI_MODULE_SUPPORT
30
#     AX_SWIG_PYTHON
31
#
32
# LICENSE
33
#
34
#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
35
#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
36
#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
37
#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
38
#   Copyright (c) 2011 Murray Cumming <murrayc@openismus.com>
39
#
40
#   This program is free software; you can redistribute it and/or modify it
41
#   under the terms of the GNU General Public License as published by the
42
#   Free Software Foundation; either version 2 of the License, or (at your
43
#   option) any later version.
44
#
45
#   This program is distributed in the hope that it will be useful, but
46
#   WITHOUT ANY WARRANTY; without even the implied warranty of
47
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
48
#   Public License for more details.
49
#
50
#   You should have received a copy of the GNU General Public License along
51
#   with this program. If not, see <http://www.gnu.org/licenses/>.
52
#
53
#   As a special exception, the respective Autoconf Macro's copyright owner
54
#   gives unlimited permission to copy, distribute and modify the configure
55
#   scripts that are the output of Autoconf when processing the Macro. You
56
#   need not follow the terms of the GNU General Public License when using
57
#   or distributing such scripts, even though portions of the text of the
58
#   Macro appear in them. The GNU General Public License (GPL) does govern
59
#   all other use of the material that constitutes the Autoconf Macro.
60
#
61
#   This special exception to the GPL applies to versions of the Autoconf
62
#   Macro released by the Autoconf Archive. When you make and distribute a
63
#   modified version of the Autoconf Macro, you may extend this special
64
#   exception to the GPL to apply to your modified version as well.
65
66
#serial 8
67
68
AC_DEFUN([AX_PKG_SWIG],[
69
        # Ubuntu has swig 2.0 as /usr/bin/swig2.0
70
        AC_PATH_PROGS([SWIG],[swig swig2.0])
71
        if test -z "$SWIG" ; then
72
                m4_ifval([$3],[$3],[:])
73
        elif test -n "$1" ; then
74
                AC_MSG_CHECKING([SWIG version])
75
                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
76
                AC_MSG_RESULT([$swig_version])
77
                if test -n "$swig_version" ; then
78
                        # Calculate the required version number components
79
                        [required=$1]
80
                        [required_major=`echo $required | sed 's/[^0-9].*//'`]
81
                        if test -z "$required_major" ; then
82
                                [required_major=0]
83
                        fi
84
                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
85
                        [required_minor=`echo $required | sed 's/[^0-9].*//'`]
86
                        if test -z "$required_minor" ; then
87
                                [required_minor=0]
88
                        fi
89
                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
90
                        [required_patch=`echo $required | sed 's/[^0-9].*//'`]
91
                        if test -z "$required_patch" ; then
92
                                [required_patch=0]
93
                        fi
94
                        # Calculate the available version number components
95
                        [available=$swig_version]
96
                        [available_major=`echo $available | sed 's/[^0-9].*//'`]
97
                        if test -z "$available_major" ; then
98
                                [available_major=0]
99
                        fi
100
                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
101
                        [available_minor=`echo $available | sed 's/[^0-9].*//'`]
102
                        if test -z "$available_minor" ; then
103
                                [available_minor=0]
104
                        fi
105
                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
106
                        [available_patch=`echo $available | sed 's/[^0-9].*//'`]
107
                        if test -z "$available_patch" ; then
108
                                [available_patch=0]
109
                        fi
110
                        # Convert the version tuple into a single number for easier comparison.
111
                        # Using base 100 should be safe since SWIG internally uses BCD values
112
                        # to encode its version number.
113
                        required_swig_vernum=`expr $required_major \* 10000 \
114
                            \+ $required_minor \* 100 \+ $required_patch`
115
                        available_swig_vernum=`expr $available_major \* 10000 \
116
                            \+ $available_minor \* 100 \+ $available_patch`
117
118
                        if test $available_swig_vernum -lt $required_swig_vernum; then
119
                                AC_MSG_WARN([SWIG version >= $1 is required.  You have $swig_version.])
120
                                SWIG=''
121
                                m4_ifval([$3],[$3],[])
122
                        else
123
                                AC_MSG_CHECKING([for SWIG library])
124
                                SWIG_LIB=`$SWIG -swiglib`
125
                                AC_MSG_RESULT([$SWIG_LIB])
126
                                m4_ifval([$2],[$2],[])
127
                        fi
128
                else
129
                        AC_MSG_WARN([cannot determine SWIG version])
130
                        SWIG=''
131
                        m4_ifval([$3],[$3],[])
132
                fi
133
        fi
134
        AC_SUBST([SWIG_LIB])
135
])
(-)libimobiledevice-1.0.6.orig/m4/ax_python_devel.m4 (+325 lines)
Line 0 Link Here
1
# ===========================================================================
2
#      http://www.gnu.org/software/autoconf-archive/ax_python_devel.html
3
# ===========================================================================
4
#
5
# SYNOPSIS
6
#
7
#   AX_PYTHON_DEVEL([version])
8
#
9
# DESCRIPTION
10
#
11
#   Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
12
#   in your configure.ac.
13
#
14
#   This macro checks for Python and tries to get the include path to
15
#   'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS)
16
#   output variables. It also exports $(PYTHON_EXTRA_LIBS) and
17
#   $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
18
#
19
#   You can search for some particular version of Python by passing a
20
#   parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
21
#   note that you *have* to pass also an operator along with the version to
22
#   match, and pay special attention to the single quotes surrounding the
23
#   version number. Don't use "PYTHON_VERSION" for this: that environment
24
#   variable is declared as precious and thus reserved for the end-user.
25
#
26
#   This macro should work for all versions of Python >= 2.1.0. As an end
27
#   user, you can disable the check for the python version by setting the
28
#   PYTHON_NOVERSIONCHECK environment variable to something else than the
29
#   empty string.
30
#
31
#   If you need to use this macro for an older Python version, please
32
#   contact the authors. We're always open for feedback.
33
#
34
# LICENSE
35
#
36
#   Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de>
37
#   Copyright (c) 2009 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
38
#   Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net>
39
#   Copyright (c) 2009 Andrew Collier <colliera@ukzn.ac.za>
40
#   Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
41
#   Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
42
#
43
#   This program is free software: you can redistribute it and/or modify it
44
#   under the terms of the GNU General Public License as published by the
45
#   Free Software Foundation, either version 3 of the License, or (at your
46
#   option) any later version.
47
#
48
#   This program is distributed in the hope that it will be useful, but
49
#   WITHOUT ANY WARRANTY; without even the implied warranty of
50
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
51
#   Public License for more details.
52
#
53
#   You should have received a copy of the GNU General Public License along
54
#   with this program. If not, see <http://www.gnu.org/licenses/>.
55
#
56
#   As a special exception, the respective Autoconf Macro's copyright owner
57
#   gives unlimited permission to copy, distribute and modify the configure
58
#   scripts that are the output of Autoconf when processing the Macro. You
59
#   need not follow the terms of the GNU General Public License when using
60
#   or distributing such scripts, even though portions of the text of the
61
#   Macro appear in them. The GNU General Public License (GPL) does govern
62
#   all other use of the material that constitutes the Autoconf Macro.
63
#
64
#   This special exception to the GPL applies to versions of the Autoconf
65
#   Macro released by the Autoconf Archive. When you make and distribute a
66
#   modified version of the Autoconf Macro, you may extend this special
67
#   exception to the GPL to apply to your modified version as well.
68
69
#serial 8
70
71
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
72
AC_DEFUN([AX_PYTHON_DEVEL],[
73
	#
74
	# Allow the use of a (user set) custom python version
75
	#
76
	AC_ARG_VAR([PYTHON_VERSION],[The installed Python
77
		version to use, for example '2.3'. This string
78
		will be appended to the Python interpreter
79
		canonical name.])
80
81
	AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
82
	if test -z "$PYTHON"; then
83
	   AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
84
	   PYTHON_VERSION=""
85
	fi
86
87
	#
88
	# Check for a version of Python >= 2.1.0
89
	#
90
	AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
91
	ac_supports_python_ver=`$PYTHON -c "import sys; \
92
		ver = sys.version.split ()[[0]]; \
93
		print (ver >= '2.1.0')"`
94
	if test "$ac_supports_python_ver" != "True"; then
95
		if test -z "$PYTHON_NOVERSIONCHECK"; then
96
			AC_MSG_RESULT([no])
97
			AC_MSG_FAILURE([
98
This version of the AC@&t@_PYTHON_DEVEL macro
99
doesn't work properly with versions of Python before
100
2.1.0. You may need to re-run configure, setting the
101
variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
102
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
103
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
104
to something else than an empty string.
105
])
106
		else
107
			AC_MSG_RESULT([skip at user request])
108
		fi
109
	else
110
		AC_MSG_RESULT([yes])
111
	fi
112
113
	#
114
	# if the macro parameter ``version'' is set, honour it
115
	#
116
	if test -n "$1"; then
117
		AC_MSG_CHECKING([for a version of Python $1])
118
		ac_supports_python_ver=`$PYTHON -c "import sys; \
119
			ver = sys.version.split ()[[0]]; \
120
			print (ver $1)"`
121
		if test "$ac_supports_python_ver" = "True"; then
122
		   AC_MSG_RESULT([yes])
123
		else
124
			AC_MSG_RESULT([no])
125
			AC_MSG_ERROR([this package requires Python $1.
126
If you have it installed, but it isn't the default Python
127
interpreter in your system path, please pass the PYTHON_VERSION
128
variable to configure. See ``configure --help'' for reference.
129
])
130
			PYTHON_VERSION=""
131
		fi
132
	fi
133
134
	#
135
	# Check if you have distutils, else fail
136
	#
137
	AC_MSG_CHECKING([for the distutils Python package])
138
	ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
139
	if test -z "$ac_distutils_result"; then
140
		AC_MSG_RESULT([yes])
141
	else
142
		AC_MSG_RESULT([no])
143
		AC_MSG_ERROR([cannot import Python module "distutils".
144
Please check your Python installation. The error was:
145
$ac_distutils_result])
146
		PYTHON_VERSION=""
147
	fi
148
149
	#
150
	# Check for Python include path
151
	#
152
	AC_MSG_CHECKING([for Python include path])
153
	if test -z "$PYTHON_CPPFLAGS"; then
154
		python_path=`$PYTHON -c "import distutils.sysconfig; \
155
			print (distutils.sysconfig.get_python_inc ());"`
156
		if test -n "${python_path}"; then
157
			python_path="-I$python_path"
158
		fi
159
		PYTHON_CPPFLAGS=$python_path
160
	fi
161
	AC_MSG_RESULT([$PYTHON_CPPFLAGS])
162
	AC_SUBST([PYTHON_CPPFLAGS])
163
164
	#
165
	# Check for Python library path
166
	#
167
	AC_MSG_CHECKING([for Python library path])
168
	if test -z "$PYTHON_LDFLAGS"; then
169
		# (makes two attempts to ensure we've got a version number
170
		# from the interpreter)
171
		ac_python_version=`cat<<EOD | $PYTHON -
172
173
# join all versioning strings, on some systems
174
# major/minor numbers could be in different list elements
175
from distutils.sysconfig import *
176
ret = ''
177
for e in get_config_vars ('VERSION'):
178
	if (e != None):
179
		ret += e
180
print (ret)
181
EOD`
182
183
		if test -z "$ac_python_version"; then
184
			if test -n "$PYTHON_VERSION"; then
185
				ac_python_version=$PYTHON_VERSION
186
			else
187
				ac_python_version=`$PYTHON -c "import sys; \
188
					print (sys.version[[:3]])"`
189
			fi
190
		fi
191
192
		# Make the versioning information available to the compiler
193
		AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
194
                                   [If available, contains the Python version number currently in use.])
195
196
		# First, the library directory:
197
		ac_python_libdir=`cat<<EOD | $PYTHON -
198
199
# There should be only one
200
import distutils.sysconfig
201
for e in distutils.sysconfig.get_config_vars ('LIBDIR'):
202
	if e != None:
203
		print (e)
204
		break
205
EOD`
206
207
		# Before checking for libpythonX.Y, we need to know
208
		# the extension the OS we're on uses for libraries
209
		# (we take the first one, if there's more than one fix me!):
210
		ac_python_soext=`$PYTHON -c \
211
		  "import distutils.sysconfig; \
212
		  print (distutils.sysconfig.get_config_vars('SO')[[0]])"`
213
214
		# Now, for the library:
215
		ac_python_soname=`$PYTHON -c \
216
		  "import distutils.sysconfig; \
217
		  print (distutils.sysconfig.get_config_vars('LDLIBRARY')[[0]])"`
218
219
		# Strip away extension from the end to canonicalize its name:
220
		ac_python_library=`echo "$ac_python_soname" | sed "s/${ac_python_soext}$//"`
221
222
		# This small piece shamelessly adapted from PostgreSQL python macro;
223
		# credits goes to momjian, I think. I'd like to put the right name
224
		# in the credits, if someone can point me in the right direction... ?
225
		#
226
		if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
227
			-a x"$ac_python_library" != x"$ac_python_soname"
228
		then
229
			# use the official shared library
230
			ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
231
			PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
232
		else
233
			# old way: use libpython from python_configdir
234
			ac_python_libdir=`$PYTHON -c \
235
			  "from distutils.sysconfig import get_python_lib as f; \
236
			  import os; \
237
			  print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
238
			PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
239
		fi
240
241
		if test -z "PYTHON_LDFLAGS"; then
242
			AC_MSG_ERROR([
243
  Cannot determine location of your Python DSO. Please check it was installed with
244
  dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
245
			])
246
		fi
247
	fi
248
	AC_MSG_RESULT([$PYTHON_LDFLAGS])
249
	AC_SUBST([PYTHON_LDFLAGS])
250
251
	#
252
	# Check for site packages
253
	#
254
	AC_MSG_CHECKING([for Python site-packages path])
255
	if test -z "$PYTHON_SITE_PKG"; then
256
		PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
257
			print (distutils.sysconfig.get_python_lib(0,0));"`
258
	fi
259
	AC_MSG_RESULT([$PYTHON_SITE_PKG])
260
	AC_SUBST([PYTHON_SITE_PKG])
261
262
	#
263
	# libraries which must be linked in when embedding
264
	#
265
	AC_MSG_CHECKING(python extra libraries)
266
	if test -z "$PYTHON_EXTRA_LIBS"; then
267
	   PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
268
                conf = distutils.sysconfig.get_config_var; \
269
                print (conf('LOCALMODLIBS') + ' ' + conf('LIBS'))"`
270
	fi
271
	AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
272
	AC_SUBST(PYTHON_EXTRA_LIBS)
273
274
	#
275
	# linking flags needed when embedding
276
	#
277
	AC_MSG_CHECKING(python extra linking flags)
278
	if test -z "$PYTHON_EXTRA_LDFLAGS"; then
279
		PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
280
			conf = distutils.sysconfig.get_config_var; \
281
			print (conf('LINKFORSHARED'))"`
282
	fi
283
	AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
284
	AC_SUBST(PYTHON_EXTRA_LDFLAGS)
285
286
	#
287
	# final check to see if everything compiles alright
288
	#
289
	AC_MSG_CHECKING([consistency of all components of python development environment])
290
	# save current global flags
291
	ac_save_LIBS="$LIBS"
292
	ac_save_CPPFLAGS="$CPPFLAGS"
293
	LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS"
294
	CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
295
	AC_LANG_PUSH([C])
296
	AC_LINK_IFELSE([
297
		AC_LANG_PROGRAM([[#include <Python.h>]],
298
				[[Py_Initialize();]])
299
		],[pythonexists=yes],[pythonexists=no])
300
	AC_LANG_POP([C])
301
	# turn back to default flags
302
	CPPFLAGS="$ac_save_CPPFLAGS"
303
	LIBS="$ac_save_LIBS"
304
305
	AC_MSG_RESULT([$pythonexists])
306
307
        if test ! "x$pythonexists" = "xyes"; then
308
	   AC_MSG_FAILURE([
309
  Could not link test program to Python. Maybe the main Python library has been
310
  installed in some non-standard library path. If so, pass it to configure,
311
  via the LDFLAGS environment variable.
312
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
313
  ============================================================================
314
   ERROR!
315
   You probably have to install the development version of the Python package
316
   for your distribution.  The exact name of this package varies among them.
317
  ============================================================================
318
	   ])
319
	  PYTHON_VERSION=""
320
	fi
321
322
	#
323
	# all done!
324
	#
325
])
(-)libimobiledevice-1.0.6.orig/m4/ax_swig_enable_cxx.m4 (-5 / +5 lines)
Lines 1-5 Link Here
1
# ===========================================================================
1
# ===========================================================================
2
#       http://www.nongnu.org/autoconf-archive/ax_swig_enable_cxx.html
2
#    http://www.gnu.org/software/autoconf-archive/ax_swig_enable_cxx.html
3
# ===========================================================================
3
# ===========================================================================
4
#
4
#
5
# SYNOPSIS
5
# SYNOPSIS
Lines 43-53 Link Here
43
#   modified version of the Autoconf Macro, you may extend this special
43
#   modified version of the Autoconf Macro, you may extend this special
44
#   exception to the GPL to apply to your modified version as well.
44
#   exception to the GPL to apply to your modified version as well.
45
45
46
#serial 6
47
46
AU_ALIAS([SWIG_ENABLE_CXX], [AX_SWIG_ENABLE_CXX])
48
AU_ALIAS([SWIG_ENABLE_CXX], [AX_SWIG_ENABLE_CXX])
47
AC_DEFUN([AX_SWIG_ENABLE_CXX],[
49
AC_DEFUN([AX_SWIG_ENABLE_CXX],[
48
        AC_REQUIRE([AC_PROG_SWIG])
50
        AC_REQUIRE([AX_PKG_SWIG])
49
        AC_REQUIRE([AC_PROG_CXX])
51
        AC_REQUIRE([AC_PROG_CXX])
50
        if test "$SWIG" != "false"; then
52
        SWIG="$SWIG -c++"
51
                SWIG="$SWIG -c++"
52
        fi
53
])
53
])
(-)libimobiledevice-1.0.6.orig/m4/ax_swig_multi_module_support.m4 (+56 lines)
Line 0 Link Here
1
# ================================================================================
2
#  http://www.gnu.org/software/autoconf-archive/ax_swig_multi_module_support.html
3
# ================================================================================
4
#
5
# SYNOPSIS
6
#
7
#   AX_SWIG_MULTI_MODULE_SUPPORT
8
#
9
# DESCRIPTION
10
#
11
#   Enable support for multiple modules. This effects all invocations of
12
#   $(SWIG). You have to link all generated modules against the appropriate
13
#   SWIG runtime library. If you want to build Python modules for example,
14
#   use the AX_SWIG_PYTHON macro and link the modules against
15
#   $(AX_SWIG_PYTHON_LIBS).
16
#
17
# LICENSE
18
#
19
#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
20
#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
21
#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
22
#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
23
#
24
#   This program is free software; you can redistribute it and/or modify it
25
#   under the terms of the GNU General Public License as published by the
26
#   Free Software Foundation; either version 2 of the License, or (at your
27
#   option) any later version.
28
#
29
#   This program is distributed in the hope that it will be useful, but
30
#   WITHOUT ANY WARRANTY; without even the implied warranty of
31
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
32
#   Public License for more details.
33
#
34
#   You should have received a copy of the GNU General Public License along
35
#   with this program. If not, see <http://www.gnu.org/licenses/>.
36
#
37
#   As a special exception, the respective Autoconf Macro's copyright owner
38
#   gives unlimited permission to copy, distribute and modify the configure
39
#   scripts that are the output of Autoconf when processing the Macro. You
40
#   need not follow the terms of the GNU General Public License when using
41
#   or distributing such scripts, even though portions of the text of the
42
#   Macro appear in them. The GNU General Public License (GPL) does govern
43
#   all other use of the material that constitutes the Autoconf Macro.
44
#
45
#   This special exception to the GPL applies to versions of the Autoconf
46
#   Macro released by the Autoconf Archive. When you make and distribute a
47
#   modified version of the Autoconf Macro, you may extend this special
48
#   exception to the GPL to apply to your modified version as well.
49
50
#serial 7
51
52
AU_ALIAS([SWIG_MULTI_MODULE_SUPPORT], [AX_SWIG_MULTI_MODULE_SUPPORT])
53
AC_DEFUN([AX_SWIG_MULTI_MODULE_SUPPORT],[
54
        AC_REQUIRE([AX_PKG_SWIG])
55
        SWIG="$SWIG -noruntime"
56
])
(-)libimobiledevice-1.0.6.orig/m4/ax_swig_python.m4 (+64 lines)
Line 0 Link Here
1
# ===========================================================================
2
#      http://www.gnu.org/software/autoconf-archive/ax_swig_python.html
3
# ===========================================================================
4
#
5
# SYNOPSIS
6
#
7
#   AX_SWIG_PYTHON([use-shadow-classes = {no, yes}])
8
#
9
# DESCRIPTION
10
#
11
#   Checks for Python and provides the $(AX_SWIG_PYTHON_CPPFLAGS), and
12
#   $(AX_SWIG_PYTHON_OPT) output variables.
13
#
14
#   $(AX_SWIG_PYTHON_OPT) contains all necessary SWIG options to generate
15
#   code for Python. Shadow classes are enabled unless the value of the
16
#   optional first argument is exactly 'no'. If you need multi module
17
#   support (provided by the AX_SWIG_MULTI_MODULE_SUPPORT macro) use
18
#   $(AX_SWIG_PYTHON_LIBS) to link against the appropriate library. It
19
#   contains the SWIG Python runtime library that is needed by the type
20
#   check system for example.
21
#
22
# LICENSE
23
#
24
#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
25
#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
26
#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
27
#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
28
#
29
#   This program is free software; you can redistribute it and/or modify it
30
#   under the terms of the GNU General Public License as published by the
31
#   Free Software Foundation; either version 2 of the License, or (at your
32
#   option) any later version.
33
#
34
#   This program is distributed in the hope that it will be useful, but
35
#   WITHOUT ANY WARRANTY; without even the implied warranty of
36
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
37
#   Public License for more details.
38
#
39
#   You should have received a copy of the GNU General Public License along
40
#   with this program. If not, see <http://www.gnu.org/licenses/>.
41
#
42
#   As a special exception, the respective Autoconf Macro's copyright owner
43
#   gives unlimited permission to copy, distribute and modify the configure
44
#   scripts that are the output of Autoconf when processing the Macro. You
45
#   need not follow the terms of the GNU General Public License when using
46
#   or distributing such scripts, even though portions of the text of the
47
#   Macro appear in them. The GNU General Public License (GPL) does govern
48
#   all other use of the material that constitutes the Autoconf Macro.
49
#
50
#   This special exception to the GPL applies to versions of the Autoconf
51
#   Macro released by the Autoconf Archive. When you make and distribute a
52
#   modified version of the Autoconf Macro, you may extend this special
53
#   exception to the GPL to apply to your modified version as well.
54
55
#serial 7
56
57
AU_ALIAS([SWIG_PYTHON], [AX_SWIG_PYTHON])
58
AC_DEFUN([AX_SWIG_PYTHON],[
59
        AC_REQUIRE([AX_PKG_SWIG])
60
        AC_REQUIRE([AX_PYTHON_DEVEL])
61
        test "x$1" != "xno" || swig_shadow=" -noproxy"
62
        AC_SUBST([AX_SWIG_PYTHON_OPT],[-python$swig_shadow])
63
        AC_SUBST([AX_SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
64
])
(-)libimobiledevice-1.0.6.orig/m4/swig_python.m4 (-65 lines)
Lines 1-65 Link Here
1
# ===========================================================================
2
#              http://autoconf-archive.cryp.to/swig_python.html
3
# ===========================================================================
4
#
5
# SYNOPSIS
6
#
7
#   SWIG_PYTHON([use-shadow-classes = {no, yes}])
8
#
9
# DESCRIPTION
10
#
11
#   Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS), and
12
#   $(SWIG_PYTHON_OPT) output variables.
13
#
14
#   $(SWIG_PYTHON_OPT) contains all necessary SWIG options to generate code
15
#   for Python. Shadow classes are enabled unless the value of the optional
16
#   first argument is exactly 'no'. If you need multi module support
17
#   (provided by the SWIG_MULTI_MODULE_SUPPORT macro) use
18
#   $(SWIG_PYTHON_LIBS) to link against the appropriate library. It contains
19
#   the SWIG Python runtime library that is needed by the type check system
20
#   for example.
21
#
22
# LAST MODIFICATION
23
#
24
#   2008-04-12
25
#
26
# COPYLEFT
27
#
28
#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
29
#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
30
#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
31
#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
32
#
33
#   This program is free software; you can redistribute it and/or modify it
34
#   under the terms of the GNU General Public License as published by the
35
#   Free Software Foundation; either version 2 of the License, or (at your
36
#   option) any later version.
37
#
38
#   This program is distributed in the hope that it will be useful, but
39
#   WITHOUT ANY WARRANTY; without even the implied warranty of
40
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
41
#   Public License for more details.
42
#
43
#   You should have received a copy of the GNU General Public License along
44
#   with this program. If not, see <http://www.gnu.org/licenses/>.
45
#
46
#   As a special exception, the respective Autoconf Macro's copyright owner
47
#   gives unlimited permission to copy, distribute and modify the configure
48
#   scripts that are the output of Autoconf when processing the Macro. You
49
#   need not follow the terms of the GNU General Public License when using
50
#   or distributing such scripts, even though portions of the text of the
51
#   Macro appear in them. The GNU General Public License (GPL) does govern
52
#   all other use of the material that constitutes the Autoconf Macro.
53
#
54
#   This special exception to the GPL applies to versions of the Autoconf
55
#   Macro released by the Autoconf Macro Archive. When you make and
56
#   distribute a modified version of the Autoconf Macro, you may extend this
57
#   special exception to the GPL to apply to your modified version as well.
58
59
AC_DEFUN([SWIG_PYTHON],[
60
        AC_REQUIRE([AC_PROG_SWIG])
61
        AC_REQUIRE([AC_PYTHON_DEVEL])
62
        test "x$1" != "xno" || swig_shadow=" -noproxy"
63
        AC_SUBST([SWIG_PYTHON_OPT],[-python$swig_shadow])
64
        AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
65
])

Return to bug 361029