Merge lp:~timo-jyrinki/ubuntu/trusty/libimobiledevice/git20140313.bafe6a9e into lp:ubuntu/trusty/libimobiledevice

Proposed by Timo Jyrinki
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 25
Merged at revision: 17
Proposed branch: lp:~timo-jyrinki/ubuntu/trusty/libimobiledevice/git20140313.bafe6a9e
Merge into: lp:ubuntu/trusty/libimobiledevice
Diff against target: 82651 lines (+5526/-73448)
223 files modified
.gitignore (+62/-0)
.pc/01-libs.private.patch/libimobiledevice-1.0.pc.in (+0/-12)
.pc/02-fix-link-errors.patch/src/Makefile.am (+0/-35)
.pc/02-fix-link-errors.patch/tools/Makefile.am (+0/-73)
.pc/09_use_python_config.patch/m4/ac_python_devel.m4 (+0/-265)
.pc/CVE-2013-2142.patch/src/Makefile.am (+0/-35)
.pc/CVE-2013-2142.patch/src/userpref.c (+0/-1161)
.pc/applied-patches (+0/-5)
.pc/git_explicitly_cast_ssl_enabled.patch/cython/lockdown.pxi (+0/-297)
Makefile.am (+1/-1)
Makefile.in (+0/-918)
NEWS (+20/-0)
README (+10/-3)
aclocal.m4 (+0/-1454)
autogen.sh (+15/-0)
common/Makefile.am (+18/-0)
common/debug.c (+169/-0)
common/debug.h (+59/-0)
common/socket.c (+392/-0)
common/socket.h (+65/-0)
common/thread.c (+83/-0)
common/thread.h (+45/-0)
common/userpref.c (+1196/-0)
common/userpref.h (+95/-0)
common/utils.c (+194/-0)
common/utils.h (+52/-0)
compile (+0/-342)
config.guess (+0/-1540)
config.h.in (+0/-167)
config.sub (+0/-1779)
configure (+0/-20637)
configure.ac (+16/-16)
cython/Makefile.in (+0/-698)
cython/afc.pxi (+59/-8)
cython/house_arrest.pxi (+2/-2)
cython/imobiledevice.pxd (+1/-1)
cython/lockdown.pxi (+1/-1)
debian/changelog (+21/-0)
debian/control (+2/-11)
debian/libimobiledevice-doc.doc-base (+0/-9)
debian/libimobiledevice-doc.install (+0/-1)
debian/libimobiledevice-doc.links (+0/-2)
debian/libimobiledevice-utils.manpages (+2/-1)
debian/libimobiledevice4.symbols (+58/-3)
debian/patches/01-libs.private.patch (+2/-2)
debian/patches/02-fix-link-errors.patch (+9/-9)
debian/patches/09_use_python_config.patch (+0/-22)
debian/patches/CVE-2013-2142.patch (+0/-308)
debian/patches/git_explicitly_cast_ssl_enabled.patch (+0/-20)
debian/patches/series (+0/-3)
depcomp (+0/-707)
dev/Makefile.in (+0/-771)
dev/afccheck.c (+5/-5)
dev/filerelaytest.c (+18/-4)
docs/Makefile (+0/-535)
docs/Makefile.am (+1/-1)
docs/Makefile.in (+0/-535)
docs/html/annotated.html (+0/-89)
docs/html/classes.html (+0/-86)
docs/html/dir_0839347dbfd1d6806a2d090799a179ba.html (+0/-94)
docs/html/dir_beb3b87d681f7237804f4f09a166e5a0.html (+0/-105)
docs/html/doxygen.css (+0/-1133)
docs/html/dynsections.js (+0/-78)
docs/html/files.html (+0/-80)
docs/html/functions.html (+0/-81)
docs/html/functions_vars.html (+0/-81)
docs/html/globals.html (+0/-186)
docs/html/globals_0x64.html (+0/-105)
docs/html/globals_0x66.html (+0/-96)
docs/html/globals_0x68.html (+0/-126)
docs/html/globals_0x69.html (+0/-186)
docs/html/globals_0x6c.html (+0/-162)
docs/html/globals_0x6d.html (+0/-279)
docs/html/globals_0x6e.html (+0/-111)
docs/html/globals_0x72.html (+0/-120)
docs/html/globals_0x73.html (+0/-123)
docs/html/globals_0x77.html (+0/-105)
docs/html/globals_defs.html (+0/-67)
docs/html/globals_enum.html (+0/-79)
docs/html/globals_eval.html (+0/-100)
docs/html/globals_func.html (+0/-652)
docs/html/globals_type.html (+0/-244)
docs/html/include_2libimobiledevice_2afc_8h.html (+0/-1172)
docs/html/include_2libimobiledevice_2diagnostics__relay_8h.html (+0/-353)
docs/html/include_2libimobiledevice_2file__relay_8h.html (+0/-254)
docs/html/include_2libimobiledevice_2heartbeat_8h.html (+0/-368)
docs/html/include_2libimobiledevice_2house__arrest_8h.html (+0/-363)
docs/html/include_2libimobiledevice_2installation__proxy_8h.html (+0/-743)
docs/html/include_2libimobiledevice_2lockdown_8h.html (+0/-1129)
docs/html/include_2libimobiledevice_2misagent_8h.html (+0/-340)
docs/html/include_2libimobiledevice_2mobile__image__mounter_8h.html (+0/-336)
docs/html/include_2libimobiledevice_2mobilebackup2_8h.html (+0/-559)
docs/html/include_2libimobiledevice_2mobilebackup_8h.html (+0/-561)
docs/html/include_2libimobiledevice_2mobilesync_8h.html (+0/-993)
docs/html/include_2libimobiledevice_2notification__proxy_8h.html (+0/-434)
docs/html/include_2libimobiledevice_2restore_8h.html (+0/-552)
docs/html/include_2libimobiledevice_2sbservices_8h.html (+0/-427)
docs/html/include_2libimobiledevice_2screenshotr_8h.html (+0/-244)
docs/html/include_2libimobiledevice_2webinspector_8h.html (+0/-369)
docs/html/index.html (+0/-50)
docs/html/jquery.js (+0/-8)
docs/html/libimobiledevice_8h.html (+0/-663)
docs/html/struct_a_f_c_file_packet.html (+0/-69)
docs/html/struct_a_f_c_packet.html (+0/-75)
docs/html/structafc__client__private.html (+0/-77)
docs/html/structdevice__link__service__client__private.html (+0/-67)
docs/html/structdiagnostics__relay__client__private.html (+0/-67)
docs/html/structfile__relay__client__private.html (+0/-67)
docs/html/structheartbeat__client__private.html (+0/-67)
docs/html/structhouse__arrest__client__private.html (+0/-69)
docs/html/structidevice__connection__private.html (+0/-71)
docs/html/structidevice__event__t.html (+0/-120)
docs/html/structidevice__private.html (+0/-71)
docs/html/structinstproxy__client__private.html (+0/-71)
docs/html/structlockdownd__client__private.html (+0/-75)
docs/html/structlockdownd__pair__record.html (+0/-82)
docs/html/structlockdownd__service__descriptor.html (+0/-69)
docs/html/structmisagent__client__private.html (+0/-69)
docs/html/structmobile__image__mounter__client__private.html (+0/-69)
docs/html/structmobilebackup2__client__private.html (+0/-67)
docs/html/structmobilebackup__client__private.html (+0/-67)
docs/html/structmobilesync__anchors.html (+0/-69)
docs/html/structmobilesync__client__private.html (+0/-71)
docs/html/structnp__client__private.html (+0/-71)
docs/html/structproperty__list__service__client__private.html (+0/-67)
docs/html/structrestored__client__private.html (+0/-73)
docs/html/structsbservices__client__private.html (+0/-69)
docs/html/structscreenshotr__client__private.html (+0/-67)
docs/html/structservice__client__private.html (+0/-67)
docs/html/structssl__data__private.html (+0/-77)
docs/html/structwebinspector__client__private.html (+0/-67)
docs/html/tabs.css (+0/-59)
docs/idevicecrashreport.1 (+36/-0)
docs/idevicename.1 (+28/-0)
docs/idevicescreenshot.1 (+6/-2)
include/Makefile.am (+3/-1)
include/Makefile.in (+0/-578)
include/libimobiledevice/afc.h (+5/-0)
include/libimobiledevice/diagnostics_relay.h (+3/-0)
include/libimobiledevice/file_relay.h (+4/-0)
include/libimobiledevice/house_arrest.h (+3/-0)
include/libimobiledevice/installation_proxy.h (+6/-0)
include/libimobiledevice/libimobiledevice.h (+2/-0)
include/libimobiledevice/lockdown.h (+4/-1)
include/libimobiledevice/misagent.h (+3/-0)
include/libimobiledevice/mobile_image_mounter.h (+9/-0)
include/libimobiledevice/mobilebackup.h (+4/-0)
include/libimobiledevice/mobilebackup2.h (+4/-0)
include/libimobiledevice/mobilesync.h (+3/-0)
include/libimobiledevice/notification_proxy.h (+4/-0)
include/libimobiledevice/sbservices.h (+4/-0)
include/libimobiledevice/screenshotr.h (+4/-0)
include/libimobiledevice/service.h (+67/-0)
include/libimobiledevice/syslog_relay.h (+69/-0)
install-sh (+0/-527)
libimobiledevice-1.0.pc.in (+1/-1)
ltmain.sh (+0/-9655)
m4/ac_python_devel.m4 (+19/-16)
m4/ax_swig_enable_cxx.m4 (+53/-0)
m4/libtool.m4 (+0/-7982)
m4/ltoptions.m4 (+0/-384)
m4/ltsugar.m4 (+0/-123)
m4/ltversion.m4 (+0/-23)
m4/lt~obsolete.m4 (+0/-98)
missing (+0/-330)
src/Makefile.am (+6/-7)
src/Makefile.in (+0/-696)
src/afc.c (+44/-26)
src/afc.h (+2/-10)
src/debug.c (+0/-169)
src/debug.h (+0/-59)
src/device_link_service.c (+1/-1)
src/diagnostics_relay.c (+21/-1)
src/file_relay.c (+60/-3)
src/heartbeat.c (+5/-5)
src/house_arrest.c (+47/-27)
src/idevice.c (+51/-33)
src/idevice.h (+2/-5)
src/installation_proxy.c (+149/-54)
src/installation_proxy.h (+3/-13)
src/lockdown.c (+245/-92)
src/lockdown.h (+4/-2)
src/misagent.c (+46/-26)
src/mobile_image_mounter.c (+147/-21)
src/mobile_image_mounter.h (+2/-11)
src/mobilebackup.c (+21/-1)
src/mobilebackup2.c (+33/-1)
src/mobilesync.c (+21/-1)
src/notification_proxy.c (+48/-53)
src/notification_proxy.h (+3/-13)
src/property_list_service.c (+27/-4)
src/property_list_service.h (+1/-0)
src/restore.c (+15/-12)
src/sbservices.c (+38/-34)
src/sbservices.h (+2/-11)
src/screenshotr.c (+21/-1)
src/service.c (+4/-1)
src/service.h (+1/-30)
src/syslog_relay.c (+301/-0)
src/syslog_relay.h (+36/-0)
src/userpref.c (+0/-1208)
src/userpref.h (+0/-73)
src/utils.c (+0/-85)
src/utils.h (+0/-27)
src/webinspector.c (+133/-52)
src/webinspector.h (+2/-0)
tools/Makefile.am (+19/-8)
tools/Makefile.in (+0/-1043)
tools/idevicebackup2.c (+107/-25)
tools/idevicecrashreport.c (+456/-0)
tools/idevicedate.c (+66/-33)
tools/idevicedebugserverproxy.c (+2/-2)
tools/idevicediagnostics.c (+2/-2)
tools/ideviceimagemounter.c (+99/-68)
tools/ideviceinfo.c (+3/-1)
tools/idevicename.c (+126/-0)
tools/idevicepair.c (+35/-20)
tools/idevicescreenshot.c (+24/-14)
tools/idevicesyslog.c (+28/-70)
tools/socket.c (+0/-392)
tools/socket.h (+0/-65)
tools/thread.c (+0/-47)
tools/thread.h (+0/-38)
To merge this branch: bzr merge lp:~timo-jyrinki/ubuntu/trusty/libimobiledevice/git20140313.bafe6a9e
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+210753@code.launchpad.net

Commit message

[ Matthias Niess ]
* Replace a duplicate 'backup' util man page with the one for 'crashreport'

[ Timo Jyrinki ]
* New upstream snapshot. (LP: #1207812)
* Drop patches included in the upstream snapshot:
  - debian/patches/CVE-2013-2142.patch
  - debian/patches/git_explicitly_cast_ssl_enabled.patch
* Drop the python patch, new upstream method seems to work:
  - debian/patches/09_use_python_config.patch
* Refreshed remaining patches:
  - debian/patches/01-libs.private.patch
  - debian/patches/02-fix-link-errors.patch
* Drop libimobiledevice-doc, the git does not include html documentation
* Updated libimobiledevice4.symbols
* Add missing man page for the 'idevicename' util

To post a comment you must log in.
Matthias Niess (mniess) wrote :

I can confirm that it works. Tested on an existing machine and a fresh install.

Matthias Niess (mniess) wrote :

You need to update the .manpages file. There is a duplicate entry of idevicebackup and idevicecrashreport is missing.

23. By Timo Jyrinki on 2014-03-14

[ Matthias Niess ]
Replace a duplicate 'backup' util man page with the one for 'crashreport'

24. By Timo Jyrinki on 2014-03-14

Add missing man page for the 'idevicename' util

25. By Timo Jyrinki on 2014-03-14

s/UNRELEASED/trusty/ for being able to be directly sponsored from the branch.

Sebastien Bacher (seb128) wrote :

thanks, uploaded to trusty

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.gitignore'
2--- .gitignore 1970-01-01 00:00:00 +0000
3+++ .gitignore 2014-03-14 06:45:31 +0000
4@@ -0,0 +1,62 @@
5+# git-ls-files --others --exclude-from=.git/info/exclude
6+# Lines that start with '#' are comments.
7+# For a project mostly in C, the following would be a good set of
8+# exclude patterns (uncomment them if you want to use them):
9+*.[oa]
10+*~
11+*.po
12+*.lo
13+*.la
14+autom4te.cache/*
15+*.in
16+*/.deps/*
17+m4/*
18+swig/*
19+*.swp
20+*.patch
21+aclocal.m4
22+config.h
23+config.log
24+config.sub
25+config.guess
26+config.status
27+configure
28+depcomp
29+install-sh
30+compile
31+main
32+ltmain.sh
33+missing
34+mkinstalldirs
35+libtool
36+*Makefile
37+py-compile
38+stamp-h1
39+src/.libs
40+docs/html
41+libimobiledevice-1.0.pc
42+dev/.libs/*
43+dev/afccheck
44+dev/ideviceclient
45+dev/idevicesyslog
46+dev/lckd-client
47+dev/msyncclient
48+dev/ideviceenterrecovery
49+tools/.libs/*
50+tools/idevice_id
51+tools/ideviceinfo
52+tools/idevicesyslog
53+tools/idevicebackup
54+tools/ideviceimagemounter
55+tools/idevicescreenshot
56+tools/idevicebackup2
57+tools/idevicedate
58+tools/idevicedebugserverproxy
59+tools/idevicediagnostics
60+tools/ideviceenterrecovery
61+tools/idevicename
62+tools/idevicepair
63+tools/ideviceprovision
64+cython/.libs/*
65+cython/*.c
66+doxygen.cfg
67
68=== removed directory '.pc/01-libs.private.patch'
69=== removed file '.pc/01-libs.private.patch/libimobiledevice-1.0.pc.in'
70--- .pc/01-libs.private.patch/libimobiledevice-1.0.pc.in 2012-07-29 11:31:31 +0000
71+++ .pc/01-libs.private.patch/libimobiledevice-1.0.pc.in 1970-01-01 00:00:00 +0000
72@@ -1,12 +0,0 @@
73-prefix=@prefix@
74-exec_prefix=@exec_prefix@
75-libdir=@libdir@
76-includedir=@includedir@
77-
78-Name: libimobiledevice
79-Description: A library to communicate with services running on Apple iPhone/iPod Touch devices.
80-Version: @VERSION@
81-Requires: libplist >= 0.12 libusbmuxd >= 0.1.0 @ssl_requires@
82-Libs: -L${libdir} -limobiledevice
83-Cflags: -I${includedir}
84-
85
86=== removed directory '.pc/02-fix-link-errors.patch'
87=== removed directory '.pc/02-fix-link-errors.patch/src'
88=== removed file '.pc/02-fix-link-errors.patch/src/Makefile.am'
89--- .pc/02-fix-link-errors.patch/src/Makefile.am 2013-10-28 23:01:08 +0000
90+++ .pc/02-fix-link-errors.patch/src/Makefile.am 1970-01-01 00:00:00 +0000
91@@ -1,35 +0,0 @@
92-AM_CPPFLAGS = -I$(top_srcdir)/include
93-
94-AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusbmuxd_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS) $(openssl_CFLAGS)
95-AM_LDFLAGS = $(libgnutls_LIBS) $(libtasn1_LIBS) $(libplist_LIBS) $(libusbmuxd_LIBS) $(libgcrypt_LIBS) ${libpthread_LIBS} $(openssl_LIBS)
96-
97-lib_LTLIBRARIES = libimobiledevice.la
98-libimobiledevice_la_LIBADD =
99-libimobiledevice_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBIMOBILEDEVICE_SO_VERSION) -no-undefined
100-libimobiledevice_la_SOURCES = idevice.c idevice.h \
101- debug.c debug.h\
102- userpref.c userpref.h\
103- service.c service.h\
104- property_list_service.c property_list_service.h\
105- device_link_service.c device_link_service.h\
106- lockdown.c lockdown.h\
107- afc.c afc.h\
108- file_relay.c file_relay.h\
109- notification_proxy.c notification_proxy.h\
110- installation_proxy.c installation_proxy.h\
111- sbservices.c sbservices.h\
112- mobile_image_mounter.c mobile_image_mounter.h\
113- screenshotr.c screenshotr.h\
114- mobilesync.c mobilesync.h\
115- mobilebackup.c mobilebackup.h\
116- house_arrest.c house_arrest.h\
117- mobilebackup2.c mobilebackup2.h\
118- misagent.c misagent.h\
119- restore.c restore.h\
120- diagnostics_relay.c diagnostics_relay.h\
121- heartbeat.c heartbeat.h\
122- webinspector.c webinspector.h
123-
124-if WIN32
125-libimobiledevice_la_LIBADD += -lole32
126-endif
127
128=== removed directory '.pc/02-fix-link-errors.patch/tools'
129=== removed file '.pc/02-fix-link-errors.patch/tools/Makefile.am'
130--- .pc/02-fix-link-errors.patch/tools/Makefile.am 2013-10-28 23:01:08 +0000
131+++ .pc/02-fix-link-errors.patch/tools/Makefile.am 1970-01-01 00:00:00 +0000
132@@ -1,73 +0,0 @@
133-AM_CPPFLAGS = -I$(top_srcdir)/include
134-
135-AM_CFLAGS = $(GLOBAL_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(openssl_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS)
136-AM_LDFLAGS = $(libgnutls_LIBS) $(libtasn1_LIBS) $(openssl_LIBS) $(libplist_LIBS)
137-
138-bin_PROGRAMS = idevice_id ideviceinfo idevicepair idevicesyslog ideviceimagemounter idevicescreenshot ideviceenterrecovery idevicedate idevicebackup idevicebackup2 ideviceprovision idevicedebugserverproxy idevicediagnostics
139-
140-ideviceinfo_SOURCES = ideviceinfo.c
141-ideviceinfo_CFLAGS = $(AM_CFLAGS)
142-ideviceinfo_LDFLAGS = $(AM_LDFLAGS)
143-ideviceinfo_LDADD = ../src/libimobiledevice.la
144-
145-idevicepair_SOURCES = idevicepair.c
146-idevicepair_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/src
147-idevicepair_LDFLAGS = $(AM_LDFLAGS)
148-idevicepair_LDADD = ../src/libimobiledevice.la
149-
150-idevicesyslog_SOURCES = idevicesyslog.c
151-idevicesyslog_CFLAGS = $(AM_CFLAGS)
152-idevicesyslog_LDFLAGS = $(AM_LDFLAGS)
153-idevicesyslog_LDADD = ../src/libimobiledevice.la
154-
155-idevice_id_SOURCES = idevice_id.c
156-idevice_id_CFLAGS = $(AM_CFLAGS)
157-idevice_id_LDFLAGS = $(AM_LDFLAGS)
158-idevice_id_LDADD = ../src/libimobiledevice.la
159-
160-idevicebackup_SOURCES = idevicebackup.c
161-idevicebackup_CFLAGS = $(AM_CFLAGS)
162-idevicebackup_LDFLAGS = $(AM_LDFLAGS)
163-idevicebackup_LDADD = ../src/libimobiledevice.la
164-
165-idevicebackup2_SOURCES = idevicebackup2.c
166-idevicebackup2_CFLAGS = $(AM_CFLAGS)
167-idevicebackup2_LDFLAGS = $(AM_LDFLAGS)
168-idevicebackup2_LDADD = ../src/libimobiledevice.la
169-
170-ideviceimagemounter_SOURCES = ideviceimagemounter.c
171-ideviceimagemounter_CFLAGS = $(AM_CFLAGS)
172-ideviceimagemounter_LDFLAGS = $(AM_LDFLAGS)
173-ideviceimagemounter_LDADD = ../src/libimobiledevice.la
174-
175-idevicescreenshot_SOURCES = idevicescreenshot.c
176-idevicescreenshot_CFLAGS = $(AM_CFLAGS)
177-idevicescreenshot_LDFLAGS = $(AM_LDFLAGS)
178-idevicescreenshot_LDADD = ../src/libimobiledevice.la
179-
180-ideviceenterrecovery_SOURCES = ideviceenterrecovery.c
181-ideviceenterrecovery_CFLAGS = $(AM_CFLAGS)
182-ideviceenterrecovery_LDFLAGS = $(AM_LDFLAGS)
183-ideviceenterrecovery_LDADD = ../src/libimobiledevice.la
184-
185-idevicedate_SOURCES = idevicedate.c
186-idevicedate_CFLAGS = $(AM_CFLAGS)
187-idevicedate_LDFLAGS = $(AM_LDFLAGS)
188-idevicedate_LDADD = ../src/libimobiledevice.la
189-
190-ideviceprovision_SOURCES = ideviceprovision.c
191-ideviceprovision_CFLAGS = $(AM_CFLAGS)
192-ideviceprovision_LDFLAGS = $(AM_LDFLAGS)
193-ideviceprovision_LDADD = ../src/libimobiledevice.la
194-
195-idevicedebugserverproxy_SOURCES = idevicedebugserverproxy.c socket.c thread.c
196-idevicedebugserverproxy_CFLAGS = $(AM_CFLAGS)
197-idevicedebugserverproxy_LDFLAGS = $(AM_LDFLAGS)
198-idevicedebugserverproxy_LDADD = ../src/libimobiledevice.la
199-
200-idevicediagnostics_SOURCES = idevicediagnostics.c
201-idevicediagnostics_CFLAGS = $(AM_CFLAGS)
202-idevicediagnostics_LDFLAGS = $(AM_LDFLAGS)
203-idevicediagnostics_LDADD = ../src/libimobiledevice.la
204-
205-EXTRA_DIST = socket.h thread.h
206
207=== removed directory '.pc/09_use_python_config.patch'
208=== removed directory '.pc/09_use_python_config.patch/m4'
209=== removed file '.pc/09_use_python_config.patch/m4/ac_python_devel.m4'
210--- .pc/09_use_python_config.patch/m4/ac_python_devel.m4 2013-01-19 06:11:28 +0000
211+++ .pc/09_use_python_config.patch/m4/ac_python_devel.m4 1970-01-01 00:00:00 +0000
212@@ -1,265 +0,0 @@
213-# ===========================================================================
214-# http://autoconf-archive.cryp.to/ac_python_devel.html
215-# ===========================================================================
216-#
217-# SYNOPSIS
218-#
219-# AC_PYTHON_DEVEL([version])
220-#
221-# DESCRIPTION
222-#
223-# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
224-# in your configure.ac.
225-#
226-# This macro checks for Python and tries to get the include path to
227-# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS)
228-# output variables. It also exports $(PYTHON_EXTRA_LIBS) and
229-# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
230-#
231-# You can search for some particular version of Python by passing a
232-# parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
233-# note that you *have* to pass also an operator along with the version to
234-# match, and pay special attention to the single quotes surrounding the
235-# version number. Don't use "PYTHON_VERSION" for this: that environment
236-# variable is declared as precious and thus reserved for the end-user.
237-#
238-# This macro should work for all versions of Python >= 2.1.0. As an end
239-# user, you can disable the check for the python version by setting the
240-# PYTHON_NOVERSIONCHECK environment variable to something else than the
241-# empty string.
242-#
243-# If you need to use this macro for an older Python version, please
244-# contact the authors. We're always open for feedback.
245-#
246-# LAST MODIFICATION
247-#
248-# 2008-04-12
249-#
250-# COPYLEFT
251-#
252-# Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
253-# Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
254-# Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
255-# Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
256-# Copyright (c) 2008 Matteo Settenvini <matteo@member.fsf.org>
257-# Copyright (c) 2008 Horst Knorr <hk_classes@knoda.org>
258-#
259-# This program is free software: you can redistribute it and/or modify it
260-# under the terms of the GNU General Public License as published by the
261-# Free Software Foundation, either version 3 of the License, or (at your
262-# option) any later version.
263-#
264-# This program is distributed in the hope that it will be useful, but
265-# WITHOUT ANY WARRANTY; without even the implied warranty of
266-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
267-# Public License for more details.
268-#
269-# You should have received a copy of the GNU General Public License along
270-# with this program. If not, see <http://www.gnu.org/licenses/>.
271-#
272-# As a special exception, the respective Autoconf Macro's copyright owner
273-# gives unlimited permission to copy, distribute and modify the configure
274-# scripts that are the output of Autoconf when processing the Macro. You
275-# need not follow the terms of the GNU General Public License when using
276-# or distributing such scripts, even though portions of the text of the
277-# Macro appear in them. The GNU General Public License (GPL) does govern
278-# all other use of the material that constitutes the Autoconf Macro.
279-#
280-# This special exception to the GPL applies to versions of the Autoconf
281-# Macro released by the Autoconf Macro Archive. When you make and
282-# distribute a modified version of the Autoconf Macro, you may extend this
283-# special exception to the GPL to apply to your modified version as well.
284-
285-AC_DEFUN([AC_PYTHON_DEVEL],[
286- #
287- # Allow the use of a (user set) custom python version
288- #
289- AC_ARG_VAR([PYTHON_VERSION],[The installed Python
290- version to use, for example '2.3'. This string
291- will be appended to the Python interpreter
292- canonical name.])
293-
294- AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
295- if test -z "$PYTHON"; then
296- AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
297- PYTHON_VERSION=""
298- fi
299-
300- #
301- # Check for a version of Python >= 2.1.0
302- #
303- AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
304- ac_supports_python_ver=`$PYTHON -c "import sys, string; \
305- ver = string.split(sys.version)[[0]]; \
306- print ver >= '2.1.0'"`
307- if test "$ac_supports_python_ver" != "True"; then
308- if test -z "$PYTHON_NOVERSIONCHECK"; then
309- AC_MSG_RESULT([no])
310- AC_MSG_FAILURE([
311-This version of the AC@&t@_PYTHON_DEVEL macro
312-doesn't work properly with versions of Python before
313-2.1.0. You may need to re-run configure, setting the
314-variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
315-PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
316-Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
317-to something else than an empty string.
318-])
319- else
320- AC_MSG_RESULT([skip at user request])
321- fi
322- else
323- AC_MSG_RESULT([yes])
324- fi
325-
326- #
327- # if the macro parameter ``version'' is set, honour it
328- #
329- if test -n "$1"; then
330- AC_MSG_CHECKING([for a version of Python $1])
331- ac_supports_python_ver=`$PYTHON -c "import sys, string; \
332- ver = string.split(sys.version)[[0]]; \
333- print ver $1"`
334- if test "$ac_supports_python_ver" = "True"; then
335- AC_MSG_RESULT([yes])
336- else
337- AC_MSG_RESULT([no])
338- AC_MSG_ERROR([this package requires Python $1.
339-If you have it installed, but it isn't the default Python
340-interpreter in your system path, please pass the PYTHON_VERSION
341-variable to configure. See ``configure --help'' for reference.
342-])
343- PYTHON_VERSION=""
344- fi
345- fi
346-
347- #
348- # Check if you have distutils, else fail
349- #
350- AC_MSG_CHECKING([for the distutils Python package])
351- ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
352- if test -z "$ac_distutils_result"; then
353- AC_MSG_RESULT([yes])
354- else
355- AC_MSG_RESULT([no])
356- AC_MSG_ERROR([cannot import Python module "distutils".
357-Please check your Python installation. The error was:
358-$ac_distutils_result])
359- PYTHON_VERSION=""
360- fi
361-
362- #
363- # Check for Python include path
364- #
365- AC_MSG_CHECKING([for Python include path])
366- if test -z "$PYTHON_CPPFLAGS"; then
367- python_path=`$PYTHON -c "import distutils.sysconfig; \
368- print distutils.sysconfig.get_python_inc();"`
369- if test -n "${python_path}"; then
370- python_path="-I$python_path"
371- fi
372- PYTHON_CPPFLAGS=$python_path
373- fi
374- AC_MSG_RESULT([$PYTHON_CPPFLAGS])
375- AC_SUBST([PYTHON_CPPFLAGS])
376-
377- #
378- # Check for Python library path
379- #
380- AC_MSG_CHECKING([for Python library path])
381- if test -z "$PYTHON_LDFLAGS"; then
382- # (makes two attempts to ensure we've got a version number
383- # from the interpreter)
384- py_version=`$PYTHON -c "from distutils.sysconfig import *; \
385- from string import join; \
386- print join(get_config_vars('VERSION'))"`
387- if test "$py_version" = "[None]"; then
388- if test -n "$PYTHON_VERSION"; then
389- py_version=$PYTHON_VERSION
390- else
391- py_version=`$PYTHON -c "import sys; \
392- print sys.version[[:3]]"`
393- fi
394- fi
395-
396- PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
397- from string import join; \
398- print '-L' + get_python_lib(0,1), \
399- '-lpython';"`$py_version
400- fi
401- AC_MSG_RESULT([$PYTHON_LDFLAGS])
402- AC_SUBST([PYTHON_LDFLAGS])
403-
404- #
405- # Check for site packages
406- #
407- AC_MSG_CHECKING([for Python site-packages path])
408- if test -z "$PYTHON_SITE_PKG"; then
409- PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
410- print distutils.sysconfig.get_python_lib(0,0);"`
411- fi
412- AC_MSG_RESULT([$PYTHON_SITE_PKG])
413- AC_SUBST([PYTHON_SITE_PKG])
414-
415- #
416- # libraries which must be linked in when embedding
417- #
418- AC_MSG_CHECKING(python extra libraries)
419- if test -z "$PYTHON_EXTRA_LIBS"; then
420- PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
421- conf = distutils.sysconfig.get_config_var; \
422- print conf('LOCALMODLIBS'), conf('LIBS')"`
423- fi
424- AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
425- AC_SUBST(PYTHON_EXTRA_LIBS)
426-
427- #
428- # linking flags needed when embedding
429- #
430- AC_MSG_CHECKING(python extra linking flags)
431- if test -z "$PYTHON_EXTRA_LDFLAGS"; then
432- PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
433- conf = distutils.sysconfig.get_config_var; \
434- print conf('LINKFORSHARED')"`
435- fi
436- AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
437- AC_SUBST(PYTHON_EXTRA_LDFLAGS)
438-
439- #
440- # final check to see if everything compiles alright
441- #
442- AC_MSG_CHECKING([consistency of all components of python development environment])
443- AC_LANG_PUSH([C])
444- # save current global flags
445- LIBS="$ac_save_LIBS $PYTHON_LDFLAGS"
446- CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
447- AC_TRY_LINK([
448- #include <Python.h>
449- ],[
450- Py_Initialize();
451- ],[pythonexists=yes],[pythonexists=no])
452-
453- AC_MSG_RESULT([$pythonexists])
454-
455- if test ! "$pythonexists" = "yes"; then
456- AC_MSG_ERROR([
457- Could not link test program to Python. Maybe the main Python library has been
458- installed in some non-standard library path. If so, pass it to configure,
459- via the LDFLAGS environment variable.
460- Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
461- ============================================================================
462- ERROR!
463- You probably have to install the development version of the Python package
464- for your distribution. The exact name of this package varies among them.
465- ============================================================================
466- ])
467- PYTHON_VERSION=""
468- fi
469- AC_LANG_POP
470- # turn back to default flags
471- CPPFLAGS="$ac_save_CPPFLAGS"
472- LIBS="$ac_save_LIBS"
473-
474- #
475- # all done!
476- #
477-])
478
479=== removed directory '.pc/CVE-2013-2142.patch'
480=== removed directory '.pc/CVE-2013-2142.patch/src'
481=== removed file '.pc/CVE-2013-2142.patch/src/Makefile.am'
482--- .pc/CVE-2013-2142.patch/src/Makefile.am 2013-10-28 23:01:08 +0000
483+++ .pc/CVE-2013-2142.patch/src/Makefile.am 1970-01-01 00:00:00 +0000
484@@ -1,35 +0,0 @@
485-AM_CPPFLAGS = -I$(top_srcdir)/include
486-
487-AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusbmuxd_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS) $(openssl_CFLAGS)
488-AM_LDFLAGS = $(libgnutls_LIBS) $(libtasn1_LIBS) $(libplist_LIBS) $(libusbmuxd_LIBS) $(libgcrypt_LIBS) ${libpthread_LIBS} $(openssl_LIBS) -pthread
489-
490-lib_LTLIBRARIES = libimobiledevice.la
491-libimobiledevice_la_LIBADD =
492-libimobiledevice_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBIMOBILEDEVICE_SO_VERSION) -no-undefined
493-libimobiledevice_la_SOURCES = idevice.c idevice.h \
494- debug.c debug.h\
495- userpref.c userpref.h\
496- service.c service.h\
497- property_list_service.c property_list_service.h\
498- device_link_service.c device_link_service.h\
499- lockdown.c lockdown.h\
500- afc.c afc.h\
501- file_relay.c file_relay.h\
502- notification_proxy.c notification_proxy.h\
503- installation_proxy.c installation_proxy.h\
504- sbservices.c sbservices.h\
505- mobile_image_mounter.c mobile_image_mounter.h\
506- screenshotr.c screenshotr.h\
507- mobilesync.c mobilesync.h\
508- mobilebackup.c mobilebackup.h\
509- house_arrest.c house_arrest.h\
510- mobilebackup2.c mobilebackup2.h\
511- misagent.c misagent.h\
512- restore.c restore.h\
513- diagnostics_relay.c diagnostics_relay.h\
514- heartbeat.c heartbeat.h\
515- webinspector.c webinspector.h
516-
517-if WIN32
518-libimobiledevice_la_LIBADD += -lole32
519-endif
520
521=== removed file '.pc/CVE-2013-2142.patch/src/userpref.c'
522--- .pc/CVE-2013-2142.patch/src/userpref.c 2013-08-14 12:43:31 +0000
523+++ .pc/CVE-2013-2142.patch/src/userpref.c 1970-01-01 00:00:00 +0000
524@@ -1,1161 +0,0 @@
525-/*
526- * userpref.c
527- * contains methods to access user specific certificates IDs and more.
528- *
529- * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
530- *
531- * This library is free software; you can redistribute it and/or
532- * modify it under the terms of the GNU Lesser General Public
533- * License as published by the Free Software Foundation; either
534- * version 2.1 of the License, or (at your option) any later version.
535- *
536- * This library is distributed in the hope that it will be useful,
537- * but WITHOUT ANY WARRANTY; without even the implied warranty of
538- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
539- * Lesser General Public License for more details.
540- *
541- * You should have received a copy of the GNU Lesser General Public
542- * License along with this library; if not, write to the Free Software
543- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
544- */
545-
546-#ifdef HAVE_CONFIG_H
547-#include <config.h>
548-#endif
549-#include <stdio.h>
550-#include <stdint.h>
551-#include <stdlib.h>
552-#include <string.h>
553-#ifdef HAVE_OPENSSL
554-#include <openssl/pem.h>
555-#include <openssl/rsa.h>
556-#include <openssl/x509.h>
557-#include <openssl/x509v3.h>
558-#else
559-#include <gnutls/gnutls.h>
560-#include <gnutls/x509.h>
561-#include <gcrypt.h>
562-#endif
563-
564-#include <dirent.h>
565-#include <libgen.h>
566-#include <sys/stat.h>
567-#include <errno.h>
568-
569-#ifdef WIN32
570-#include <shlobj.h>
571-#endif
572-
573-#include "userpref.h"
574-#include "debug.h"
575-
576-#define LIBIMOBILEDEVICE_CONF_DIR "libimobiledevice"
577-#define LIBIMOBILEDEVICE_CONF_FILE "libimobiledevicerc"
578-
579-#define LIBIMOBILEDEVICE_ROOT_PRIVKEY "RootPrivateKey.pem"
580-#define LIBIMOBILEDEVICE_HOST_PRIVKEY "HostPrivateKey.pem"
581-#define LIBIMOBILEDEVICE_ROOT_CERTIF "RootCertificate.pem"
582-#define LIBIMOBILEDEVICE_HOST_CERTIF "HostCertificate.pem"
583-
584-#ifdef WIN32
585-#define DIR_SEP '\\'
586-#define DIR_SEP_S "\\"
587-#else
588-#define DIR_SEP '/'
589-#define DIR_SEP_S "/"
590-#endif
591-
592-static char __config_dir[512] = {0, };
593-
594-#ifdef WIN32
595-static char *userpref_utf16_to_utf8(wchar_t *unistr, long len, long *items_read, long *items_written)
596-{
597- if (!unistr || (len <= 0)) return NULL;
598- char *outbuf = (char*)malloc(3*(len+1));
599- int p = 0;
600- int i = 0;
601-
602- wchar_t wc;
603-
604- while (i < len) {
605- wc = unistr[i++];
606- if (wc >= 0x800) {
607- outbuf[p++] = (char)(0xE0 + ((wc >> 12) & 0xF));
608- outbuf[p++] = (char)(0x80 + ((wc >> 6) & 0x3F));
609- outbuf[p++] = (char)(0x80 + (wc & 0x3F));
610- } else if (wc >= 0x80) {
611- outbuf[p++] = (char)(0xC0 + ((wc >> 6) & 0x1F));
612- outbuf[p++] = (char)(0x80 + (wc & 0x3F));
613- } else {
614- outbuf[p++] = (char)(wc & 0x7F);
615- }
616- }
617- if (items_read) {
618- *items_read = i;
619- }
620- if (items_written) {
621- *items_written = p;
622- }
623- outbuf[p] = 0;
624-
625- return outbuf;
626-}
627-#endif
628-
629-static const char *userpref_get_tmp_dir()
630-{
631- const char *cdir = getenv("TMPDIR");
632- if (cdir && cdir[0])
633- return cdir;
634- cdir = getenv("TMP");
635- if (cdir && cdir[0])
636- return cdir;
637- cdir = getenv("TEMP");
638- if (cdir && cdir[0])
639- return cdir;
640- return "/tmp";
641-}
642-
643-static const char *userpref_get_config_dir()
644-{
645- if (__config_dir[0]) return __config_dir;
646-#ifdef WIN32
647- wchar_t path[MAX_PATH+1];
648- HRESULT hr;
649- LPITEMIDLIST pidl = NULL;
650- BOOL b = FALSE;
651-
652- hr = SHGetSpecialFolderLocation (NULL, CSIDL_LOCAL_APPDATA, &pidl);
653- if (hr == S_OK) {
654- b = SHGetPathFromIDListW (pidl, path);
655- if (b) {
656- char *cdir = userpref_utf16_to_utf8 (path, wcslen(path), NULL, NULL);
657- strcpy(__config_dir, cdir);
658- free(cdir);
659- CoTaskMemFree (pidl);
660- }
661- }
662-#else
663- const char *cdir = getenv("XDG_CONFIG_HOME");
664- if (!cdir) {
665- cdir = getenv("HOME");
666- if (!cdir || !cdir[0]) {
667- const char *tdir = userpref_get_tmp_dir();
668- strcpy(__config_dir, tdir);
669- strcat(__config_dir, DIR_SEP_S);
670- strcat(__config_dir, "root");
671- } else {
672- strcpy(__config_dir, cdir);
673- }
674- strcat(__config_dir, DIR_SEP_S);
675- strcat(__config_dir, ".config");
676- } else {
677- strcpy(__config_dir, cdir);
678- }
679-#endif
680- strcat(__config_dir, DIR_SEP_S);
681- strcat(__config_dir, LIBIMOBILEDEVICE_CONF_DIR);
682-
683- int i = strlen(__config_dir)-1;
684- while ((i > 0) && (__config_dir[i] == DIR_SEP)) {
685- __config_dir[i--] = '\0';
686- }
687-
688- return __config_dir;
689-}
690-
691-static int __mkdir(const char *dir, int mode)
692-{
693-#ifdef WIN32
694- return mkdir(dir);
695-#else
696- return mkdir(dir, mode);
697-#endif
698-}
699-
700-static int mkdir_with_parents(const char *dir, int mode)
701-{
702- if (!dir) return -1;
703- if (__mkdir(dir, mode) == 0) {
704- return 0;
705- } else {
706- if (errno == EEXIST) return 0;
707- }
708- int res;
709- char *parent = strdup(dir);
710- parent = dirname(parent);
711- if (parent) {
712- res = mkdir_with_parents(parent, mode);
713- } else {
714- res = -1;
715- }
716- free(parent);
717- if (res == 0) {
718- mkdir_with_parents(dir, mode);
719- }
720- return res;
721-}
722-
723-static int config_write(const char *cfgfile, plist_t dict)
724-{
725- if (!cfgfile || !dict || (plist_get_node_type(dict) != PLIST_DICT)) {
726- return -1;
727- }
728- int res = -1;
729-
730-#if 1 // old style config
731- plist_t hostid = plist_dict_get_item(dict, "HostID");
732- if (hostid && (plist_get_node_type(hostid) == PLIST_STRING)) {
733- char *hostidstr = NULL;
734- plist_get_string_val(hostid, &hostidstr);
735- if (hostidstr) {
736- FILE *fd = fopen(cfgfile, "wb");
737- if (fd) {
738- fprintf(fd, "\n[Global]\nHostID=%s\n", hostidstr);
739- fclose(fd);
740- res = 0;
741- } else {
742- debug_info("could not open '%s' for writing: %s", cfgfile, strerror(errno));
743- }
744- free(hostidstr);
745- }
746- }
747-#endif
748-#if 0
749- char *xml = NULL;
750- uint32_t length = 0;
751-
752- plist_to_xml(dict, &xml, &length);
753- if (!xml) {
754- return res;
755- }
756-
757- FILE *fd = fopen(cfgfile, "wb");
758- if (!fd) {
759- free(xml);
760- return res;
761- }
762-
763- if (fwrite(xml, 1, length, fd) == length) {
764- res = 0;
765- } else {
766- fprintf(stderr, "%s: ERROR: failed to write configuration to '%s'\n", __func__, cfgfile);
767- }
768- fclose(fd);
769-
770- free(xml);
771-#endif
772- return res;
773-}
774-
775-static int config_read(const char *cfgfile, plist_t *dict)
776-{
777- if (!cfgfile || !dict) {
778- return -1;
779- }
780-
781- int res = -1;
782- FILE *fd = fopen(cfgfile, "rb");
783- if (!fd) {
784- debug_info("could not open '%s' for reading: %s", cfgfile, strerror(errno));
785- return -1;
786- }
787-
788- fseek(fd, 0, SEEK_END);
789- unsigned long int size = ftell(fd);
790- fseek(fd, 0, SEEK_SET);
791- unsigned char *contents = NULL;
792-
793- contents = malloc(size);
794- if (fread(contents, 1, size, fd) != size) {
795- free(contents);
796- fclose(fd);
797- return -1;
798- }
799- plist_t plist = NULL;
800-
801- if (!memcmp(contents, "bplist00", 8)) {
802- plist_from_bin((const char*)contents, (uint32_t)size, &plist);
803- fclose(fd);
804- } else {
805- if (memchr(contents, '<', size)) {
806- plist_from_xml((const char*)contents, (uint32_t)size, &plist);
807- }
808- if (plist) {
809- fclose(fd);
810- } else {
811- // try parsing old format config file
812- char line[256];
813- fseek(fd, 0, SEEK_SET);
814- while (fgets(line, 256, fd)) {
815- char *p = &line[0];
816- size_t llen = strlen(p)-1;
817- while ((llen > 0) && ((p[llen] == '\n') || (p[llen] == '\r'))) {
818- p[llen] = '\0';
819- llen--;
820- }
821- if (llen == 0) continue;
822- while ((p[0] == '\n') || (p[0] == '\r')) {
823- p++;
824- }
825- if (!strncmp(p, "HostID=", 7)) {
826- plist = plist_new_dict();
827- plist_dict_insert_item(plist, "HostID", plist_new_string(p+7));
828- break;
829- }
830- }
831- fclose(fd);
832-#if 0
833- if (plist) {
834- // write new format config
835- config_write(cfgfile, plist);
836- }
837-#endif
838- }
839- }
840- free(contents);
841- if (plist) {
842- *dict = plist;
843- res = 0;
844- }
845- return res;
846-}
847-
848-/**
849- * Creates a freedesktop compatible configuration directory.
850- */
851-static void userpref_create_config_dir(void)
852-{
853- const char *config_path = userpref_get_config_dir();
854- struct stat st;
855- if (stat(config_path, &st) != 0) {
856- mkdir_with_parents(config_path, 0755);
857- }
858-}
859-
860-static int get_rand(int min, int max)
861-{
862- int retval = (rand() % (max - min)) + min;
863- return retval;
864-}
865-
866-/**
867- * Generates a valid HostID (which is actually a UUID).
868- *
869- * @return A null terminated string containing a valid HostID.
870- */
871-static char *userpref_generate_host_id()
872-{
873- /* HostID's are just UUID's, and UUID's are 36 characters long */
874- char *hostid = (char *) malloc(sizeof(char) * 37);
875- const char *chars = "ABCDEF0123456789";
876- srand(time(NULL));
877- int i = 0;
878-
879- for (i = 0; i < 36; i++) {
880- if (i == 8 || i == 13 || i == 18 || i == 23) {
881- hostid[i] = '-';
882- continue;
883- } else {
884- hostid[i] = chars[get_rand(0, 16)];
885- }
886- }
887- /* make it a real string */
888- hostid[36] = '\0';
889- return hostid;
890-}
891-
892-/**
893- * Store HostID in config file.
894- *
895- * @param host_id A null terminated string containing a valid HostID.
896- */
897-static int userpref_set_host_id(const char *host_id)
898-{
899- const char *config_path;
900- char *config_file;
901-
902- if (!host_id)
903- return 0;
904-
905- /* Make sure config directory exists */
906- userpref_create_config_dir();
907-
908- config_path = userpref_get_config_dir();
909- config_file = (char*)malloc(strlen(config_path)+1+strlen(LIBIMOBILEDEVICE_CONF_FILE)+1);
910- strcpy(config_file, config_path);
911- strcat(config_file, DIR_SEP_S);
912- strcat(config_file, LIBIMOBILEDEVICE_CONF_FILE);
913-
914- /* Now parse file to get the HostID */
915- plist_t config = NULL;
916- config_read(config_file, &config);
917- if (!config) {
918- config = plist_new_dict();
919- plist_dict_insert_item(config, "HostID", plist_new_string(host_id));
920- } else {
921- plist_t n = plist_dict_get_item(config, "HostID");
922- if (n) {
923- plist_set_string_val(n, host_id);
924- } else {
925- plist_dict_insert_item(config, "HostID", plist_new_string(host_id));
926- }
927- }
928-
929- /* Store in config file */
930- debug_info("setting hostID to %s", host_id);
931-
932- config_write(config_file, config);
933- plist_free(config);
934-
935- free(config_file);
936- return 1;
937-}
938-
939-/**
940- * Reads the HostID from a previously generated configuration file.
941- *
942- * @note It is the responsibility of the calling function to free the returned host_id
943- *
944- * @return The string containing the HostID or NULL
945- */
946-void userpref_get_host_id(char **host_id)
947-{
948- const char *config_path;
949- char *config_file;
950-
951- config_path = userpref_get_config_dir();
952- config_file = (char*)malloc(strlen(config_path)+1+strlen(LIBIMOBILEDEVICE_CONF_FILE)+1);
953- strcpy(config_file, config_path);
954- strcat(config_file, DIR_SEP_S);
955- strcat(config_file, LIBIMOBILEDEVICE_CONF_FILE);
956-
957- /* now parse file to get the HostID */
958- plist_t config = NULL;
959- if (config_read(config_file, &config) == 0) {
960- plist_t n_host_id = plist_dict_get_item(config, "HostID");
961- if (n_host_id && (plist_get_node_type(n_host_id) == PLIST_STRING)) {
962- plist_get_string_val(n_host_id, host_id);
963- }
964- }
965- plist_free(config);
966- free(config_file);
967-
968- if (!*host_id) {
969- /* no config, generate host_id */
970- *host_id = userpref_generate_host_id();
971- userpref_set_host_id(*host_id);
972- }
973-
974- debug_info("Using %s as HostID", *host_id);
975-}
976-
977-/**
978- * Determines whether this device has been connected to this system before.
979- *
980- * @param udid The device UDID as given by the device.
981- *
982- * @return 1 if the device has been connected previously to this configuration
983- * or 0 otherwise.
984- */
985-int userpref_has_device_public_key(const char *udid)
986-{
987- int ret = 0;
988- const char *config_path;
989- char *config_file;
990- struct stat st;
991-
992- if (!udid) return 0;
993-
994- /* first get config file */
995- config_path = userpref_get_config_dir();
996- config_file = (char*)malloc(strlen(config_path)+1+strlen(udid)+4+1);
997- strcpy(config_file, config_path);
998- strcat(config_file, DIR_SEP_S);
999- strcat(config_file, udid);
1000- strcat(config_file, ".pem");
1001-
1002- if ((stat(config_file, &st) == 0) && S_ISREG(st.st_mode))
1003- ret = 1;
1004- free(config_file);
1005- return ret;
1006-}
1007-
1008-/**
1009- * Fills a list with UDIDs of devices that have been connected to this
1010- * system before, i.e. for which a public key file exists.
1011- *
1012- * @param list A pointer to a char** initially pointing to NULL that will
1013- * hold a newly allocated list of UDIDs upon successful return.
1014- * The caller is responsible for freeing the memory. Note that if
1015- * no public key file was found the list has to be freed too as it
1016- * points to a terminating NULL element.
1017- * @param count The number of UDIDs found. This parameter can be NULL if it
1018- * is not required.
1019- *
1020- * @return USERPREF_E_SUCCESS on success, or USERPREF_E_INVALID_ARG if the
1021- * list parameter is not pointing to NULL.
1022- */
1023-userpref_error_t userpref_get_paired_udids(char ***list, unsigned int *count)
1024-{
1025- struct slist_t {
1026- char *name;
1027- void *next;
1028- };
1029- DIR *config_dir;
1030- const char *config_path;
1031- struct slist_t *udids = NULL;
1032- unsigned int i;
1033- unsigned int found = 0;
1034-
1035- if (!list || (list && *list)) {
1036- debug_info("ERROR: The list parameter needs to point to NULL!");
1037- return USERPREF_E_INVALID_ARG;
1038- }
1039-
1040- if (count) {
1041- *count = 0;
1042- }
1043-
1044- config_path = userpref_get_config_dir();
1045- config_dir = opendir(config_path);
1046- if (config_dir) {
1047- struct dirent *entry;
1048- struct slist_t *listp = udids;
1049- while ((entry = readdir(config_dir))) {
1050- char *ext = strstr(entry->d_name, ".pem");
1051- if (ext && ((ext - entry->d_name) == 40) && (strlen(entry->d_name) == 44)) {
1052- struct slist_t *ne = (struct slist_t*)malloc(sizeof(struct slist_t));
1053- ne->name = (char*)malloc(41);
1054- strncpy(ne->name, entry->d_name, 40);
1055- ne->name[40] = 0;
1056- ne->next = NULL;
1057- if (!listp) {
1058- listp = ne;
1059- udids = listp;
1060- } else {
1061- listp->next = ne;
1062- listp = listp->next;
1063- }
1064- found++;
1065- }
1066- }
1067- closedir(config_dir);
1068- }
1069- *list = (char**)malloc(sizeof(char*) * (found+1));
1070- i = 0;
1071- while (udids) {
1072- (*list)[i++] = udids->name;
1073- struct slist_t *old = udids;
1074- udids = udids->next;
1075- free(old);
1076- }
1077- (*list)[i] = NULL;
1078-
1079- if (count) {
1080- *count = found;
1081- }
1082-
1083- return USERPREF_E_SUCCESS;
1084-}
1085-
1086-/**
1087- * Mark the device (as represented by the key) as having connected to this
1088- * configuration.
1089- *
1090- * @param udid The device UDID as given by the device
1091- * @param public_key The public key given by the device
1092- *
1093- * @return 1 on success and 0 if no public key is given or if it has already
1094- * been marked as connected previously.
1095- */
1096-userpref_error_t userpref_set_device_public_key(const char *udid, key_data_t public_key)
1097-{
1098- if (NULL == public_key.data)
1099- return USERPREF_E_INVALID_ARG;
1100-
1101- if (userpref_has_device_public_key(udid))
1102- return USERPREF_E_SUCCESS;
1103-
1104- /* ensure config directory exists */
1105- userpref_create_config_dir();
1106-
1107- /* build file path */
1108- const char *config_path = userpref_get_config_dir();
1109- char *pem = (char*)malloc(strlen(config_path)+1+strlen(udid)+4+1);
1110- strcpy(pem, config_path);
1111- strcat(pem, DIR_SEP_S);
1112- strcat(pem, udid);
1113- strcat(pem, ".pem");
1114-
1115- /* store file */
1116- FILE *pFile = fopen(pem, "wb");
1117- if (pFile) {
1118- fwrite(public_key.data, 1, public_key.size, pFile);
1119- fclose(pFile);
1120- } else {
1121- debug_info("could not open '%s' for writing: %s", pem, strerror(errno));
1122- }
1123- free(pem);
1124-
1125- return USERPREF_E_SUCCESS;
1126-}
1127-
1128-/**
1129- * Remove the public key stored for the device with udid from this host.
1130- *
1131- * @param udid The udid of the device
1132- *
1133- * @return USERPREF_E_SUCCESS on success.
1134- */
1135-userpref_error_t userpref_remove_device_public_key(const char *udid)
1136-{
1137- if (!userpref_has_device_public_key(udid))
1138- return USERPREF_E_SUCCESS;
1139-
1140- /* build file path */
1141- const char *config_path = userpref_get_config_dir();
1142- char *pem = (char*)malloc(strlen(config_path)+1+strlen(udid)+4+1);
1143- strcpy(pem, config_path);
1144- strcat(pem, DIR_SEP_S);
1145- strcat(pem, udid);
1146- strcat(pem, ".pem");
1147-
1148- /* remove file */
1149- remove(pem);
1150-
1151- free(pem);
1152-
1153- return USERPREF_E_SUCCESS;
1154-}
1155-
1156-/**
1157- * Private function which reads the given file into a key_data_t structure.
1158- *
1159- * @param file The filename of the file to read
1160- * @param data The pointer at which to store the data.
1161- *
1162- * @return 1 if the file contents where read successfully and 0 otherwise.
1163- */
1164-static int userpref_get_file_contents(const char *file, key_data_t * data)
1165-{
1166- int success = 0;
1167- unsigned long int size = 0;
1168- unsigned char *content = NULL;
1169- const char *config_path;
1170- char *filepath;
1171- FILE *fd;
1172-
1173- if (NULL == file || NULL == data)
1174- return 0;
1175-
1176- /* Read file */
1177- config_path = userpref_get_config_dir();
1178- filepath = (char*)malloc(strlen(config_path)+1+strlen(file)+1);
1179- strcpy(filepath, config_path);
1180- strcat(filepath, DIR_SEP_S);
1181- strcat(filepath, file);
1182-
1183- fd = fopen(filepath, "rb");
1184- if (fd) {
1185- fseek(fd, 0, SEEK_END);
1186- size = ftell(fd);
1187- fseek(fd, 0, SEEK_SET);
1188-
1189- // prevent huge files
1190- if (size > 0xFFFFFF) {
1191- fprintf(stderr, "%s: file is too big (> 16MB). Refusing to read the contents to memory!", __func__);
1192- } else {
1193- size_t p = 0;
1194- content = (unsigned char*)malloc(size);
1195- while (!feof(fd)) {
1196- p += fread(content+p, 1, size-p, fd);
1197- if (ferror(fd) != 0) {
1198- break;
1199- }
1200- if (p >= size) {
1201- success = 1;
1202- break;
1203- }
1204- }
1205- }
1206- fclose(fd);
1207- }
1208-
1209- free(filepath);
1210-
1211- /* Add it to the key_data_t structure */
1212- if (success) {
1213- data->data = (uint8_t*) content;
1214- data->size = size;
1215- }
1216-
1217- return success;
1218-}
1219-
1220-/**
1221- * Private function which generate private keys and certificates.
1222- *
1223- * @return 1 if keys were successfully generated, 0 otherwise
1224- */
1225-static userpref_error_t userpref_gen_keys_and_cert(void)
1226-{
1227- userpref_error_t ret = USERPREF_E_SSL_ERROR;
1228-
1229- key_data_t root_key_pem = { NULL, 0 };
1230- key_data_t root_cert_pem = { NULL, 0 };
1231- key_data_t host_key_pem = { NULL, 0 };
1232- key_data_t host_cert_pem = { NULL, 0 };
1233-
1234- debug_info("Generating keys and certificates");
1235-#ifdef HAVE_OPENSSL
1236- RSA* root_keypair = RSA_generate_key(2048, 65537, NULL, NULL);
1237- RSA* host_keypair = RSA_generate_key(2048, 65537, NULL, NULL);
1238-
1239- EVP_PKEY* root_pkey = EVP_PKEY_new();
1240- EVP_PKEY_assign_RSA(root_pkey, root_keypair);
1241-
1242- EVP_PKEY* host_pkey = EVP_PKEY_new();
1243- EVP_PKEY_assign_RSA(host_pkey, host_keypair);
1244-
1245- /* generate root certificate */
1246- X509* root_cert = X509_new();
1247- {
1248- /* set serial number */
1249- ASN1_INTEGER* sn = ASN1_INTEGER_new();
1250- ASN1_INTEGER_set(sn, 0);
1251- X509_set_serialNumber(root_cert, sn);
1252- ASN1_INTEGER_free(sn);
1253-
1254- /* set version */
1255- X509_set_version(root_cert, 2);
1256-
1257- /* set x509v3 basic constraints */
1258- X509_EXTENSION* ext;
1259- if (!(ext = X509V3_EXT_conf_nid(NULL, NULL, NID_basic_constraints, (char*)"critical,CA:TRUE"))) {
1260- debug_info("ERROR: X509V3_EXT_conf_nid failed");
1261- }
1262- X509_add_ext(root_cert, ext, -1);
1263-
1264- /* set key validity */
1265- ASN1_TIME* asn1time = ASN1_TIME_new();
1266- ASN1_TIME_set(asn1time, time(NULL));
1267- X509_set_notBefore(root_cert, asn1time);
1268- ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
1269- X509_set_notAfter(root_cert, asn1time);
1270- ASN1_TIME_free(asn1time);
1271-
1272- /* use root public key for root cert */
1273- X509_set_pubkey(root_cert, root_pkey);
1274- /* sign root cert with root private key */
1275- X509_sign(root_cert, root_pkey, EVP_sha1());
1276- }
1277-
1278- /* create host certificate */
1279- X509* host_cert = X509_new();
1280- {
1281- /* set serial number */
1282- ASN1_INTEGER* sn = ASN1_INTEGER_new();
1283- ASN1_INTEGER_set(sn, 0);
1284- X509_set_serialNumber(host_cert, sn);
1285- ASN1_INTEGER_free(sn);
1286-
1287- /* set version */
1288- X509_set_version(host_cert, 2);
1289-
1290- /* set x509v3 basic constraints */
1291- X509_EXTENSION* ext;
1292- if (!(ext = X509V3_EXT_conf_nid(NULL, NULL, NID_basic_constraints, (char*)"critical,CA:FALSE"))) {
1293- debug_info("ERROR: X509V3_EXT_conf_nid failed");
1294- }
1295- X509_add_ext(host_cert, ext, -1);
1296-
1297- /* set x509v3 key usage */
1298- if (!(ext = X509V3_EXT_conf_nid(NULL, NULL, NID_key_usage, (char*)"digitalSignature,keyEncipherment"))) {
1299- debug_info("ERROR: X509V3_EXT_conf_nid failed");
1300- }
1301- X509_add_ext(host_cert, ext, -1);
1302-
1303- /* set key validity */
1304- ASN1_TIME* asn1time = ASN1_TIME_new();
1305- ASN1_TIME_set(asn1time, time(NULL));
1306- X509_set_notBefore(host_cert, asn1time);
1307- ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
1308- X509_set_notAfter(host_cert, asn1time);
1309- ASN1_TIME_free(asn1time);
1310-
1311- /* use host public key for host cert */
1312- X509_set_pubkey(host_cert, host_pkey);
1313-
1314- /* sign host cert with root private key */
1315- X509_sign(host_cert, root_pkey, EVP_sha1());
1316- }
1317-
1318- if (root_cert && root_pkey && host_cert && host_pkey) {
1319- BIO* membp;
1320-
1321- membp = BIO_new(BIO_s_mem());
1322- if (PEM_write_bio_X509(membp, root_cert) > 0) {
1323- root_cert_pem.size = BIO_get_mem_data(membp, &root_cert_pem.data);
1324- }
1325- membp = BIO_new(BIO_s_mem());
1326- if (PEM_write_bio_PrivateKey(membp, root_pkey, NULL, NULL, 0, 0, NULL) > 0) {
1327- root_key_pem.size = BIO_get_mem_data(membp, &root_key_pem.data);
1328- }
1329- membp = BIO_new(BIO_s_mem());
1330- if (PEM_write_bio_X509(membp, host_cert) > 0) {
1331- host_cert_pem.size = BIO_get_mem_data(membp, &host_cert_pem.data);
1332- }
1333- membp = BIO_new(BIO_s_mem());
1334- if (PEM_write_bio_PrivateKey(membp, host_pkey, NULL, NULL, 0, 0, NULL) > 0) {
1335- host_key_pem.size = BIO_get_mem_data(membp, &host_key_pem.data);
1336- }
1337- }
1338-
1339- EVP_PKEY_free(root_pkey);
1340- EVP_PKEY_free(host_pkey);
1341-
1342- X509_free(host_cert);
1343- X509_free(root_cert);
1344-#else
1345- gnutls_x509_privkey_t root_privkey;
1346- gnutls_x509_crt_t root_cert;
1347- gnutls_x509_privkey_t host_privkey;
1348- gnutls_x509_crt_t host_cert;
1349-
1350- gnutls_global_deinit();
1351- gnutls_global_init();
1352-
1353- //use less secure random to speed up key generation
1354- gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM);
1355-
1356- gnutls_x509_privkey_init(&root_privkey);
1357- gnutls_x509_privkey_init(&host_privkey);
1358-
1359- gnutls_x509_crt_init(&root_cert);
1360- gnutls_x509_crt_init(&host_cert);
1361-
1362- /* generate root key */
1363- gnutls_x509_privkey_generate(root_privkey, GNUTLS_PK_RSA, 2048, 0);
1364- gnutls_x509_privkey_generate(host_privkey, GNUTLS_PK_RSA, 2048, 0);
1365-
1366- /* generate certificates */
1367- gnutls_x509_crt_set_key(root_cert, root_privkey);
1368- gnutls_x509_crt_set_serial(root_cert, "\x00", 1);
1369- gnutls_x509_crt_set_version(root_cert, 3);
1370- gnutls_x509_crt_set_ca_status(root_cert, 1);
1371- gnutls_x509_crt_set_activation_time(root_cert, time(NULL));
1372- gnutls_x509_crt_set_expiration_time(root_cert, time(NULL) + (60 * 60 * 24 * 365 * 10));
1373- gnutls_x509_crt_sign(root_cert, root_cert, root_privkey);
1374-
1375- gnutls_x509_crt_set_key(host_cert, host_privkey);
1376- gnutls_x509_crt_set_serial(host_cert, "\x00", 1);
1377- gnutls_x509_crt_set_version(host_cert, 3);
1378- gnutls_x509_crt_set_ca_status(host_cert, 0);
1379- gnutls_x509_crt_set_key_usage(host_cert, GNUTLS_KEY_KEY_ENCIPHERMENT | GNUTLS_KEY_DIGITAL_SIGNATURE);
1380- gnutls_x509_crt_set_activation_time(host_cert, time(NULL));
1381- gnutls_x509_crt_set_expiration_time(host_cert, time(NULL) + (60 * 60 * 24 * 365 * 10));
1382- gnutls_x509_crt_sign(host_cert, root_cert, root_privkey);
1383-
1384- /* export to PEM format */
1385- size_t root_key_export_size = 0;
1386- size_t host_key_export_size = 0;
1387-
1388- gnutls_x509_privkey_export(root_privkey, GNUTLS_X509_FMT_PEM, NULL, &root_key_export_size);
1389- gnutls_x509_privkey_export(host_privkey, GNUTLS_X509_FMT_PEM, NULL, &host_key_export_size);
1390-
1391- root_key_pem.data = gnutls_malloc(root_key_export_size);
1392- host_key_pem.data = gnutls_malloc(host_key_export_size);
1393-
1394- gnutls_x509_privkey_export(root_privkey, GNUTLS_X509_FMT_PEM, root_key_pem.data, &root_key_export_size);
1395- root_key_pem.size = root_key_export_size;
1396- gnutls_x509_privkey_export(host_privkey, GNUTLS_X509_FMT_PEM, host_key_pem.data, &host_key_export_size);
1397- host_key_pem.size = host_key_export_size;
1398-
1399- size_t root_cert_export_size = 0;
1400- size_t host_cert_export_size = 0;
1401-
1402- gnutls_x509_crt_export(root_cert, GNUTLS_X509_FMT_PEM, NULL, &root_cert_export_size);
1403- gnutls_x509_crt_export(host_cert, GNUTLS_X509_FMT_PEM, NULL, &host_cert_export_size);
1404-
1405- root_cert_pem.data = gnutls_malloc(root_cert_export_size);
1406- host_cert_pem.data = gnutls_malloc(host_cert_export_size);
1407-
1408- gnutls_x509_crt_export(root_cert, GNUTLS_X509_FMT_PEM, root_cert_pem.data, &root_cert_export_size);
1409- root_cert_pem.size = root_cert_export_size;
1410- gnutls_x509_crt_export(host_cert, GNUTLS_X509_FMT_PEM, host_cert_pem.data, &host_cert_export_size);
1411- host_cert_pem.size = host_cert_export_size;
1412-
1413- //restore gnutls env
1414- gnutls_global_deinit();
1415- gnutls_global_init();
1416-#endif
1417- if (NULL != root_cert_pem.data && 0 != root_cert_pem.size &&
1418- NULL != host_cert_pem.data && 0 != host_cert_pem.size)
1419- ret = USERPREF_E_SUCCESS;
1420-
1421- /* store values in config file */
1422- userpref_set_keys_and_certs( &root_key_pem, &root_cert_pem, &host_key_pem, &host_cert_pem);
1423-
1424- if (root_key_pem.data)
1425- free(root_key_pem.data);
1426- if (root_cert_pem.data)
1427- free(root_cert_pem.data);
1428- if (host_key_pem.data)
1429- free(host_key_pem.data);
1430- if (host_cert_pem.data)
1431- free(host_cert_pem.data);
1432-
1433- return ret;
1434-}
1435-
1436-/**
1437- * Private function which import the given key into a gnutls structure.
1438- *
1439- * @param key_name The filename of the private key to import.
1440- * @param key the gnutls key structure.
1441- *
1442- * @return 1 if the key was successfully imported.
1443- */
1444-#ifdef HAVE_OPENSSL
1445-static userpref_error_t userpref_import_key(const char* key_name, key_data_t* key)
1446-#else
1447-static userpref_error_t userpref_import_key(const char* key_name, gnutls_x509_privkey_t key)
1448-#endif
1449-{
1450-#ifdef HAVE_OPENSSL
1451- if (!key)
1452- return USERPREF_E_SUCCESS;
1453-#endif
1454- userpref_error_t ret = USERPREF_E_INVALID_CONF;
1455- key_data_t pem_key = { NULL, 0 };
1456- if (userpref_get_file_contents(key_name, &pem_key)) {
1457-#ifdef HAVE_OPENSSL
1458- key->data = (unsigned char*)malloc(pem_key.size);
1459- memcpy(key->data, pem_key.data, pem_key.size);
1460- key->size = pem_key.size;
1461- ret = USERPREF_E_SUCCESS;
1462-#else
1463- if (GNUTLS_E_SUCCESS == gnutls_x509_privkey_import(key, &pem_key, GNUTLS_X509_FMT_PEM))
1464- ret = USERPREF_E_SUCCESS;
1465- else
1466- ret = USERPREF_E_SSL_ERROR;
1467-#endif
1468- }
1469- if (pem_key.data)
1470- free(pem_key.data);
1471- return ret;
1472-}
1473-
1474-/**
1475- * Private function which import the given certificate into a gnutls structure.
1476- *
1477- * @param crt_name The filename of the certificate to import.
1478- * @param cert the gnutls certificate structure.
1479- *
1480- * @return IDEVICE_E_SUCCESS if the certificate was successfully imported.
1481- */
1482-#ifdef HAVE_OPENSSL
1483-static userpref_error_t userpref_import_crt(const char* crt_name, key_data_t* cert)
1484-#else
1485-static userpref_error_t userpref_import_crt(const char* crt_name, gnutls_x509_crt_t cert)
1486-#endif
1487-{
1488-#ifdef HAVE_OPENSSL
1489- if (!cert)
1490- return USERPREF_E_SUCCESS;
1491-#endif
1492- userpref_error_t ret = USERPREF_E_INVALID_CONF;
1493- key_data_t pem_cert = { NULL, 0 };
1494-
1495- if (userpref_get_file_contents(crt_name, &pem_cert)) {
1496-#ifdef HAVE_OPENSSL
1497- cert->data = (unsigned char*)malloc(pem_cert.size);
1498- memcpy(cert->data, pem_cert.data, pem_cert.size);
1499- cert->size = pem_cert.size;
1500- ret = USERPREF_E_SUCCESS;
1501-#else
1502- if (GNUTLS_E_SUCCESS == gnutls_x509_crt_import(cert, &pem_cert, GNUTLS_X509_FMT_PEM))
1503- ret = USERPREF_E_SUCCESS;
1504- else
1505- ret = USERPREF_E_SSL_ERROR;
1506-#endif
1507- }
1508- if (pem_cert.data)
1509- free(pem_cert.data);
1510- return ret;
1511-}
1512-
1513-/**
1514- * Function to retrieve host keys and certificates.
1515- * This function trigger key generation if they do not exists yet or are invalid.
1516- *
1517- * @note This function can take few seconds to complete (typically 5 seconds)
1518- *
1519- * @param root_privkey The root private key.
1520- * @param root_crt The root certificate.
1521- * @param host_privkey The host private key.
1522- * @param host_crt The host certificate.
1523- *
1524- * @return 1 if the keys and certificates were successfully retrieved, 0 otherwise
1525- */
1526-#ifdef HAVE_OPENSSL
1527-userpref_error_t userpref_get_keys_and_certs(key_data_t* root_privkey, key_data_t* root_crt, key_data_t* host_privkey, key_data_t* host_crt)
1528-#else
1529-userpref_error_t userpref_get_keys_and_certs(gnutls_x509_privkey_t root_privkey, gnutls_x509_crt_t root_crt, gnutls_x509_privkey_t host_privkey, gnutls_x509_crt_t host_crt)
1530-#endif
1531-{
1532- userpref_error_t ret = USERPREF_E_SUCCESS;
1533-
1534- if (ret == USERPREF_E_SUCCESS)
1535- ret = userpref_import_key(LIBIMOBILEDEVICE_ROOT_PRIVKEY, root_privkey);
1536-
1537- if (ret == USERPREF_E_SUCCESS)
1538- ret = userpref_import_key(LIBIMOBILEDEVICE_HOST_PRIVKEY, host_privkey);
1539-
1540- if (ret == USERPREF_E_SUCCESS)
1541- ret = userpref_import_crt(LIBIMOBILEDEVICE_ROOT_CERTIF, root_crt);
1542-
1543- if (ret == USERPREF_E_SUCCESS)
1544- ret = userpref_import_crt(LIBIMOBILEDEVICE_HOST_CERTIF, host_crt);
1545-
1546- if (USERPREF_E_SUCCESS != ret) {
1547- //we had problem reading or importing root cert
1548- //try with a new ones.
1549- ret = userpref_gen_keys_and_cert();
1550-
1551- if (ret == USERPREF_E_SUCCESS)
1552- ret = userpref_import_key(LIBIMOBILEDEVICE_ROOT_PRIVKEY, root_privkey);
1553-
1554- if (ret == USERPREF_E_SUCCESS)
1555- ret = userpref_import_key(LIBIMOBILEDEVICE_HOST_PRIVKEY, host_privkey);
1556-
1557- if (ret == USERPREF_E_SUCCESS)
1558- ret = userpref_import_crt(LIBIMOBILEDEVICE_ROOT_CERTIF, root_crt);
1559-
1560- if (ret == USERPREF_E_SUCCESS)
1561- ret = userpref_import_crt(LIBIMOBILEDEVICE_HOST_CERTIF, host_crt);
1562- }
1563-
1564- return ret;
1565-}
1566-
1567-/**
1568- * Function to retrieve certificates encoded in PEM format.
1569- *
1570- * @param pem_root_cert The root certificate.
1571- * @param pem_host_cert The host certificate.
1572- *
1573- * @return 1 if the certificates were successfully retrieved, 0 otherwise
1574- */
1575-userpref_error_t userpref_get_certs_as_pem(key_data_t *pem_root_cert, key_data_t *pem_host_cert)
1576-{
1577- if (!pem_root_cert || !pem_host_cert)
1578- return USERPREF_E_INVALID_ARG;
1579-
1580- if (userpref_get_file_contents(LIBIMOBILEDEVICE_ROOT_CERTIF, pem_root_cert) && userpref_get_file_contents(LIBIMOBILEDEVICE_HOST_CERTIF, pem_host_cert))
1581- return USERPREF_E_SUCCESS;
1582- else {
1583- if (pem_root_cert->data) {
1584- free(pem_root_cert->data);
1585- pem_root_cert->size = 0;
1586- }
1587- if (pem_host_cert->data) {
1588- free(pem_host_cert->data);
1589- pem_host_cert->size = 0;
1590- }
1591- }
1592- debug_info("configuration invalid");
1593- return USERPREF_E_INVALID_CONF;
1594-}
1595-
1596-/**
1597- * Create and save a configuration file containing the given data.
1598- *
1599- * @note: All fields must specified and be non-null
1600- *
1601- * @param root_key The root key
1602- * @param root_cert The root certificate
1603- * @param host_key The host key
1604- * @param host_cert The host certificate
1605- *
1606- * @return 1 on success and 0 otherwise.
1607- */
1608-userpref_error_t userpref_set_keys_and_certs(key_data_t * root_key, key_data_t * root_cert, key_data_t * host_key, key_data_t * host_cert)
1609-{
1610- FILE *pFile;
1611- char *pem;
1612- const char *config_path;
1613- userpref_error_t ret = USERPREF_E_SUCCESS;
1614-
1615- debug_info("saving keys and certs");
1616-
1617- if (!root_key || !host_key || !root_cert || !host_cert) {
1618- debug_info("missing key or cert (root_key=%p, host_key=%p, root=cert=%p, host_cert=%p", root_key, host_key, root_cert, host_cert);
1619- return USERPREF_E_INVALID_ARG;
1620- }
1621-
1622- /* Make sure config directory exists */
1623- userpref_create_config_dir();
1624-
1625- config_path = userpref_get_config_dir();
1626-
1627- /* Now write keys and certificates to disk */
1628- pem = (char*)malloc(strlen(config_path)+1+strlen(LIBIMOBILEDEVICE_ROOT_PRIVKEY)+1);
1629- strcpy(pem, config_path);
1630- strcat(pem, DIR_SEP_S);
1631- strcat(pem, LIBIMOBILEDEVICE_ROOT_PRIVKEY);
1632- pFile = fopen(pem, "wb");
1633- if (pFile) {
1634- fwrite(root_key->data, 1, root_key->size, pFile);
1635- fclose(pFile);
1636- } else {
1637- debug_info("could not open '%s' for writing: %s", pem, strerror(errno));
1638- ret = USERPREF_E_WRITE_ERROR;
1639- }
1640- free(pem);
1641-
1642- pem = (char*)malloc(strlen(config_path)+1+strlen(LIBIMOBILEDEVICE_HOST_PRIVKEY)+1);
1643- strcpy(pem, config_path);
1644- strcat(pem, DIR_SEP_S);
1645- strcat(pem, LIBIMOBILEDEVICE_HOST_PRIVKEY);
1646- pFile = fopen(pem, "wb");
1647- if (pFile) {
1648- fwrite(host_key->data, 1, host_key->size, pFile);
1649- fclose(pFile);
1650- } else {
1651- debug_info("could not open '%s' for writing: %s", pem, strerror(errno));
1652- ret = USERPREF_E_WRITE_ERROR;
1653- }
1654- free(pem);
1655-
1656- pem = (char*)malloc(strlen(config_path)+1+strlen(LIBIMOBILEDEVICE_ROOT_CERTIF)+1);
1657- strcpy(pem, config_path);
1658- strcat(pem, DIR_SEP_S);
1659- strcat(pem, LIBIMOBILEDEVICE_ROOT_CERTIF);
1660- pFile = fopen(pem, "wb");
1661- if (pFile) {
1662- fwrite(root_cert->data, 1, root_cert->size, pFile);
1663- fclose(pFile);
1664- } else {
1665- debug_info("could not open '%s' for writing: %s", pem, strerror(errno));
1666- ret = USERPREF_E_WRITE_ERROR;
1667- }
1668- free(pem);
1669-
1670- pem = (char*)malloc(strlen(config_path)+1+strlen(LIBIMOBILEDEVICE_HOST_CERTIF)+1);
1671- strcpy(pem, config_path);
1672- strcat(pem, DIR_SEP_S);
1673- strcat(pem, LIBIMOBILEDEVICE_HOST_CERTIF);
1674- pFile = fopen(pem, "wb");
1675- if (pFile) {
1676- fwrite(host_cert->data, 1, host_cert->size, pFile);
1677- fclose(pFile);
1678- } else {
1679- debug_info("could not open '%s' for writing: %s", pem, strerror(errno));
1680- ret = USERPREF_E_WRITE_ERROR;
1681- }
1682- free(pem);
1683-
1684- return ret;
1685-}
1686
1687=== removed file '.pc/CVE-2013-2142.patch/src/utils.c'
1688=== removed file '.pc/CVE-2013-2142.patch/src/utils.h'
1689=== removed file '.pc/applied-patches'
1690--- .pc/applied-patches 2013-10-28 23:01:08 +0000
1691+++ .pc/applied-patches 1970-01-01 00:00:00 +0000
1692@@ -1,5 +0,0 @@
1693-01-libs.private.patch
1694-02-fix-link-errors.patch
1695-CVE-2013-2142.patch
1696-09_use_python_config.patch
1697-git_explicitly_cast_ssl_enabled.patch
1698
1699=== removed directory '.pc/git_explicitly_cast_ssl_enabled.patch'
1700=== removed directory '.pc/git_explicitly_cast_ssl_enabled.patch/cython'
1701=== removed file '.pc/git_explicitly_cast_ssl_enabled.patch/cython/lockdown.pxi'
1702--- .pc/git_explicitly_cast_ssl_enabled.patch/cython/lockdown.pxi 2013-07-31 15:34:39 +0000
1703+++ .pc/git_explicitly_cast_ssl_enabled.patch/cython/lockdown.pxi 1970-01-01 00:00:00 +0000
1704@@ -1,297 +0,0 @@
1705-cdef extern from "libimobiledevice/lockdown.h":
1706- ctypedef enum lockdownd_error_t:
1707- LOCKDOWN_E_SUCCESS = 0
1708- LOCKDOWN_E_INVALID_ARG = -1
1709- LOCKDOWN_E_INVALID_CONF = -2
1710- LOCKDOWN_E_PLIST_ERROR = -3
1711- LOCKDOWN_E_PAIRING_FAILED = -4
1712- LOCKDOWN_E_SSL_ERROR = -5
1713- LOCKDOWN_E_DICT_ERROR = -6
1714- LOCKDOWN_E_START_SERVICE_FAILED = -7
1715- LOCKDOWN_E_NOT_ENOUGH_DATA = -8
1716- LOCKDOWN_E_SET_VALUE_PROHIBITED = -9
1717- LOCKDOWN_E_GET_VALUE_PROHIBITED = -10
1718- LOCKDOWN_E_REMOVE_VALUE_PROHIBITED = -11
1719- LOCKDOWN_E_MUX_ERROR = -12
1720- LOCKDOWN_E_ACTIVATION_FAILED = -13
1721- LOCKDOWN_E_PASSWORD_PROTECTED = -14
1722- LOCKDOWN_E_NO_RUNNING_SESSION = -15
1723- LOCKDOWN_E_INVALID_HOST_ID = -16
1724- LOCKDOWN_E_INVALID_SERVICE = -17
1725- LOCKDOWN_E_INVALID_ACTIVATION_RECORD = -18
1726- LOCKDOWN_E_UNKNOWN_ERROR = -256
1727-
1728- lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, char *label)
1729- lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, char *label)
1730- lockdownd_error_t lockdownd_client_free(lockdownd_client_t client)
1731-
1732- lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **tp)
1733- lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, char *domain, char *key, plist.plist_t *value)
1734- lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, char *domain, char *key, plist.plist_t value)
1735- lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, char *domain, char *key)
1736- lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, char *identifier, lockdownd_service_descriptor_t *service)
1737- lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, char *host_id, char **session_id, int *ssl_enabled)
1738- lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, char *session_id)
1739- lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist.plist_t plist)
1740- lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist.plist_t *plist)
1741- lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record)
1742- lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record)
1743- lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record)
1744- lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist.plist_t activation_record)
1745- lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client)
1746- lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client)
1747- lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client)
1748- lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count)
1749- lockdownd_error_t lockdownd_data_classes_free(char **classes)
1750- lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor_t service)
1751-
1752-cdef class LockdownError(BaseError):
1753- def __init__(self, *args, **kwargs):
1754- self._lookup_table = {
1755- LOCKDOWN_E_SUCCESS: "Success",
1756- LOCKDOWN_E_INVALID_ARG: "Invalid argument",
1757- LOCKDOWN_E_INVALID_CONF: "Invalid configuration",
1758- LOCKDOWN_E_PLIST_ERROR: "Property list error",
1759- LOCKDOWN_E_PAIRING_FAILED: "Pairing failed",
1760- LOCKDOWN_E_SSL_ERROR: "SSL error",
1761- LOCKDOWN_E_DICT_ERROR: "Dict error",
1762- LOCKDOWN_E_START_SERVICE_FAILED: "Start service failed",
1763- LOCKDOWN_E_NOT_ENOUGH_DATA: "Not enough data",
1764- LOCKDOWN_E_SET_VALUE_PROHIBITED: "Set value prohibited",
1765- LOCKDOWN_E_GET_VALUE_PROHIBITED: "Get value prohibited",
1766- LOCKDOWN_E_REMOVE_VALUE_PROHIBITED: "Remove value prohibited",
1767- LOCKDOWN_E_MUX_ERROR: "MUX Error",
1768- LOCKDOWN_E_ACTIVATION_FAILED: "Activation failed",
1769- LOCKDOWN_E_PASSWORD_PROTECTED: "Password protected",
1770- LOCKDOWN_E_NO_RUNNING_SESSION: "No running session",
1771- LOCKDOWN_E_INVALID_HOST_ID: "Invalid host ID",
1772- LOCKDOWN_E_INVALID_SERVICE: "Invalid service",
1773- LOCKDOWN_E_INVALID_ACTIVATION_RECORD: "Invalid activation record",
1774- LOCKDOWN_E_UNKNOWN_ERROR: "Unknown error"
1775- }
1776- BaseError.__init__(self, *args, **kwargs)
1777-
1778-cdef class LockdownPairRecord:
1779- #def __cinit__(self, bytes device_certificate, bytes host_certificate, bytes host_id, bytes root_certificate, *args, **kwargs):
1780- property device_certificate:
1781- def __get__(self):
1782- cdef bytes result = self._c_record.device_certificate
1783- return result
1784- property host_certificate:
1785- def __get__(self):
1786- cdef bytes result = self._c_record.host_certificate
1787- return result
1788- property host_id:
1789- def __get__(self):
1790- cdef bytes result = self._c_record.host_id
1791- return result
1792- property root_certificate:
1793- def __get__(self):
1794- cdef bytes result = self._c_record.root_certificate
1795- return result
1796-
1797-cdef class LockdownServiceDescriptor:
1798- #def __cinit__(self, uint16_t port, uint8_t ssl_enabled, *args, **kwargs):
1799- def __dealloc__(self):
1800- cdef lockdownd_error_t err
1801- if self._c_service_descriptor is not NULL:
1802- err = lockdownd_service_descriptor_free(self._c_service_descriptor)
1803- self._c_service_descriptor = NULL
1804- self.handle_error(err)
1805- property port:
1806- def __get__(self):
1807- return self._c_service_descriptor.port
1808- property ssl_enabled:
1809- def __get__(self):
1810- return self._c_service_descriptor.ssl_enabled
1811-
1812-cdef class LockdownClient(PropertyListService):
1813- def __cinit__(self, iDevice device not None, bytes label=b'', bint handshake=True, *args, **kwargs):
1814- cdef:
1815- lockdownd_error_t err
1816- char* c_label = NULL
1817- if label:
1818- c_label = label
1819- if handshake:
1820- err = lockdownd_client_new_with_handshake(device._c_dev, &self._c_client, c_label)
1821- else:
1822- err = lockdownd_client_new(device._c_dev, &self._c_client, c_label)
1823- self.handle_error(err)
1824-
1825- self.device = device
1826-
1827- def __dealloc__(self):
1828- cdef lockdownd_error_t err
1829- if self._c_client is not NULL:
1830- err = lockdownd_client_free(self._c_client)
1831- self.handle_error(err)
1832-
1833- cpdef bytes query_type(self):
1834- cdef:
1835- lockdownd_error_t err
1836- char* c_type = NULL
1837- bytes result
1838- err = lockdownd_query_type(self._c_client, &c_type)
1839- try:
1840- self.handle_error(err)
1841- result = c_type
1842-
1843- return result
1844- except BaseError, e:
1845- raise
1846- finally:
1847- if c_type != NULL:
1848- free(c_type)
1849-
1850- cpdef plist.Node get_value(self, bytes domain=None, bytes key=None):
1851- cdef:
1852- lockdownd_error_t err
1853- plist.plist_t c_node = NULL
1854- char* c_domain = NULL
1855- char* c_key = NULL
1856- if domain is not None:
1857- c_domain = domain
1858- if key is not None:
1859- c_key = key
1860-
1861- err = lockdownd_get_value(self._c_client, c_domain, c_key, &c_node)
1862-
1863- try:
1864- self.handle_error(err)
1865-
1866- return plist.plist_t_to_node(c_node)
1867- except BaseError, e:
1868- if c_node != NULL:
1869- plist.plist_free(c_node)
1870- raise
1871-
1872- cpdef set_value(self, bytes domain, bytes key, object value):
1873- cdef plist.plist_t c_node = plist.native_to_plist_t(value)
1874- try:
1875- self.handle_error(lockdownd_set_value(self._c_client, domain, key, c_node))
1876- except BaseError, e:
1877- raise
1878- finally:
1879- if c_node != NULL:
1880- plist.plist_free(c_node)
1881-
1882- cpdef remove_value(self, bytes domain, bytes key):
1883- self.handle_error(lockdownd_remove_value(self._c_client, domain, key))
1884-
1885- cpdef object start_service(self, object service):
1886- cdef:
1887- char* c_service_name = NULL
1888- lockdownd_service_descriptor_t c_descriptor = NULL
1889- LockdownServiceDescriptor result
1890-
1891- if issubclass(service, BaseService) and \
1892- service.__service_name__ is not None \
1893- and isinstance(service.__service_name__, basestring):
1894- c_service_name = <bytes>service.__service_name__
1895- elif isinstance(service, basestring):
1896- c_service_name = <bytes>service
1897- else:
1898- raise TypeError("LockdownClient.start_service() takes a BaseService or string as its first argument")
1899-
1900- try:
1901- self.handle_error(lockdownd_start_service(self._c_client, c_service_name, &c_descriptor))
1902-
1903- result = LockdownServiceDescriptor.__new__(LockdownServiceDescriptor)
1904- result._c_service_descriptor = c_descriptor
1905-
1906- return result
1907- except BaseError, e:
1908- raise
1909-
1910- cpdef object get_service_client(self, object service_class):
1911- cdef:
1912- LockdownServiceDescriptor descriptor
1913-
1914- if not hasattr(service_class, '__service_name__') and \
1915- not service_class.__service_name__ is not None \
1916- and not isinstance(service_class.__service_name__, basestring):
1917- raise TypeError("LockdownClient.get_service_client() takes a BaseService as its first argument")
1918-
1919- descriptor = self.start_service(service_class)
1920- return service_class(self.device, descriptor)
1921-
1922- cpdef tuple start_session(self, bytes host_id):
1923- cdef:
1924- lockdownd_error_t err
1925- char* c_session_id = NULL
1926- bint ssl_enabled
1927- bytes session_id
1928- err = lockdownd_start_session(self._c_client, host_id, &c_session_id, &ssl_enabled)
1929- try:
1930- self.handle_error(err)
1931-
1932- session_id = c_session_id
1933- return (session_id, ssl_enabled)
1934- except BaseError, e:
1935- raise
1936- finally:
1937- if c_session_id != NULL:
1938- free(c_session_id)
1939-
1940- cpdef stop_session(self, bytes session_id):
1941- self.handle_error(lockdownd_stop_session(self._c_client, session_id))
1942-
1943- cpdef pair(self, object pair_record=None):
1944- cdef lockdownd_pair_record_t c_pair_record = NULL
1945- if pair_record is not None:
1946- c_pair_record = (<LockdownPairRecord>pair_record)._c_record
1947- self.handle_error(lockdownd_pair(self._c_client, c_pair_record))
1948-
1949- cpdef validate_pair(self, object pair_record=None):
1950- cdef lockdownd_pair_record_t c_pair_record = NULL
1951- if pair_record is not None:
1952- c_pair_record = (<LockdownPairRecord>pair_record)._c_record
1953- self.handle_error(lockdownd_validate_pair(self._c_client, c_pair_record))
1954-
1955- cpdef unpair(self, object pair_record=None):
1956- cdef lockdownd_pair_record_t c_pair_record = NULL
1957- if pair_record is not None:
1958- c_pair_record = (<LockdownPairRecord>pair_record)._c_record
1959- self.handle_error(lockdownd_unpair(self._c_client, c_pair_record))
1960-
1961- cpdef activate(self, plist.Node activation_record):
1962- self.handle_error(lockdownd_activate(self._c_client, activation_record._c_node))
1963-
1964- cpdef deactivate(self):
1965- self.handle_error(lockdownd_deactivate(self._c_client))
1966-
1967- cpdef enter_recovery(self):
1968- self.handle_error(lockdownd_enter_recovery(self._c_client))
1969-
1970- cpdef goodbye(self):
1971- self.handle_error(lockdownd_goodbye(self._c_client))
1972-
1973- cpdef list get_sync_data_classes(self):
1974- cdef:
1975- char **classes = NULL
1976- int count = 0
1977- list result = []
1978- bytes data_class
1979-
1980- try:
1981- self.handle_error(lockdownd_get_sync_data_classes(self._c_client, &classes, &count))
1982-
1983- for i from 0 <= i < count:
1984- data_class = classes[i]
1985- result.append(data_class)
1986-
1987- return result
1988- except Exception, e:
1989- raise
1990- finally:
1991- if classes != NULL:
1992- lockdownd_data_classes_free(classes)
1993-
1994- cdef inline int16_t _send(self, plist.plist_t node):
1995- return lockdownd_send(self._c_client, node)
1996-
1997- cdef inline int16_t _receive(self, plist.plist_t* node):
1998- return lockdownd_receive(self._c_client, node)
1999-
2000- cdef inline BaseError _error(self, int16_t ret):
2001- return LockdownError(ret)
2002
2003=== modified file 'Makefile.am'
2004--- Makefile.am 2012-07-29 11:31:31 +0000
2005+++ Makefile.am 2014-03-14 06:45:31 +0000
2006@@ -1,6 +1,6 @@
2007 AUTOMAKE_OPTIONS = foreign
2008 ACLOCAL_AMFLAGS = -I m4
2009-SUBDIRS = src include $(CYTHON_SUB) $(DEV_SUB) tools docs
2010+SUBDIRS = common src include $(CYTHON_SUB) $(DEV_SUB) tools docs
2011
2012 DISTCHECK_CONFIGURE_FLAGS = --enable-dev-tools
2013
2014
2015=== removed file 'Makefile.in'
2016--- Makefile.in 2013-10-28 23:01:08 +0000
2017+++ Makefile.in 1970-01-01 00:00:00 +0000
2018@@ -1,918 +0,0 @@
2019-# Makefile.in generated by automake 1.12.1 from Makefile.am.
2020-# @configure_input@
2021-
2022-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
2023-
2024-# This Makefile.in is free software; the Free Software Foundation
2025-# gives unlimited permission to copy and/or distribute it,
2026-# with or without modifications, as long as this notice is preserved.
2027-
2028-# This program is distributed in the hope that it will be useful,
2029-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
2030-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
2031-# PARTICULAR PURPOSE.
2032-
2033-@SET_MAKE@
2034-
2035-VPATH = @srcdir@
2036-am__make_dryrun = \
2037- { \
2038- am__dry=no; \
2039- case $$MAKEFLAGS in \
2040- *\\[\ \ ]*) \
2041- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
2042- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
2043- *) \
2044- for am__flg in $$MAKEFLAGS; do \
2045- case $$am__flg in \
2046- *=*|--*) ;; \
2047- *n*) am__dry=yes; break;; \
2048- esac; \
2049- done;; \
2050- esac; \
2051- test $$am__dry = yes; \
2052- }
2053-pkgdatadir = $(datadir)/@PACKAGE@
2054-pkgincludedir = $(includedir)/@PACKAGE@
2055-pkglibdir = $(libdir)/@PACKAGE@
2056-pkglibexecdir = $(libexecdir)/@PACKAGE@
2057-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
2058-install_sh_DATA = $(install_sh) -c -m 644
2059-install_sh_PROGRAM = $(install_sh) -c
2060-install_sh_SCRIPT = $(install_sh) -c
2061-INSTALL_HEADER = $(INSTALL_DATA)
2062-transform = $(program_transform_name)
2063-NORMAL_INSTALL = :
2064-PRE_INSTALL = :
2065-POST_INSTALL = :
2066-NORMAL_UNINSTALL = :
2067-PRE_UNINSTALL = :
2068-POST_UNINSTALL = :
2069-build_triplet = @build@
2070-host_triplet = @host@
2071-subdir = .
2072-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
2073- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
2074- $(srcdir)/doxygen.cfg.in $(srcdir)/libimobiledevice-1.0.pc.in \
2075- $(top_srcdir)/configure AUTHORS COPYING COPYING.LESSER NEWS \
2076- compile config.guess config.sub depcomp install-sh ltmain.sh \
2077- missing
2078-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
2079-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_cython.m4 \
2080- $(top_srcdir)/m4/ac_python_devel.m4 \
2081- $(top_srcdir)/m4/as-compiler-flag.m4 \
2082- $(top_srcdir)/m4/cython_python.m4 $(top_srcdir)/m4/libtool.m4 \
2083- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
2084- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
2085- $(top_srcdir)/configure.ac
2086-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
2087- $(ACLOCAL_M4)
2088-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
2089- configure.lineno config.status.lineno
2090-mkinstalldirs = $(install_sh) -d
2091-CONFIG_HEADER = config.h
2092-CONFIG_CLEAN_FILES = libimobiledevice-1.0.pc doxygen.cfg
2093-CONFIG_CLEAN_VPATH_FILES =
2094-AM_V_GEN = $(am__v_GEN_@AM_V@)
2095-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
2096-am__v_GEN_0 = @echo " GEN " $@;
2097-AM_V_at = $(am__v_at_@AM_V@)
2098-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
2099-am__v_at_0 = @
2100-SOURCES =
2101-DIST_SOURCES =
2102-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
2103- html-recursive info-recursive install-data-recursive \
2104- install-dvi-recursive install-exec-recursive \
2105- install-html-recursive install-info-recursive \
2106- install-pdf-recursive install-ps-recursive install-recursive \
2107- installcheck-recursive installdirs-recursive pdf-recursive \
2108- ps-recursive uninstall-recursive
2109-am__can_run_installinfo = \
2110- case $$AM_UPDATE_INFO_DIR in \
2111- n|no|NO) false;; \
2112- *) (install-info --version) >/dev/null 2>&1;; \
2113- esac
2114-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
2115-am__vpath_adj = case $$p in \
2116- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
2117- *) f=$$p;; \
2118- esac;
2119-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
2120-am__install_max = 40
2121-am__nobase_strip_setup = \
2122- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
2123-am__nobase_strip = \
2124- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
2125-am__nobase_list = $(am__nobase_strip_setup); \
2126- for p in $$list; do echo "$$p $$p"; done | \
2127- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
2128- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
2129- if (++n[$$2] == $(am__install_max)) \
2130- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
2131- END { for (dir in files) print dir, files[dir] }'
2132-am__base_list = \
2133- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
2134- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
2135-am__uninstall_files_from_dir = { \
2136- test -z "$$files" \
2137- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
2138- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
2139- $(am__cd) "$$dir" && rm -f $$files; }; \
2140- }
2141-am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
2142-DATA = $(pkgconfig_DATA)
2143-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
2144- distclean-recursive maintainer-clean-recursive
2145-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
2146- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
2147- cscope distdir dist dist-all distcheck
2148-ETAGS = etags
2149-CTAGS = ctags
2150-CSCOPE = cscope
2151-DIST_SUBDIRS = $(SUBDIRS)
2152-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
2153-distdir = $(PACKAGE)-$(VERSION)
2154-top_distdir = $(distdir)
2155-am__remove_distdir = \
2156- if test -d "$(distdir)"; then \
2157- find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
2158- && rm -rf "$(distdir)" \
2159- || { sleep 5 && rm -rf "$(distdir)"; }; \
2160- else :; fi
2161-am__post_remove_distdir = $(am__remove_distdir)
2162-am__relativize = \
2163- dir0=`pwd`; \
2164- sed_first='s,^\([^/]*\)/.*$$,\1,'; \
2165- sed_rest='s,^[^/]*/*,,'; \
2166- sed_last='s,^.*/\([^/]*\)$$,\1,'; \
2167- sed_butlast='s,/*[^/]*$$,,'; \
2168- while test -n "$$dir1"; do \
2169- first=`echo "$$dir1" | sed -e "$$sed_first"`; \
2170- if test "$$first" != "."; then \
2171- if test "$$first" = ".."; then \
2172- dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
2173- dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
2174- else \
2175- first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
2176- if test "$$first2" = "$$first"; then \
2177- dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
2178- else \
2179- dir2="../$$dir2"; \
2180- fi; \
2181- dir0="$$dir0"/"$$first"; \
2182- fi; \
2183- fi; \
2184- dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
2185- done; \
2186- reldir="$$dir2"
2187-GZIP_ENV = --best
2188-DIST_ARCHIVES = $(distdir).tar.bz2
2189-DIST_TARGETS = dist-bzip2
2190-distuninstallcheck_listfiles = find . -type f -print
2191-am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
2192- | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
2193-distcleancheck_listfiles = find . -type f -print
2194-ACLOCAL = @ACLOCAL@
2195-AMTAR = @AMTAR@
2196-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
2197-AR = @AR@
2198-AUTOCONF = @AUTOCONF@
2199-AUTOHEADER = @AUTOHEADER@
2200-AUTOMAKE = @AUTOMAKE@
2201-AWK = @AWK@
2202-CC = @CC@
2203-CCDEPMODE = @CCDEPMODE@
2204-CFLAGS = @CFLAGS@
2205-CPP = @CPP@
2206-CPPFLAGS = @CPPFLAGS@
2207-CXX = @CXX@
2208-CXXCPP = @CXXCPP@
2209-CXXDEPMODE = @CXXDEPMODE@
2210-CXXFLAGS = @CXXFLAGS@
2211-CYGPATH_W = @CYGPATH_W@
2212-CYTHON = @CYTHON@
2213-CYTHON_LIB = @CYTHON_LIB@
2214-CYTHON_PLIST_INCLUDE_DIR = @CYTHON_PLIST_INCLUDE_DIR@
2215-CYTHON_PYTHON_CPPFLAGS = @CYTHON_PYTHON_CPPFLAGS@
2216-CYTHON_PYTHON_OPT = @CYTHON_PYTHON_OPT@
2217-CYTHON_SUB = @CYTHON_SUB@
2218-DEFS = @DEFS@
2219-DEPDIR = @DEPDIR@
2220-DEV_SUB = @DEV_SUB@
2221-DLLTOOL = @DLLTOOL@
2222-DSYMUTIL = @DSYMUTIL@
2223-DUMPBIN = @DUMPBIN@
2224-ECHO_C = @ECHO_C@
2225-ECHO_N = @ECHO_N@
2226-ECHO_T = @ECHO_T@
2227-EGREP = @EGREP@
2228-EXEEXT = @EXEEXT@
2229-FGREP = @FGREP@
2230-GLOBAL_CFLAGS = @GLOBAL_CFLAGS@
2231-GREP = @GREP@
2232-INSTALL = @INSTALL@
2233-INSTALL_DATA = @INSTALL_DATA@
2234-INSTALL_PROGRAM = @INSTALL_PROGRAM@
2235-INSTALL_SCRIPT = @INSTALL_SCRIPT@
2236-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
2237-LD = @LD@
2238-LDFLAGS = @LDFLAGS@
2239-LFS_CFLAGS = @LFS_CFLAGS@
2240-LIBIMOBILEDEVICE_SO_VERSION = @LIBIMOBILEDEVICE_SO_VERSION@
2241-LIBOBJS = @LIBOBJS@
2242-LIBS = @LIBS@
2243-LIBTOOL = @LIBTOOL@
2244-LIPO = @LIPO@
2245-LN_S = @LN_S@
2246-LTLIBOBJS = @LTLIBOBJS@
2247-MAKEINFO = @MAKEINFO@
2248-MANIFEST_TOOL = @MANIFEST_TOOL@
2249-MKDIR_P = @MKDIR_P@
2250-NM = @NM@
2251-NMEDIT = @NMEDIT@
2252-OBJDUMP = @OBJDUMP@
2253-OBJEXT = @OBJEXT@
2254-OTOOL = @OTOOL@
2255-OTOOL64 = @OTOOL64@
2256-PACKAGE = @PACKAGE@
2257-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
2258-PACKAGE_NAME = @PACKAGE_NAME@
2259-PACKAGE_STRING = @PACKAGE_STRING@
2260-PACKAGE_TARNAME = @PACKAGE_TARNAME@
2261-PACKAGE_URL = @PACKAGE_URL@
2262-PACKAGE_VERSION = @PACKAGE_VERSION@
2263-PATH_SEPARATOR = @PATH_SEPARATOR@
2264-PKG_CONFIG = @PKG_CONFIG@
2265-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
2266-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
2267-PYTHON = @PYTHON@
2268-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
2269-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
2270-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
2271-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
2272-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
2273-PYTHON_PLATFORM = @PYTHON_PLATFORM@
2274-PYTHON_PREFIX = @PYTHON_PREFIX@
2275-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
2276-PYTHON_VERSION = @PYTHON_VERSION@
2277-RANLIB = @RANLIB@
2278-SED = @SED@
2279-SET_MAKE = @SET_MAKE@
2280-SHELL = @SHELL@
2281-STRIP = @STRIP@
2282-VERSION = @VERSION@
2283-WINDRES = @WINDRES@
2284-abs_builddir = @abs_builddir@
2285-abs_srcdir = @abs_srcdir@
2286-abs_top_builddir = @abs_top_builddir@
2287-abs_top_srcdir = @abs_top_srcdir@
2288-ac_ct_AR = @ac_ct_AR@
2289-ac_ct_CC = @ac_ct_CC@
2290-ac_ct_CXX = @ac_ct_CXX@
2291-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
2292-am__include = @am__include@
2293-am__leading_dot = @am__leading_dot@
2294-am__quote = @am__quote@
2295-am__tar = @am__tar@
2296-am__untar = @am__untar@
2297-bindir = @bindir@
2298-build = @build@
2299-build_alias = @build_alias@
2300-build_cpu = @build_cpu@
2301-build_os = @build_os@
2302-build_vendor = @build_vendor@
2303-builddir = @builddir@
2304-datadir = @datadir@
2305-datarootdir = @datarootdir@
2306-docdir = @docdir@
2307-dvidir = @dvidir@
2308-exec_prefix = @exec_prefix@
2309-host = @host@
2310-host_alias = @host_alias@
2311-host_cpu = @host_cpu@
2312-host_os = @host_os@
2313-host_vendor = @host_vendor@
2314-htmldir = @htmldir@
2315-includedir = @includedir@
2316-infodir = @infodir@
2317-install_sh = @install_sh@
2318-libdir = @libdir@
2319-libexecdir = @libexecdir@
2320-libgcrypt_LIBS = @libgcrypt_LIBS@
2321-libgnutls_CFLAGS = @libgnutls_CFLAGS@
2322-libgnutls_LIBS = @libgnutls_LIBS@
2323-libplist_CFLAGS = @libplist_CFLAGS@
2324-libplist_LIBS = @libplist_LIBS@
2325-libplistmm_CFLAGS = @libplistmm_CFLAGS@
2326-libplistmm_LIBS = @libplistmm_LIBS@
2327-libpthread_LIBS = @libpthread_LIBS@
2328-libtasn1_CFLAGS = @libtasn1_CFLAGS@
2329-libtasn1_LIBS = @libtasn1_LIBS@
2330-libusbmuxd_CFLAGS = @libusbmuxd_CFLAGS@
2331-libusbmuxd_LIBS = @libusbmuxd_LIBS@
2332-localedir = @localedir@
2333-localstatedir = @localstatedir@
2334-mandir = @mandir@
2335-mkdir_p = @mkdir_p@
2336-oldincludedir = @oldincludedir@
2337-openssl_CFLAGS = @openssl_CFLAGS@
2338-openssl_LIBS = @openssl_LIBS@
2339-pdfdir = @pdfdir@
2340-pkgpyexecdir = @pkgpyexecdir@
2341-pkgpythondir = @pkgpythondir@
2342-prefix = @prefix@
2343-program_transform_name = @program_transform_name@
2344-psdir = @psdir@
2345-pyexecdir = @pyexecdir@
2346-pythondir = @pythondir@
2347-sbindir = @sbindir@
2348-sharedstatedir = @sharedstatedir@
2349-srcdir = @srcdir@
2350-ssl_requires = @ssl_requires@
2351-sysconfdir = @sysconfdir@
2352-target_alias = @target_alias@
2353-top_build_prefix = @top_build_prefix@
2354-top_builddir = @top_builddir@
2355-top_srcdir = @top_srcdir@
2356-AUTOMAKE_OPTIONS = foreign
2357-ACLOCAL_AMFLAGS = -I m4
2358-SUBDIRS = src include $(CYTHON_SUB) $(DEV_SUB) tools docs
2359-DISTCHECK_CONFIGURE_FLAGS = --enable-dev-tools
2360-pkgconfigdir = $(libdir)/pkgconfig
2361-pkgconfig_DATA = libimobiledevice-1.0.pc
2362-EXTRA_DIST = docs
2363-all: config.h
2364- $(MAKE) $(AM_MAKEFLAGS) all-recursive
2365-
2366-.SUFFIXES:
2367-am--refresh: Makefile
2368- @:
2369-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
2370- @for dep in $?; do \
2371- case '$(am__configure_deps)' in \
2372- *$$dep*) \
2373- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
2374- $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
2375- && exit 0; \
2376- exit 1;; \
2377- esac; \
2378- done; \
2379- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
2380- $(am__cd) $(top_srcdir) && \
2381- $(AUTOMAKE) --foreign Makefile
2382-.PRECIOUS: Makefile
2383-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
2384- @case '$?' in \
2385- *config.status*) \
2386- echo ' $(SHELL) ./config.status'; \
2387- $(SHELL) ./config.status;; \
2388- *) \
2389- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
2390- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
2391- esac;
2392-
2393-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
2394- $(SHELL) ./config.status --recheck
2395-
2396-$(top_srcdir)/configure: $(am__configure_deps)
2397- $(am__cd) $(srcdir) && $(AUTOCONF)
2398-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
2399- $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
2400-$(am__aclocal_m4_deps):
2401-
2402-config.h: stamp-h1
2403- @if test ! -f $@; then rm -f stamp-h1; else :; fi
2404- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
2405-
2406-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
2407- @rm -f stamp-h1
2408- cd $(top_builddir) && $(SHELL) ./config.status config.h
2409-$(srcdir)/config.h.in: $(am__configure_deps)
2410- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
2411- rm -f stamp-h1
2412- touch $@
2413-
2414-distclean-hdr:
2415- -rm -f config.h stamp-h1
2416-libimobiledevice-1.0.pc: $(top_builddir)/config.status $(srcdir)/libimobiledevice-1.0.pc.in
2417- cd $(top_builddir) && $(SHELL) ./config.status $@
2418-doxygen.cfg: $(top_builddir)/config.status $(srcdir)/doxygen.cfg.in
2419- cd $(top_builddir) && $(SHELL) ./config.status $@
2420-
2421-mostlyclean-libtool:
2422- -rm -f *.lo
2423-
2424-clean-libtool:
2425- -rm -rf .libs _libs
2426-
2427-distclean-libtool:
2428- -rm -f libtool config.lt
2429-install-pkgconfigDATA: $(pkgconfig_DATA)
2430- @$(NORMAL_INSTALL)
2431- @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
2432- if test -n "$$list"; then \
2433- echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
2434- $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
2435- fi; \
2436- for p in $$list; do \
2437- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
2438- echo "$$d$$p"; \
2439- done | $(am__base_list) | \
2440- while read files; do \
2441- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
2442- $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
2443- done
2444-
2445-uninstall-pkgconfigDATA:
2446- @$(NORMAL_UNINSTALL)
2447- @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
2448- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
2449- dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
2450-
2451-# This directory's subdirectories are mostly independent; you can cd
2452-# into them and run 'make' without going through this Makefile.
2453-# To change the values of 'make' variables: instead of editing Makefiles,
2454-# (1) if the variable is set in 'config.status', edit 'config.status'
2455-# (which will cause the Makefiles to be regenerated when you run 'make');
2456-# (2) otherwise, pass the desired values on the 'make' command line.
2457-$(RECURSIVE_TARGETS):
2458- @fail= failcom='exit 1'; \
2459- for f in x $$MAKEFLAGS; do \
2460- case $$f in \
2461- *=* | --[!k]*);; \
2462- *k*) failcom='fail=yes';; \
2463- esac; \
2464- done; \
2465- dot_seen=no; \
2466- target=`echo $@ | sed s/-recursive//`; \
2467- list='$(SUBDIRS)'; for subdir in $$list; do \
2468- echo "Making $$target in $$subdir"; \
2469- if test "$$subdir" = "."; then \
2470- dot_seen=yes; \
2471- local_target="$$target-am"; \
2472- else \
2473- local_target="$$target"; \
2474- fi; \
2475- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
2476- || eval $$failcom; \
2477- done; \
2478- if test "$$dot_seen" = "no"; then \
2479- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
2480- fi; test -z "$$fail"
2481-
2482-$(RECURSIVE_CLEAN_TARGETS):
2483- @fail= failcom='exit 1'; \
2484- for f in x $$MAKEFLAGS; do \
2485- case $$f in \
2486- *=* | --[!k]*);; \
2487- *k*) failcom='fail=yes';; \
2488- esac; \
2489- done; \
2490- dot_seen=no; \
2491- case "$@" in \
2492- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
2493- *) list='$(SUBDIRS)' ;; \
2494- esac; \
2495- rev=''; for subdir in $$list; do \
2496- if test "$$subdir" = "."; then :; else \
2497- rev="$$subdir $$rev"; \
2498- fi; \
2499- done; \
2500- rev="$$rev ."; \
2501- target=`echo $@ | sed s/-recursive//`; \
2502- for subdir in $$rev; do \
2503- echo "Making $$target in $$subdir"; \
2504- if test "$$subdir" = "."; then \
2505- local_target="$$target-am"; \
2506- else \
2507- local_target="$$target"; \
2508- fi; \
2509- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
2510- || eval $$failcom; \
2511- done && test -z "$$fail"
2512-tags-recursive:
2513- list='$(SUBDIRS)'; for subdir in $$list; do \
2514- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
2515- done
2516-ctags-recursive:
2517- list='$(SUBDIRS)'; for subdir in $$list; do \
2518- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
2519- done
2520-cscopelist-recursive:
2521- list='$(SUBDIRS)'; for subdir in $$list; do \
2522- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
2523- done
2524-
2525-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
2526- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
2527- unique=`for i in $$list; do \
2528- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
2529- done | \
2530- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
2531- END { if (nonempty) { for (i in files) print i; }; }'`; \
2532- mkid -fID $$unique
2533-tags: TAGS
2534-
2535-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
2536- $(TAGS_FILES) $(LISP)
2537- set x; \
2538- here=`pwd`; \
2539- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
2540- include_option=--etags-include; \
2541- empty_fix=.; \
2542- else \
2543- include_option=--include; \
2544- empty_fix=; \
2545- fi; \
2546- list='$(SUBDIRS)'; for subdir in $$list; do \
2547- if test "$$subdir" = .; then :; else \
2548- test ! -f $$subdir/TAGS || \
2549- set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
2550- fi; \
2551- done; \
2552- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
2553- unique=`for i in $$list; do \
2554- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
2555- done | \
2556- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
2557- END { if (nonempty) { for (i in files) print i; }; }'`; \
2558- shift; \
2559- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
2560- test -n "$$unique" || unique=$$empty_fix; \
2561- if test $$# -gt 0; then \
2562- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
2563- "$$@" $$unique; \
2564- else \
2565- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
2566- $$unique; \
2567- fi; \
2568- fi
2569-ctags: CTAGS
2570-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
2571- $(TAGS_FILES) $(LISP)
2572- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
2573- unique=`for i in $$list; do \
2574- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
2575- done | \
2576- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
2577- END { if (nonempty) { for (i in files) print i; }; }'`; \
2578- test -z "$(CTAGS_ARGS)$$unique" \
2579- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
2580- $$unique
2581-
2582-GTAGS:
2583- here=`$(am__cd) $(top_builddir) && pwd` \
2584- && $(am__cd) $(top_srcdir) \
2585- && gtags -i $(GTAGS_ARGS) "$$here"
2586-
2587-cscope: cscope.files
2588- test ! -s cscope.files \
2589- || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
2590-
2591-clean-cscope:
2592- -rm -f cscope.files
2593-
2594-cscope.files: clean-cscope cscopelist-recursive cscopelist
2595-
2596-cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
2597- list='$(SOURCES) $(HEADERS) $(LISP)'; \
2598- case "$(srcdir)" in \
2599- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
2600- *) sdir=$(subdir)/$(srcdir) ;; \
2601- esac; \
2602- for i in $$list; do \
2603- if test -f "$$i"; then \
2604- echo "$(subdir)/$$i"; \
2605- else \
2606- echo "$$sdir/$$i"; \
2607- fi; \
2608- done >> $(top_builddir)/cscope.files
2609-
2610-distclean-tags:
2611- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
2612- -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
2613-
2614-distdir: $(DISTFILES)
2615- $(am__remove_distdir)
2616- test -d "$(distdir)" || mkdir "$(distdir)"
2617- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
2618- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
2619- list='$(DISTFILES)'; \
2620- dist_files=`for file in $$list; do echo $$file; done | \
2621- sed -e "s|^$$srcdirstrip/||;t" \
2622- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
2623- case $$dist_files in \
2624- */*) $(MKDIR_P) `echo "$$dist_files" | \
2625- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
2626- sort -u` ;; \
2627- esac; \
2628- for file in $$dist_files; do \
2629- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
2630- if test -d $$d/$$file; then \
2631- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
2632- if test -d "$(distdir)/$$file"; then \
2633- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
2634- fi; \
2635- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
2636- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
2637- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
2638- fi; \
2639- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
2640- else \
2641- test -f "$(distdir)/$$file" \
2642- || cp -p $$d/$$file "$(distdir)/$$file" \
2643- || exit 1; \
2644- fi; \
2645- done
2646- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
2647- if test "$$subdir" = .; then :; else \
2648- $(am__make_dryrun) \
2649- || test -d "$(distdir)/$$subdir" \
2650- || $(MKDIR_P) "$(distdir)/$$subdir" \
2651- || exit 1; \
2652- dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
2653- $(am__relativize); \
2654- new_distdir=$$reldir; \
2655- dir1=$$subdir; dir2="$(top_distdir)"; \
2656- $(am__relativize); \
2657- new_top_distdir=$$reldir; \
2658- echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
2659- echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
2660- ($(am__cd) $$subdir && \
2661- $(MAKE) $(AM_MAKEFLAGS) \
2662- top_distdir="$$new_top_distdir" \
2663- distdir="$$new_distdir" \
2664- am__remove_distdir=: \
2665- am__skip_length_check=: \
2666- am__skip_mode_fix=: \
2667- distdir) \
2668- || exit 1; \
2669- fi; \
2670- done
2671- -test -n "$(am__skip_mode_fix)" \
2672- || find "$(distdir)" -type d ! -perm -755 \
2673- -exec chmod u+rwx,go+rx {} \; -o \
2674- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
2675- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
2676- ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
2677- || chmod -R a+r "$(distdir)"
2678-dist-gzip: distdir
2679- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
2680- $(am__post_remove_distdir)
2681-dist-bzip2: distdir
2682- tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
2683- $(am__post_remove_distdir)
2684-
2685-dist-lzip: distdir
2686- tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
2687- $(am__post_remove_distdir)
2688-
2689-dist-xz: distdir
2690- tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
2691- $(am__post_remove_distdir)
2692-
2693-dist-tarZ: distdir
2694- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
2695- $(am__post_remove_distdir)
2696-
2697-dist-shar: distdir
2698- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
2699- $(am__post_remove_distdir)
2700-
2701-dist-zip: distdir
2702- -rm -f $(distdir).zip
2703- zip -rq $(distdir).zip $(distdir)
2704- $(am__post_remove_distdir)
2705-
2706-dist dist-all:
2707- $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
2708- $(am__post_remove_distdir)
2709-
2710-# This target untars the dist file and tries a VPATH configuration. Then
2711-# it guarantees that the distribution is self-contained by making another
2712-# tarfile.
2713-distcheck: dist
2714- case '$(DIST_ARCHIVES)' in \
2715- *.tar.gz*) \
2716- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
2717- *.tar.bz2*) \
2718- bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
2719- *.tar.lz*) \
2720- lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
2721- *.tar.xz*) \
2722- xz -dc $(distdir).tar.xz | $(am__untar) ;;\
2723- *.tar.Z*) \
2724- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
2725- *.shar.gz*) \
2726- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
2727- *.zip*) \
2728- unzip $(distdir).zip ;;\
2729- esac
2730- chmod -R a-w $(distdir); chmod u+w $(distdir)
2731- mkdir $(distdir)/_build
2732- mkdir $(distdir)/_inst
2733- chmod a-w $(distdir)
2734- test -d $(distdir)/_build || exit 0; \
2735- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
2736- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
2737- && am__cwd=`pwd` \
2738- && $(am__cd) $(distdir)/_build \
2739- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
2740- $(AM_DISTCHECK_CONFIGURE_FLAGS) \
2741- $(DISTCHECK_CONFIGURE_FLAGS) \
2742- && $(MAKE) $(AM_MAKEFLAGS) \
2743- && $(MAKE) $(AM_MAKEFLAGS) dvi \
2744- && $(MAKE) $(AM_MAKEFLAGS) check \
2745- && $(MAKE) $(AM_MAKEFLAGS) install \
2746- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
2747- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
2748- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
2749- distuninstallcheck \
2750- && chmod -R a-w "$$dc_install_base" \
2751- && ({ \
2752- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
2753- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
2754- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
2755- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
2756- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
2757- } || { rm -rf "$$dc_destdir"; exit 1; }) \
2758- && rm -rf "$$dc_destdir" \
2759- && $(MAKE) $(AM_MAKEFLAGS) dist \
2760- && rm -rf $(DIST_ARCHIVES) \
2761- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
2762- && cd "$$am__cwd" \
2763- || exit 1
2764- $(am__post_remove_distdir)
2765- @(echo "$(distdir) archives ready for distribution: "; \
2766- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
2767- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
2768-distuninstallcheck:
2769- @test -n '$(distuninstallcheck_dir)' || { \
2770- echo 'ERROR: trying to run $@ with an empty' \
2771- '$$(distuninstallcheck_dir)' >&2; \
2772- exit 1; \
2773- }; \
2774- $(am__cd) '$(distuninstallcheck_dir)' || { \
2775- echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
2776- exit 1; \
2777- }; \
2778- test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
2779- || { echo "ERROR: files left after uninstall:" ; \
2780- if test -n "$(DESTDIR)"; then \
2781- echo " (check DESTDIR support)"; \
2782- fi ; \
2783- $(distuninstallcheck_listfiles) ; \
2784- exit 1; } >&2
2785-distcleancheck: distclean
2786- @if test '$(srcdir)' = . ; then \
2787- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
2788- exit 1 ; \
2789- fi
2790- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
2791- || { echo "ERROR: files left in build directory after distclean:" ; \
2792- $(distcleancheck_listfiles) ; \
2793- exit 1; } >&2
2794-check-am: all-am
2795-check: check-recursive
2796-all-am: Makefile $(DATA) config.h
2797-installdirs: installdirs-recursive
2798-installdirs-am:
2799- for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
2800- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
2801- done
2802-install: install-recursive
2803-install-exec: install-exec-recursive
2804-install-data: install-data-recursive
2805-uninstall: uninstall-recursive
2806-
2807-install-am: all-am
2808- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
2809-
2810-installcheck: installcheck-recursive
2811-install-strip:
2812- if test -z '$(STRIP)'; then \
2813- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
2814- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
2815- install; \
2816- else \
2817- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
2818- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
2819- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
2820- fi
2821-mostlyclean-generic:
2822-
2823-clean-generic:
2824-
2825-distclean-generic:
2826- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
2827- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
2828-
2829-maintainer-clean-generic:
2830- @echo "This command is intended for maintainers to use"
2831- @echo "it deletes files that may require special tools to rebuild."
2832-clean: clean-recursive
2833-
2834-clean-am: clean-generic clean-libtool mostlyclean-am
2835-
2836-distclean: distclean-recursive
2837- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
2838- -rm -f Makefile
2839-distclean-am: clean-am distclean-generic distclean-hdr \
2840- distclean-libtool distclean-tags
2841-
2842-dvi: dvi-recursive
2843-
2844-dvi-am:
2845-
2846-html: html-recursive
2847-
2848-html-am:
2849-
2850-info: info-recursive
2851-
2852-info-am:
2853-
2854-install-data-am: install-pkgconfigDATA
2855-
2856-install-dvi: install-dvi-recursive
2857-
2858-install-dvi-am:
2859-
2860-install-exec-am:
2861-
2862-install-html: install-html-recursive
2863-
2864-install-html-am:
2865-
2866-install-info: install-info-recursive
2867-
2868-install-info-am:
2869-
2870-install-man:
2871-
2872-install-pdf: install-pdf-recursive
2873-
2874-install-pdf-am:
2875-
2876-install-ps: install-ps-recursive
2877-
2878-install-ps-am:
2879-
2880-installcheck-am:
2881-
2882-maintainer-clean: maintainer-clean-recursive
2883- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
2884- -rm -rf $(top_srcdir)/autom4te.cache
2885- -rm -f Makefile
2886-maintainer-clean-am: distclean-am maintainer-clean-generic
2887-
2888-mostlyclean: mostlyclean-recursive
2889-
2890-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
2891-
2892-pdf: pdf-recursive
2893-
2894-pdf-am:
2895-
2896-ps: ps-recursive
2897-
2898-ps-am:
2899-
2900-uninstall-am: uninstall-pkgconfigDATA
2901-
2902-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
2903- cscopelist-recursive ctags-recursive install-am install-strip \
2904- tags-recursive
2905-
2906-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
2907- all all-am am--refresh check check-am clean clean-cscope \
2908- clean-generic clean-libtool cscope cscopelist \
2909- cscopelist-recursive ctags ctags-recursive dist dist-all \
2910- dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \
2911- dist-zip distcheck distclean distclean-generic distclean-hdr \
2912- distclean-libtool distclean-tags distcleancheck distdir \
2913- distuninstallcheck dvi dvi-am html html-am info info-am \
2914- install install-am install-data install-data-am install-dvi \
2915- install-dvi-am install-exec install-exec-am install-html \
2916- install-html-am install-info install-info-am install-man \
2917- install-pdf install-pdf-am install-pkgconfigDATA install-ps \
2918- install-ps-am install-strip installcheck installcheck-am \
2919- installdirs installdirs-am maintainer-clean \
2920- maintainer-clean-generic mostlyclean mostlyclean-generic \
2921- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
2922- uninstall uninstall-am uninstall-pkgconfigDATA
2923-
2924-
2925-docs/html: $(top_builddir)/doxygen.cfg $(top_srcdir)/src/*.c $(top_srcdir)/src/*.h $(top_srcdir)/include/libimobiledevice/*.h
2926- rm -rf docs/html
2927- doxygen doxygen.cfg
2928-
2929-docs: doxygen.cfg docs/html
2930-
2931-indent:
2932- indent -kr -ut -ts4 -l120 src/*.c src/*.h dev/*.c
2933-
2934-# Tell versions [3.59,3.63) of GNU make to not export all variables.
2935-# Otherwise a system limit (for SysV at least) may be exceeded.
2936-.NOEXPORT:
2937
2938=== modified file 'NEWS'
2939--- NEWS 2013-10-28 23:01:08 +0000
2940+++ NEWS 2014-03-14 06:45:31 +0000
2941@@ -1,3 +1,23 @@
2942+Version 1.1.6
2943+~~~~~~~~~~~~~
2944+
2945+* Development release
2946+* Changes:
2947+ - Security: Fix insecure use of the /tmp directory (CVE-2013-2142)
2948+ - A bunch of memory leak fixes
2949+ - Python: Various fixes and support for "with" statement for AfcFile class
2950+ - Python: Add Afc2Client class to allow jailbroken filesystem access
2951+ - Fix linking issue with newer libtool as reported for Ubuntu
2952+ - Fix stuck thread in idevicesyslog which broke quit from within the tool
2953+ - Add syslog_relay service implementation and use it in idevicesyslog
2954+ - API: Add instproxy_client_get_path_for_bundle_identifier() helper
2955+ - API: Add afc_dictionary_free() helper
2956+ - Move thread, socket, debug and userpref code to "common" source directory
2957+ in order to improve code reuse
2958+ - Fix broken byte order detection in configure.ac which could lead to broken
2959+ AFC protocol communication on platforms without endian.h (Raspberry PI)
2960+* API is UNSTABLE
2961+
2962 Version 1.1.5
2963 ~~~~~~~~~~~~~
2964
2965
2966=== modified file 'README'
2967--- README 2013-07-31 15:34:39 +0000
2968+++ README 2014-03-14 06:45:31 +0000
2969@@ -19,6 +19,7 @@
2970 automake
2971 autoconf
2972 libtool
2973+ pkg-config
2974 gcc
2975
2976 Optional:
2977@@ -29,7 +30,7 @@
2978 ============
2979
2980 To compile run:
2981- ./configure
2982+ ./autogen.sh
2983 make
2984 sudo make install
2985
2986@@ -42,12 +43,18 @@
2987 Code:
2988 git clone http://git.sukimashita.com/libimobiledevice.git
2989
2990+Code (Mirror):
2991+ git clone https://github.com/libimobiledevice/libimobiledevice.git
2992+
2993 Tickets:
2994- http://libiphone.lighthouseapp.com/
2995+ http://github.com/libimobiledevice/libimobiledevice/issues
2996
2997 Mailing List:
2998 http://lists.libimobiledevice.org/mailman/listinfo/libimobiledevice-devel
2999
3000+IRC:
3001+ irc://irc.freenode.net#libimobiledevice
3002+
3003 Credits
3004 =======
3005
3006@@ -56,4 +63,4 @@
3007 authorized, sponsored, or otherwise approved by Apple Inc.
3008
3009 README Updated on:
3010- 2013-03-18
3011+ 2014-02-02
3012
3013=== removed file 'aclocal.m4'
3014--- aclocal.m4 2013-10-28 23:01:08 +0000
3015+++ aclocal.m4 1970-01-01 00:00:00 +0000
3016@@ -1,1454 +0,0 @@
3017-# generated automatically by aclocal 1.12.1 -*- Autoconf -*-
3018-
3019-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
3020-
3021-# This file is free software; the Free Software Foundation
3022-# gives unlimited permission to copy and/or distribute it,
3023-# with or without modifications, as long as this notice is preserved.
3024-
3025-# This program is distributed in the hope that it will be useful,
3026-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3027-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3028-# PARTICULAR PURPOSE.
3029-
3030-m4_ifndef([AC_AUTOCONF_VERSION],
3031- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
3032-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
3033-[m4_warning([this file was generated for autoconf 2.69.
3034-You have another version of autoconf. It may work, but is not guaranteed to.
3035-If you have problems, you may need to regenerate the build system entirely.
3036-To do so, use the procedure documented by the package, typically 'autoreconf'.])])
3037-
3038-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
3039-# serial 1 (pkg-config-0.24)
3040-#
3041-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3042-#
3043-# This program is free software; you can redistribute it and/or modify
3044-# it under the terms of the GNU General Public License as published by
3045-# the Free Software Foundation; either version 2 of the License, or
3046-# (at your option) any later version.
3047-#
3048-# This program is distributed in the hope that it will be useful, but
3049-# WITHOUT ANY WARRANTY; without even the implied warranty of
3050-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3051-# General Public License for more details.
3052-#
3053-# You should have received a copy of the GNU General Public License
3054-# along with this program; if not, write to the Free Software
3055-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3056-#
3057-# As a special exception to the GNU General Public License, if you
3058-# distribute this file as part of a program that contains a
3059-# configuration script generated by Autoconf, you may include it under
3060-# the same distribution terms that you use for the rest of that program.
3061-
3062-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3063-# ----------------------------------
3064-AC_DEFUN([PKG_PROG_PKG_CONFIG],
3065-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
3066-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
3067-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
3068-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
3069-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
3070-
3071-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
3072- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
3073-fi
3074-if test -n "$PKG_CONFIG"; then
3075- _pkg_min_version=m4_default([$1], [0.9.0])
3076- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
3077- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
3078- AC_MSG_RESULT([yes])
3079- else
3080- AC_MSG_RESULT([no])
3081- PKG_CONFIG=""
3082- fi
3083-fi[]dnl
3084-])# PKG_PROG_PKG_CONFIG
3085-
3086-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3087-#
3088-# Check to see whether a particular set of modules exists. Similar
3089-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3090-#
3091-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
3092-# only at the first occurence in configure.ac, so if the first place
3093-# it's called might be skipped (such as if it is within an "if", you
3094-# have to call PKG_CHECK_EXISTS manually
3095-# --------------------------------------------------------------
3096-AC_DEFUN([PKG_CHECK_EXISTS],
3097-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
3098-if test -n "$PKG_CONFIG" && \
3099- AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
3100- m4_default([$2], [:])
3101-m4_ifvaln([$3], [else
3102- $3])dnl
3103-fi])
3104-
3105-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3106-# ---------------------------------------------
3107-m4_define([_PKG_CONFIG],
3108-[if test -n "$$1"; then
3109- pkg_cv_[]$1="$$1"
3110- elif test -n "$PKG_CONFIG"; then
3111- PKG_CHECK_EXISTS([$3],
3112- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
3113- [pkg_failed=yes])
3114- else
3115- pkg_failed=untried
3116-fi[]dnl
3117-])# _PKG_CONFIG
3118-
3119-# _PKG_SHORT_ERRORS_SUPPORTED
3120-# -----------------------------
3121-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
3122-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
3123-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
3124- _pkg_short_errors_supported=yes
3125-else
3126- _pkg_short_errors_supported=no
3127-fi[]dnl
3128-])# _PKG_SHORT_ERRORS_SUPPORTED
3129-
3130-
3131-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3132-# [ACTION-IF-NOT-FOUND])
3133-#
3134-#
3135-# Note that if there is a possibility the first call to
3136-# PKG_CHECK_MODULES might not happen, you should be sure to include an
3137-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3138-#
3139-#
3140-# --------------------------------------------------------------
3141-AC_DEFUN([PKG_CHECK_MODULES],
3142-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
3143-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
3144-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
3145-
3146-pkg_failed=no
3147-AC_MSG_CHECKING([for $1])
3148-
3149-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
3150-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
3151-
3152-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
3153-and $1[]_LIBS to avoid the need to call pkg-config.
3154-See the pkg-config man page for more details.])
3155-
3156-if test $pkg_failed = yes; then
3157- AC_MSG_RESULT([no])
3158- _PKG_SHORT_ERRORS_SUPPORTED
3159- if test $_pkg_short_errors_supported = yes; then
3160- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
3161- else
3162- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
3163- fi
3164- # Put the nasty error message in config.log where it belongs
3165- echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
3166-
3167- m4_default([$4], [AC_MSG_ERROR(
3168-[Package requirements ($2) were not met:
3169-
3170-$$1_PKG_ERRORS
3171-
3172-Consider adjusting the PKG_CONFIG_PATH environment variable if you
3173-installed software in a non-standard prefix.
3174-
3175-_PKG_TEXT])[]dnl
3176- ])
3177-elif test $pkg_failed = untried; then
3178- AC_MSG_RESULT([no])
3179- m4_default([$4], [AC_MSG_FAILURE(
3180-[The pkg-config script could not be found or is too old. Make sure it
3181-is in your PATH or set the PKG_CONFIG environment variable to the full
3182-path to pkg-config.
3183-
3184-_PKG_TEXT
3185-
3186-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
3187- ])
3188-else
3189- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
3190- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
3191- AC_MSG_RESULT([yes])
3192- $3
3193-fi[]dnl
3194-])# PKG_CHECK_MODULES
3195-
3196-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
3197-#
3198-# This file is free software; the Free Software Foundation
3199-# gives unlimited permission to copy and/or distribute it,
3200-# with or without modifications, as long as this notice is preserved.
3201-
3202-# serial 8
3203-
3204-# AM_AUTOMAKE_VERSION(VERSION)
3205-# ----------------------------
3206-# Automake X.Y traces this macro to ensure aclocal.m4 has been
3207-# generated from the m4 files accompanying Automake X.Y.
3208-# (This private macro should not be called outside this file.)
3209-AC_DEFUN([AM_AUTOMAKE_VERSION],
3210-[am__api_version='1.12'
3211-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3212-dnl require some minimum version. Point them to the right macro.
3213-m4_if([$1], [1.12.1], [],
3214- [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3215-])
3216-
3217-# _AM_AUTOCONF_VERSION(VERSION)
3218-# -----------------------------
3219-# aclocal traces this macro to find the Autoconf version.
3220-# This is a private macro too. Using m4_define simplifies
3221-# the logic in aclocal, which can simply ignore this definition.
3222-m4_define([_AM_AUTOCONF_VERSION], [])
3223-
3224-# AM_SET_CURRENT_AUTOMAKE_VERSION
3225-# -------------------------------
3226-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
3227-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
3228-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
3229-[AM_AUTOMAKE_VERSION([1.12.1])dnl
3230-m4_ifndef([AC_AUTOCONF_VERSION],
3231- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
3232-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
3233-
3234-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
3235-
3236-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
3237-#
3238-# This file is free software; the Free Software Foundation
3239-# gives unlimited permission to copy and/or distribute it,
3240-# with or without modifications, as long as this notice is preserved.
3241-
3242-# serial 2
3243-
3244-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3245-# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
3246-# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
3247-#
3248-# Of course, Automake must honor this variable whenever it calls a
3249-# tool from the auxiliary directory. The problem is that $srcdir (and
3250-# therefore $ac_aux_dir as well) can be either absolute or relative,
3251-# depending on how configure is run. This is pretty annoying, since
3252-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
3253-# source directory, any form will work fine, but in subdirectories a
3254-# relative path needs to be adjusted first.
3255-#
3256-# $ac_aux_dir/missing
3257-# fails when called from a subdirectory if $ac_aux_dir is relative
3258-# $top_srcdir/$ac_aux_dir/missing
3259-# fails if $ac_aux_dir is absolute,
3260-# fails when called from a subdirectory in a VPATH build with
3261-# a relative $ac_aux_dir
3262-#
3263-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3264-# are both prefixed by $srcdir. In an in-source build this is usually
3265-# harmless because $srcdir is '.', but things will broke when you
3266-# start a VPATH build or use an absolute $srcdir.
3267-#
3268-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3269-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
3270-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3271-# and then we would define $MISSING as
3272-# MISSING="\${SHELL} $am_aux_dir/missing"
3273-# This will work as long as MISSING is not called from configure, because
3274-# unfortunately $(top_srcdir) has no meaning in configure.
3275-# However there are other variables, like CC, which are often used in
3276-# configure, and could therefore not use this "fixed" $ac_aux_dir.
3277-#
3278-# Another solution, used here, is to always expand $ac_aux_dir to an
3279-# absolute PATH. The drawback is that using absolute paths prevent a
3280-# configured tree to be moved without reconfiguration.
3281-
3282-AC_DEFUN([AM_AUX_DIR_EXPAND],
3283-[dnl Rely on autoconf to set up CDPATH properly.
3284-AC_PREREQ([2.50])dnl
3285-# expand $ac_aux_dir to an absolute path
3286-am_aux_dir=`cd $ac_aux_dir && pwd`
3287-])
3288-
3289-# AM_CONDITIONAL -*- Autoconf -*-
3290-
3291-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
3292-#
3293-# This file is free software; the Free Software Foundation
3294-# gives unlimited permission to copy and/or distribute it,
3295-# with or without modifications, as long as this notice is preserved.
3296-
3297-# serial 10
3298-
3299-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
3300-# -------------------------------------
3301-# Define a conditional.
3302-AC_DEFUN([AM_CONDITIONAL],
3303-[AC_PREREQ([2.52])dnl
3304- m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
3305- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
3306-AC_SUBST([$1_TRUE])dnl
3307-AC_SUBST([$1_FALSE])dnl
3308-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
3309-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
3310-m4_define([_AM_COND_VALUE_$1], [$2])dnl
3311-if $2; then
3312- $1_TRUE=
3313- $1_FALSE='#'
3314-else
3315- $1_TRUE='#'
3316- $1_FALSE=
3317-fi
3318-AC_CONFIG_COMMANDS_PRE(
3319-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
3320- AC_MSG_ERROR([[conditional "$1" was never defined.
3321-Usually this means the macro was only invoked conditionally.]])
3322-fi])])
3323-
3324-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
3325-#
3326-# This file is free software; the Free Software Foundation
3327-# gives unlimited permission to copy and/or distribute it,
3328-# with or without modifications, as long as this notice is preserved.
3329-
3330-# serial 17
3331-
3332-# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
3333-# written in clear, in which case automake, when reading aclocal.m4,
3334-# will think it sees a *use*, and therefore will trigger all it's
3335-# C support machinery. Also note that it means that autoscan, seeing
3336-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
3337-
3338-
3339-# _AM_DEPENDENCIES(NAME)
3340-# ----------------------
3341-# See how the compiler implements dependency checking.
3342-# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
3343-# We try a few techniques and use that to set a single cache variable.
3344-#
3345-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
3346-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
3347-# dependency, and given that the user is not expected to run this macro,
3348-# just rely on AC_PROG_CC.
3349-AC_DEFUN([_AM_DEPENDENCIES],
3350-[AC_REQUIRE([AM_SET_DEPDIR])dnl
3351-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
3352-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
3353-AC_REQUIRE([AM_DEP_TRACK])dnl
3354-
3355-m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
3356- [$1], [CXX], [depcc="$CXX" am_compiler_list=],
3357- [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
3358- [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
3359- [$1], [UPC], [depcc="$UPC" am_compiler_list=],
3360- [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
3361- [depcc="$$1" am_compiler_list=])
3362-
3363-AC_CACHE_CHECK([dependency style of $depcc],
3364- [am_cv_$1_dependencies_compiler_type],
3365-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3366- # We make a subdir and do the tests there. Otherwise we can end up
3367- # making bogus files that we don't know about and never remove. For
3368- # instance it was reported that on HP-UX the gcc test will end up
3369- # making a dummy file named 'D' -- because '-MD' means "put the output
3370- # in D".
3371- rm -rf conftest.dir
3372- mkdir conftest.dir
3373- # Copy depcomp to subdir because otherwise we won't find it if we're
3374- # using a relative directory.
3375- cp "$am_depcomp" conftest.dir
3376- cd conftest.dir
3377- # We will build objects and dependencies in a subdirectory because
3378- # it helps to detect inapplicable dependency modes. For instance
3379- # both Tru64's cc and ICC support -MD to output dependencies as a
3380- # side effect of compilation, but ICC will put the dependencies in
3381- # the current directory while Tru64 will put them in the object
3382- # directory.
3383- mkdir sub
3384-
3385- am_cv_$1_dependencies_compiler_type=none
3386- if test "$am_compiler_list" = ""; then
3387- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
3388- fi
3389- am__universal=false
3390- m4_case([$1], [CC],
3391- [case " $depcc " in #(
3392- *\ -arch\ *\ -arch\ *) am__universal=true ;;
3393- esac],
3394- [CXX],
3395- [case " $depcc " in #(
3396- *\ -arch\ *\ -arch\ *) am__universal=true ;;
3397- esac])
3398-
3399- for depmode in $am_compiler_list; do
3400- # Setup a source with many dependencies, because some compilers
3401- # like to wrap large dependency lists on column 80 (with \), and
3402- # we should not choose a depcomp mode which is confused by this.
3403- #
3404- # We need to recreate these files for each test, as the compiler may
3405- # overwrite some of them when testing with obscure command lines.
3406- # This happens at least with the AIX C compiler.
3407- : > sub/conftest.c
3408- for i in 1 2 3 4 5 6; do
3409- echo '#include "conftst'$i'.h"' >> sub/conftest.c
3410- # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3411- # Solaris 10 /bin/sh.
3412- echo '/* dummy */' > sub/conftst$i.h
3413- done
3414- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3415-
3416- # We check with '-c' and '-o' for the sake of the "dashmstdout"
3417- # mode. It turns out that the SunPro C++ compiler does not properly
3418- # handle '-M -o', and we need to detect this. Also, some Intel
3419- # versions had trouble with output in subdirs.
3420- am__obj=sub/conftest.${OBJEXT-o}
3421- am__minus_obj="-o $am__obj"
3422- case $depmode in
3423- gcc)
3424- # This depmode causes a compiler race in universal mode.
3425- test "$am__universal" = false || continue
3426- ;;
3427- nosideeffect)
3428- # After this tag, mechanisms are not by side-effect, so they'll
3429- # only be used when explicitly requested.
3430- if test "x$enable_dependency_tracking" = xyes; then
3431- continue
3432- else
3433- break
3434- fi
3435- ;;
3436- msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3437- # This compiler won't grok '-c -o', but also, the minuso test has
3438- # not run yet. These depmodes are late enough in the game, and
3439- # so weak that their functioning should not be impacted.
3440- am__obj=conftest.${OBJEXT-o}
3441- am__minus_obj=
3442- ;;
3443- none) break ;;
3444- esac
3445- if depmode=$depmode \
3446- source=sub/conftest.c object=$am__obj \
3447- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3448- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3449- >/dev/null 2>conftest.err &&
3450- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3451- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3452- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3453- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3454- # icc doesn't choke on unknown options, it will just issue warnings
3455- # or remarks (even with -Werror). So we grep stderr for any message
3456- # that says an option was ignored or not supported.
3457- # When given -MP, icc 7.0 and 7.1 complain thusly:
3458- # icc: Command line warning: ignoring option '-M'; no argument required
3459- # The diagnosis changed in icc 8.0:
3460- # icc: Command line remark: option '-MP' not supported
3461- if (grep 'ignoring option' conftest.err ||
3462- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3463- am_cv_$1_dependencies_compiler_type=$depmode
3464- break
3465- fi
3466- fi
3467- done
3468-
3469- cd ..
3470- rm -rf conftest.dir
3471-else
3472- am_cv_$1_dependencies_compiler_type=none
3473-fi
3474-])
3475-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3476-AM_CONDITIONAL([am__fastdep$1], [
3477- test "x$enable_dependency_tracking" != xno \
3478- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3479-])
3480-
3481-
3482-# AM_SET_DEPDIR
3483-# -------------
3484-# Choose a directory name for dependency files.
3485-# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3486-AC_DEFUN([AM_SET_DEPDIR],
3487-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3488-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3489-])
3490-
3491-
3492-# AM_DEP_TRACK
3493-# ------------
3494-AC_DEFUN([AM_DEP_TRACK],
3495-[AC_ARG_ENABLE([dependency-tracking], [dnl
3496-AS_HELP_STRING(
3497- [--enable-dependency-tracking],
3498- [do not reject slow dependency extractors])
3499-AS_HELP_STRING(
3500- [--disable-dependency-tracking],
3501- [speeds up one-time build])])
3502-if test "x$enable_dependency_tracking" != xno; then
3503- am_depcomp="$ac_aux_dir/depcomp"
3504- AMDEPBACKSLASH='\'
3505- am__nodep='_no'
3506-fi
3507-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3508-AC_SUBST([AMDEPBACKSLASH])dnl
3509-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3510-AC_SUBST([am__nodep])dnl
3511-_AM_SUBST_NOTMAKE([am__nodep])dnl
3512-])
3513-
3514-# Generate code to set up dependency tracking. -*- Autoconf -*-
3515-
3516-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
3517-#
3518-# This file is free software; the Free Software Foundation
3519-# gives unlimited permission to copy and/or distribute it,
3520-# with or without modifications, as long as this notice is preserved.
3521-
3522-# serial 6
3523-
3524-# _AM_OUTPUT_DEPENDENCY_COMMANDS
3525-# ------------------------------
3526-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3527-[{
3528- # Autoconf 2.62 quotes --file arguments for eval, but not when files
3529- # are listed without --file. Let's play safe and only enable the eval
3530- # if we detect the quoting.
3531- case $CONFIG_FILES in
3532- *\'*) eval set x "$CONFIG_FILES" ;;
3533- *) set x $CONFIG_FILES ;;
3534- esac
3535- shift
3536- for mf
3537- do
3538- # Strip MF so we end up with the name of the file.
3539- mf=`echo "$mf" | sed -e 's/:.*$//'`
3540- # Check whether this is an Automake generated Makefile or not.
3541- # We used to match only the files named 'Makefile.in', but
3542- # some people rename them; so instead we look at the file content.
3543- # Grep'ing the first line is not enough: some people post-process
3544- # each Makefile.in and add a new line on top of each file to say so.
3545- # Grep'ing the whole file is not good either: AIX grep has a line
3546- # limit of 2048, but all sed's we know have understand at least 4000.
3547- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3548- dirpart=`AS_DIRNAME("$mf")`
3549- else
3550- continue
3551- fi
3552- # Extract the definition of DEPDIR, am__include, and am__quote
3553- # from the Makefile without running 'make'.
3554- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3555- test -z "$DEPDIR" && continue
3556- am__include=`sed -n 's/^am__include = //p' < "$mf"`
3557- test -z "am__include" && continue
3558- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3559- # Find all dependency output files, they are included files with
3560- # $(DEPDIR) in their names. We invoke sed twice because it is the
3561- # simplest approach to changing $(DEPDIR) to its actual value in the
3562- # expansion.
3563- for file in `sed -n "
3564- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3565- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
3566- # Make sure the directory exists.
3567- test -f "$dirpart/$file" && continue
3568- fdir=`AS_DIRNAME(["$file"])`
3569- AS_MKDIR_P([$dirpart/$fdir])
3570- # echo "creating $dirpart/$file"
3571- echo '# dummy' > "$dirpart/$file"
3572- done
3573- done
3574-}
3575-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3576-
3577-
3578-# AM_OUTPUT_DEPENDENCY_COMMANDS
3579-# -----------------------------
3580-# This macro should only be invoked once -- use via AC_REQUIRE.
3581-#
3582-# This code is only required when automatic dependency tracking
3583-# is enabled. FIXME. This creates each '.P' file that we will
3584-# need in order to bootstrap the dependency handling code.
3585-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3586-[AC_CONFIG_COMMANDS([depfiles],
3587- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3588- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3589-])
3590-
3591-# Do all the work for Automake. -*- Autoconf -*-
3592-
3593-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
3594-#
3595-# This file is free software; the Free Software Foundation
3596-# gives unlimited permission to copy and/or distribute it,
3597-# with or without modifications, as long as this notice is preserved.
3598-
3599-# serial 19
3600-
3601-# This macro actually does too much. Some checks are only needed if
3602-# your package does certain things. But this isn't really a big deal.
3603-
3604-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3605-# AM_INIT_AUTOMAKE([OPTIONS])
3606-# -----------------------------------------------
3607-# The call with PACKAGE and VERSION arguments is the old style
3608-# call (pre autoconf-2.50), which is being phased out. PACKAGE
3609-# and VERSION should now be passed to AC_INIT and removed from
3610-# the call to AM_INIT_AUTOMAKE.
3611-# We support both call styles for the transition. After
3612-# the next Automake release, Autoconf can make the AC_INIT
3613-# arguments mandatory, and then we can depend on a new Autoconf
3614-# release and drop the old call support.
3615-AC_DEFUN([AM_INIT_AUTOMAKE],
3616-[AC_PREREQ([2.62])dnl
3617-dnl Autoconf wants to disallow AM_ names. We explicitly allow
3618-dnl the ones we care about.
3619-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3620-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3621-AC_REQUIRE([AC_PROG_INSTALL])dnl
3622-if test "`cd $srcdir && pwd`" != "`pwd`"; then
3623- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3624- # is not polluted with repeated "-I."
3625- AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3626- # test to see if srcdir already configured
3627- if test -f $srcdir/config.status; then
3628- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3629- fi
3630-fi
3631-
3632-# test whether we have cygpath
3633-if test -z "$CYGPATH_W"; then
3634- if (cygpath --version) >/dev/null 2>/dev/null; then
3635- CYGPATH_W='cygpath -w'
3636- else
3637- CYGPATH_W=echo
3638- fi
3639-fi
3640-AC_SUBST([CYGPATH_W])
3641-
3642-# Define the identity of the package.
3643-dnl Distinguish between old-style and new-style calls.
3644-m4_ifval([$2],
3645-[AC_DIAGNOSE([obsolete],
3646-[$0: two- and three-arguments forms are deprecated. For more info, see:
3647-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
3648-m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3649- AC_SUBST([PACKAGE], [$1])dnl
3650- AC_SUBST([VERSION], [$2])],
3651-[_AM_SET_OPTIONS([$1])dnl
3652-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3653-m4_if(
3654- m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
3655- [ok:ok],,
3656- [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3657- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3658- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3659-
3660-_AM_IF_OPTION([no-define],,
3661-[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
3662- AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
3663-
3664-# Some tools Automake needs.
3665-AC_REQUIRE([AM_SANITY_CHECK])dnl
3666-AC_REQUIRE([AC_ARG_PROGRAM])dnl
3667-AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
3668-AM_MISSING_PROG([AUTOCONF], [autoconf])
3669-AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
3670-AM_MISSING_PROG([AUTOHEADER], [autoheader])
3671-AM_MISSING_PROG([MAKEINFO], [makeinfo])
3672-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3673-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3674-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3675-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
3676-# We need awk for the "check" target. The system "awk" is bad on
3677-# some platforms.
3678-AC_REQUIRE([AC_PROG_AWK])dnl
3679-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3680-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3681-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3682- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3683- [_AM_PROG_TAR([v7])])])
3684-_AM_IF_OPTION([no-dependencies],,
3685-[AC_PROVIDE_IFELSE([AC_PROG_CC],
3686- [_AM_DEPENDENCIES([CC])],
3687- [m4_define([AC_PROG_CC],
3688- m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
3689-AC_PROVIDE_IFELSE([AC_PROG_CXX],
3690- [_AM_DEPENDENCIES([CXX])],
3691- [m4_define([AC_PROG_CXX],
3692- m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
3693-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3694- [_AM_DEPENDENCIES([OBJC])],
3695- [m4_define([AC_PROG_OBJC],
3696- m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
3697-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
3698-dnl but we still cater to Autoconf 2.62.
3699-m4_ifdef([AC_PROG_OBJCXX],
3700-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
3701- [_AM_DEPENDENCIES([OBJCXX])],
3702- [m4_define([AC_PROG_OBJCXX],
3703- m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
3704-])
3705-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
3706-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
3707-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
3708-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
3709-AC_CONFIG_COMMANDS_PRE(dnl
3710-[m4_provide_if([_AM_COMPILER_EXEEXT],
3711- [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3712-])
3713-
3714-dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
3715-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3716-dnl mangled by Autoconf and run in a shell conditional statement.
3717-m4_define([_AC_COMPILER_EXEEXT],
3718-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3719-
3720-
3721-# When config.status generates a header, we must update the stamp-h file.
3722-# This file resides in the same directory as the config header
3723-# that is generated. The stamp files are numbered to have different names.
3724-
3725-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3726-# loop where config.status creates the headers, so we can generate
3727-# our stamp files there.
3728-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3729-[# Compute $1's index in $config_headers.
3730-_am_arg=$1
3731-_am_stamp_count=1
3732-for _am_header in $config_headers :; do
3733- case $_am_header in
3734- $_am_arg | $_am_arg:* )
3735- break ;;
3736- * )
3737- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3738- esac
3739-done
3740-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3741-
3742-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
3743-#
3744-# This file is free software; the Free Software Foundation
3745-# gives unlimited permission to copy and/or distribute it,
3746-# with or without modifications, as long as this notice is preserved.
3747-
3748-# serial 8
3749-
3750-# AM_PROG_INSTALL_SH
3751-# ------------------
3752-# Define $install_sh.
3753-AC_DEFUN([AM_PROG_INSTALL_SH],
3754-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3755-if test x"${install_sh}" != xset; then
3756- case $am_aux_dir in
3757- *\ * | *\ *)
3758- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3759- *)
3760- install_sh="\${SHELL} $am_aux_dir/install-sh"
3761- esac
3762-fi
3763-AC_SUBST([install_sh])])
3764-
3765-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
3766-#
3767-# This file is free software; the Free Software Foundation
3768-# gives unlimited permission to copy and/or distribute it,
3769-# with or without modifications, as long as this notice is preserved.
3770-
3771-# serial 2
3772-
3773-# Check whether the underlying file-system supports filenames
3774-# with a leading dot. For instance MS-DOS doesn't.
3775-AC_DEFUN([AM_SET_LEADING_DOT],
3776-[rm -rf .tst 2>/dev/null
3777-mkdir .tst 2>/dev/null
3778-if test -d .tst; then
3779- am__leading_dot=.
3780-else
3781- am__leading_dot=_
3782-fi
3783-rmdir .tst 2>/dev/null
3784-AC_SUBST([am__leading_dot])])
3785-
3786-# Check to see how 'make' treats includes. -*- Autoconf -*-
3787-
3788-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
3789-#
3790-# This file is free software; the Free Software Foundation
3791-# gives unlimited permission to copy and/or distribute it,
3792-# with or without modifications, as long as this notice is preserved.
3793-
3794-# serial 5
3795-
3796-# AM_MAKE_INCLUDE()
3797-# -----------------
3798-# Check to see how make treats includes.
3799-AC_DEFUN([AM_MAKE_INCLUDE],
3800-[am_make=${MAKE-make}
3801-cat > confinc << 'END'
3802-am__doit:
3803- @echo this is the am__doit target
3804-.PHONY: am__doit
3805-END
3806-# If we don't find an include directive, just comment out the code.
3807-AC_MSG_CHECKING([for style of include used by $am_make])
3808-am__include="#"
3809-am__quote=
3810-_am_result=none
3811-# First try GNU make style include.
3812-echo "include confinc" > confmf
3813-# Ignore all kinds of additional output from 'make'.
3814-case `$am_make -s -f confmf 2> /dev/null` in #(
3815-*the\ am__doit\ target*)
3816- am__include=include
3817- am__quote=
3818- _am_result=GNU
3819- ;;
3820-esac
3821-# Now try BSD make style include.
3822-if test "$am__include" = "#"; then
3823- echo '.include "confinc"' > confmf
3824- case `$am_make -s -f confmf 2> /dev/null` in #(
3825- *the\ am__doit\ target*)
3826- am__include=.include
3827- am__quote="\""
3828- _am_result=BSD
3829- ;;
3830- esac
3831-fi
3832-AC_SUBST([am__include])
3833-AC_SUBST([am__quote])
3834-AC_MSG_RESULT([$_am_result])
3835-rm -f confinc confmf
3836-])
3837-
3838-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
3839-#
3840-# This file is free software; the Free Software Foundation
3841-# gives unlimited permission to copy and/or distribute it,
3842-# with or without modifications, as long as this notice is preserved.
3843-
3844-# serial 6
3845-
3846-# AM_PROG_CC_C_O
3847-# --------------
3848-# Like AC_PROG_CC_C_O, but changed for automake.
3849-AC_DEFUN([AM_PROG_CC_C_O],
3850-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
3851-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3852-AC_REQUIRE_AUX_FILE([compile])dnl
3853-# FIXME: we rely on the cache variable name because
3854-# there is no other way.
3855-set dummy $CC
3856-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
3857-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
3858-if test "$am_t" != yes; then
3859- # Losing compiler, so override with the script.
3860- # FIXME: It is wrong to rewrite CC.
3861- # But if we don't then we get into trouble of one sort or another.
3862- # A longer-term fix would be to have automake use am__CC in this case,
3863- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3864- CC="$am_aux_dir/compile $CC"
3865-fi
3866-dnl Make sure AC_PROG_CC is never called again, or it will override our
3867-dnl setting of CC.
3868-m4_define([AC_PROG_CC],
3869- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
3870-])
3871-
3872-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3873-
3874-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
3875-#
3876-# This file is free software; the Free Software Foundation
3877-# gives unlimited permission to copy and/or distribute it,
3878-# with or without modifications, as long as this notice is preserved.
3879-
3880-# serial 7
3881-
3882-# AM_MISSING_PROG(NAME, PROGRAM)
3883-# ------------------------------
3884-AC_DEFUN([AM_MISSING_PROG],
3885-[AC_REQUIRE([AM_MISSING_HAS_RUN])
3886-$1=${$1-"${am_missing_run}$2"}
3887-AC_SUBST($1)])
3888-
3889-
3890-# AM_MISSING_HAS_RUN
3891-# ------------------
3892-# Define MISSING if not defined so far and test if it supports --run.
3893-# If it does, set am_missing_run to use it, otherwise, to nothing.
3894-AC_DEFUN([AM_MISSING_HAS_RUN],
3895-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3896-AC_REQUIRE_AUX_FILE([missing])dnl
3897-if test x"${MISSING+set}" != xset; then
3898- case $am_aux_dir in
3899- *\ * | *\ *)
3900- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3901- *)
3902- MISSING="\${SHELL} $am_aux_dir/missing" ;;
3903- esac
3904-fi
3905-# Use eval to expand $SHELL
3906-if eval "$MISSING --run true"; then
3907- am_missing_run="$MISSING --run "
3908-else
3909- am_missing_run=
3910- AC_MSG_WARN(['missing' script is too old or missing])
3911-fi
3912-])
3913-
3914-# Helper functions for option handling. -*- Autoconf -*-
3915-
3916-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
3917-#
3918-# This file is free software; the Free Software Foundation
3919-# gives unlimited permission to copy and/or distribute it,
3920-# with or without modifications, as long as this notice is preserved.
3921-
3922-# serial 6
3923-
3924-# _AM_MANGLE_OPTION(NAME)
3925-# -----------------------
3926-AC_DEFUN([_AM_MANGLE_OPTION],
3927-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3928-
3929-# _AM_SET_OPTION(NAME)
3930-# --------------------
3931-# Set option NAME. Presently that only means defining a flag for this option.
3932-AC_DEFUN([_AM_SET_OPTION],
3933-[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
3934-
3935-# _AM_SET_OPTIONS(OPTIONS)
3936-# ------------------------
3937-# OPTIONS is a space-separated list of Automake options.
3938-AC_DEFUN([_AM_SET_OPTIONS],
3939-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3940-
3941-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3942-# -------------------------------------------
3943-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3944-AC_DEFUN([_AM_IF_OPTION],
3945-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3946-
3947-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
3948-#
3949-# This file is free software; the Free Software Foundation
3950-# gives unlimited permission to copy and/or distribute it,
3951-# with or without modifications, as long as this notice is preserved.
3952-
3953-# serial 9
3954-
3955-# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3956-# ---------------------------------------------------------------------------
3957-# Adds support for distributing Python modules and packages. To
3958-# install modules, copy them to $(pythondir), using the python_PYTHON
3959-# automake variable. To install a package with the same name as the
3960-# automake package, install to $(pkgpythondir), or use the
3961-# pkgpython_PYTHON automake variable.
3962-#
3963-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
3964-# locations to install python extension modules (shared libraries).
3965-# Another macro is required to find the appropriate flags to compile
3966-# extension modules.
3967-#
3968-# If your package is configured with a different prefix to python,
3969-# users will have to add the install directory to the PYTHONPATH
3970-# environment variable, or create a .pth file (see the python
3971-# documentation for details).
3972-#
3973-# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
3974-# cause an error if the version of python installed on the system
3975-# doesn't meet the requirement. MINIMUM-VERSION should consist of
3976-# numbers and dots only.
3977-AC_DEFUN([AM_PATH_PYTHON],
3978- [
3979- dnl Find a Python interpreter. Python versions prior to 2.0 are not
3980- dnl supported. (2.0 was released on October 16, 2000).
3981- m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
3982-[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
3983- python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
3984-
3985- AC_ARG_VAR([PYTHON], [the Python interpreter])
3986-
3987- m4_if([$1],[],[
3988- dnl No version check is needed.
3989- # Find any Python interpreter.
3990- if test -z "$PYTHON"; then
3991- AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
3992- fi
3993- am_display_PYTHON=python
3994- ], [
3995- dnl A version check is needed.
3996- if test -n "$PYTHON"; then
3997- # If the user set $PYTHON, use it and don't search something else.
3998- AC_MSG_CHECKING([whether $PYTHON version is >= $1])
3999- AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
4000- [AC_MSG_RESULT([yes])],
4001- [AC_MSG_RESULT([no])
4002- AC_MSG_ERROR([Python interpreter is too old])])
4003- am_display_PYTHON=$PYTHON
4004- else
4005- # Otherwise, try each interpreter until we find one that satisfies
4006- # VERSION.
4007- AC_CACHE_CHECK([for a Python interpreter with version >= $1],
4008- [am_cv_pathless_PYTHON],[
4009- for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
4010- test "$am_cv_pathless_PYTHON" = none && break
4011- AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
4012- done])
4013- # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
4014- if test "$am_cv_pathless_PYTHON" = none; then
4015- PYTHON=:
4016- else
4017- AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
4018- fi
4019- am_display_PYTHON=$am_cv_pathless_PYTHON
4020- fi
4021- ])
4022-
4023- if test "$PYTHON" = :; then
4024- dnl Run any user-specified action, or abort.
4025- m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
4026- else
4027-
4028- dnl Query Python for its version number. Getting [:3] seems to be
4029- dnl the best way to do this; it's what "site.py" does in the standard
4030- dnl library.
4031-
4032- AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
4033- [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
4034- AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
4035-
4036- dnl Use the values of $prefix and $exec_prefix for the corresponding
4037- dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
4038- dnl distinct variables so they can be overridden if need be. However,
4039- dnl general consensus is that you shouldn't need this ability.
4040-
4041- AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
4042- AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
4043-
4044- dnl At times (like when building shared libraries) you may want
4045- dnl to know which OS platform Python thinks this is.
4046-
4047- AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
4048- [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
4049- AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
4050-
4051-
4052- dnl Set up 4 directories:
4053-
4054- dnl pythondir -- where to install python scripts. This is the
4055- dnl site-packages directory, not the python standard library
4056- dnl directory like in previous automake betas. This behavior
4057- dnl is more consistent with lispdir.m4 for example.
4058- dnl Query distutils for this directory.
4059- AC_CACHE_CHECK([for $am_display_PYTHON script directory],
4060- [am_cv_python_pythondir],
4061- [if test "x$prefix" = xNONE
4062- then
4063- am_py_prefix=$ac_default_prefix
4064- else
4065- am_py_prefix=$prefix
4066- fi
4067- am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
4068- case $am_cv_python_pythondir in
4069- $am_py_prefix*)
4070- am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
4071- am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
4072- ;;
4073- *)
4074- case $am_py_prefix in
4075- /usr|/System*) ;;
4076- *)
4077- am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
4078- ;;
4079- esac
4080- ;;
4081- esac
4082- ])
4083- AC_SUBST([pythondir], [$am_cv_python_pythondir])
4084-
4085- dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
4086- dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
4087- dnl more consistent with the rest of automake.
4088-
4089- AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
4090-
4091- dnl pyexecdir -- directory for installing python extension modules
4092- dnl (shared libraries)
4093- dnl Query distutils for this directory.
4094- AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
4095- [am_cv_python_pyexecdir],
4096- [if test "x$exec_prefix" = xNONE
4097- then
4098- am_py_exec_prefix=$am_py_prefix
4099- else
4100- am_py_exec_prefix=$exec_prefix
4101- fi
4102- am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
4103- case $am_cv_python_pyexecdir in
4104- $am_py_exec_prefix*)
4105- am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
4106- am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
4107- ;;
4108- *)
4109- case $am_py_exec_prefix in
4110- /usr|/System*) ;;
4111- *)
4112- am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
4113- ;;
4114- esac
4115- ;;
4116- esac
4117- ])
4118- AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
4119-
4120- dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
4121-
4122- AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
4123-
4124- dnl Run any user-specified action.
4125- $2
4126- fi
4127-
4128-])
4129-
4130-
4131-# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
4132-# ---------------------------------------------------------------------------
4133-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
4134-# Run ACTION-IF-FALSE otherwise.
4135-# This test uses sys.hexversion instead of the string equivalent (first
4136-# word of sys.version), in order to cope with versions such as 2.2c1.
4137-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
4138-AC_DEFUN([AM_PYTHON_CHECK_VERSION],
4139- [prog="import sys
4140-# split strings by '.' and convert to numeric. Append some zeros
4141-# because we need at least 4 digits for the hex conversion.
4142-# map returns an iterator in Python 3.0 and a list in 2.x
4143-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
4144-minverhex = 0
4145-# xrange is not present in Python 3.0 and range returns an iterator
4146-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
4147-sys.exit(sys.hexversion < minverhex)"
4148- AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
4149-
4150-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
4151-#
4152-# This file is free software; the Free Software Foundation
4153-# gives unlimited permission to copy and/or distribute it,
4154-# with or without modifications, as long as this notice is preserved.
4155-
4156-# serial 1
4157-
4158-# AM_RUN_LOG(COMMAND)
4159-# -------------------
4160-# Run COMMAND, save the exit status in ac_status, and log it.
4161-# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
4162-AC_DEFUN([AM_RUN_LOG],
4163-[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
4164- ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
4165- ac_status=$?
4166- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4167- (exit $ac_status); }])
4168-
4169-# Check to make sure that the build environment is sane. -*- Autoconf -*-
4170-
4171-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
4172-#
4173-# This file is free software; the Free Software Foundation
4174-# gives unlimited permission to copy and/or distribute it,
4175-# with or without modifications, as long as this notice is preserved.
4176-
4177-# serial 9
4178-
4179-# AM_SANITY_CHECK
4180-# ---------------
4181-AC_DEFUN([AM_SANITY_CHECK],
4182-[AC_MSG_CHECKING([whether build environment is sane])
4183-# Reject unsafe characters in $srcdir or the absolute working directory
4184-# name. Accept space and tab only in the latter.
4185-am_lf='
4186-'
4187-case `pwd` in
4188- *[[\\\"\#\$\&\'\`$am_lf]]*)
4189- AC_MSG_ERROR([unsafe absolute working directory name]);;
4190-esac
4191-case $srcdir in
4192- *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
4193- AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
4194-esac
4195-
4196-# Do 'set' in a subshell so we don't clobber the current shell's
4197-# arguments. Must try -L first in case configure is actually a
4198-# symlink; some systems play weird games with the mod time of symlinks
4199-# (eg FreeBSD returns the mod time of the symlink's containing
4200-# directory).
4201-if (
4202- am_has_slept=no
4203- for am_try in 1 2; do
4204- echo "timestamp, slept: $am_has_slept" > conftest.file
4205- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4206- if test "$[*]" = "X"; then
4207- # -L didn't work.
4208- set X `ls -t "$srcdir/configure" conftest.file`
4209- fi
4210- if test "$[*]" != "X $srcdir/configure conftest.file" \
4211- && test "$[*]" != "X conftest.file $srcdir/configure"; then
4212-
4213- # If neither matched, then we have a broken ls. This can happen
4214- # if, for instance, CONFIG_SHELL is bash and it inherits a
4215- # broken ls alias from the environment. This has actually
4216- # happened. Such a system could not be considered "sane".
4217- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
4218- alias in your environment])
4219- fi
4220- if test "$[2]" = conftest.file || test $am_try -eq 2; then
4221- break
4222- fi
4223- # Just in case.
4224- sleep 1
4225- am_has_slept=yes
4226- done
4227- test "$[2]" = conftest.file
4228- )
4229-then
4230- # Ok.
4231- :
4232-else
4233- AC_MSG_ERROR([newly created file is older than distributed files!
4234-Check your system clock])
4235-fi
4236-AC_MSG_RESULT([yes])
4237-# If we didn't sleep, we still need to ensure time stamps of config.status and
4238-# generated files are strictly newer.
4239-am_sleep_pid=
4240-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4241- ( sleep 1 ) &
4242- am_sleep_pid=$!
4243-fi
4244-AC_CONFIG_COMMANDS_PRE(
4245- [AC_MSG_CHECKING([that generated files are newer than configure])
4246- if test -n "$am_sleep_pid"; then
4247- # Hide warnings about reused PIDs.
4248- wait $am_sleep_pid 2>/dev/null
4249- fi
4250- AC_MSG_RESULT([done])])
4251-rm -f conftest.file
4252-])
4253-
4254-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
4255-#
4256-# This file is free software; the Free Software Foundation
4257-# gives unlimited permission to copy and/or distribute it,
4258-# with or without modifications, as long as this notice is preserved.
4259-
4260-# serial 3
4261-
4262-# AM_SILENT_RULES([DEFAULT])
4263-# --------------------------
4264-# Enable less verbose build rules; with the default set to DEFAULT
4265-# ("yes" being less verbose, "no" or empty being verbose).
4266-AC_DEFUN([AM_SILENT_RULES],
4267-[AC_ARG_ENABLE([silent-rules], [dnl
4268-AS_HELP_STRING(
4269- [--enable-silent-rules],
4270- [less verbose build output (undo: "make V=1")])
4271-AS_HELP_STRING(
4272- [--disable-silent-rules],
4273- [verbose build output (undo: "make V=0")])dnl
4274-])
4275-case $enable_silent_rules in @%:@ (((
4276- yes) AM_DEFAULT_VERBOSITY=0;;
4277- no) AM_DEFAULT_VERBOSITY=1;;
4278- *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
4279-esac
4280-dnl
4281-dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
4282-dnl do not support nested variable expansions.
4283-dnl See automake bug#9928 and bug#10237.
4284-am_make=${MAKE-make}
4285-AC_CACHE_CHECK([whether $am_make supports nested variables],
4286- [am_cv_make_support_nested_variables],
4287- [if AS_ECHO([['TRUE=$(BAR$(V))
4288-BAR0=false
4289-BAR1=true
4290-V=1
4291-am__doit:
4292- @$(TRUE)
4293-.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
4294- am_cv_make_support_nested_variables=yes
4295-else
4296- am_cv_make_support_nested_variables=no
4297-fi])
4298-if test $am_cv_make_support_nested_variables = yes; then
4299- dnl Using '$V' instead of '$(V)' breaks IRIX make.
4300- AM_V='$(V)'
4301- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4302-else
4303- AM_V=$AM_DEFAULT_VERBOSITY
4304- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4305-fi
4306-AC_SUBST([AM_V])dnl
4307-AM_SUBST_NOTMAKE([AM_V])dnl
4308-AC_SUBST([AM_DEFAULT_V])dnl
4309-AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
4310-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
4311-AM_BACKSLASH='\'
4312-AC_SUBST([AM_BACKSLASH])dnl
4313-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
4314-])
4315-
4316-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
4317-#
4318-# This file is free software; the Free Software Foundation
4319-# gives unlimited permission to copy and/or distribute it,
4320-# with or without modifications, as long as this notice is preserved.
4321-
4322-# serial 2
4323-
4324-# AM_PROG_INSTALL_STRIP
4325-# ---------------------
4326-# One issue with vendor 'install' (even GNU) is that you can't
4327-# specify the program used to strip binaries. This is especially
4328-# annoying in cross-compiling environments, where the build's strip
4329-# is unlikely to handle the host's binaries.
4330-# Fortunately install-sh will honor a STRIPPROG variable, so we
4331-# always use install-sh in "make install-strip", and initialize
4332-# STRIPPROG with the value of the STRIP variable (set by the user).
4333-AC_DEFUN([AM_PROG_INSTALL_STRIP],
4334-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4335-# Installed binaries are usually stripped using 'strip' when the user
4336-# run "make install-strip". However 'strip' might not be the right
4337-# tool to use in cross-compilation environments, therefore Automake
4338-# will honor the 'STRIP' environment variable to overrule this program.
4339-dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
4340-if test "$cross_compiling" != no; then
4341- AC_CHECK_TOOL([STRIP], [strip], :)
4342-fi
4343-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4344-AC_SUBST([INSTALL_STRIP_PROGRAM])])
4345-
4346-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
4347-#
4348-# This file is free software; the Free Software Foundation
4349-# gives unlimited permission to copy and/or distribute it,
4350-# with or without modifications, as long as this notice is preserved.
4351-
4352-# serial 3
4353-
4354-# _AM_SUBST_NOTMAKE(VARIABLE)
4355-# ---------------------------
4356-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
4357-# This macro is traced by Automake.
4358-AC_DEFUN([_AM_SUBST_NOTMAKE])
4359-
4360-# AM_SUBST_NOTMAKE(VARIABLE)
4361-# --------------------------
4362-# Public sister of _AM_SUBST_NOTMAKE.
4363-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
4364-
4365-# Check how to create a tarball. -*- Autoconf -*-
4366-
4367-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
4368-#
4369-# This file is free software; the Free Software Foundation
4370-# gives unlimited permission to copy and/or distribute it,
4371-# with or without modifications, as long as this notice is preserved.
4372-
4373-# serial 3
4374-
4375-# _AM_PROG_TAR(FORMAT)
4376-# --------------------
4377-# Check how to create a tarball in format FORMAT.
4378-# FORMAT should be one of 'v7', 'ustar', or 'pax'.
4379-#
4380-# Substitute a variable $(am__tar) that is a command
4381-# writing to stdout a FORMAT-tarball containing the directory
4382-# $tardir.
4383-# tardir=directory && $(am__tar) > result.tar
4384-#
4385-# Substitute a variable $(am__untar) that extract such
4386-# a tarball read from stdin.
4387-# $(am__untar) < result.tar
4388-AC_DEFUN([_AM_PROG_TAR],
4389-[# Always define AMTAR for backward compatibility. Yes, it's still used
4390-# in the wild :-( We should find a proper way to deprecate it ...
4391-AC_SUBST([AMTAR], ['$${TAR-tar}'])
4392-m4_if([$1], [v7],
4393- [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
4394- [m4_case([$1], [ustar],, [pax],,
4395- [m4_fatal([Unknown tar format])])
4396-AC_MSG_CHECKING([how to create a $1 tar archive])
4397-# Loop over all known methods to create a tar archive until one works.
4398-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
4399-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
4400-# Do not fold the above two line into one, because Tru64 sh and
4401-# Solaris sh will not grok spaces in the rhs of '-'.
4402-for _am_tool in $_am_tools
4403-do
4404- case $_am_tool in
4405- gnutar)
4406- for _am_tar in tar gnutar gtar;
4407- do
4408- AM_RUN_LOG([$_am_tar --version]) && break
4409- done
4410- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
4411- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
4412- am__untar="$_am_tar -xf -"
4413- ;;
4414- plaintar)
4415- # Must skip GNU tar: if it does not support --format= it doesn't create
4416- # ustar tarball either.
4417- (tar --version) >/dev/null 2>&1 && continue
4418- am__tar='tar chf - "$$tardir"'
4419- am__tar_='tar chf - "$tardir"'
4420- am__untar='tar xf -'
4421- ;;
4422- pax)
4423- am__tar='pax -L -x $1 -w "$$tardir"'
4424- am__tar_='pax -L -x $1 -w "$tardir"'
4425- am__untar='pax -r'
4426- ;;
4427- cpio)
4428- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
4429- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
4430- am__untar='cpio -i -H $1 -d'
4431- ;;
4432- none)
4433- am__tar=false
4434- am__tar_=false
4435- am__untar=false
4436- ;;
4437- esac
4438-
4439- # If the value was cached, stop now. We just wanted to have am__tar
4440- # and am__untar set.
4441- test -n "${am_cv_prog_tar_$1}" && break
4442-
4443- # tar/untar a dummy directory, and stop if the command works
4444- rm -rf conftest.dir
4445- mkdir conftest.dir
4446- echo GrepMe > conftest.dir/file
4447- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
4448- rm -rf conftest.dir
4449- if test -s conftest.tar; then
4450- AM_RUN_LOG([$am__untar <conftest.tar])
4451- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4452- fi
4453-done
4454-rm -rf conftest.dir
4455-
4456-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
4457-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
4458-AC_SUBST([am__tar])
4459-AC_SUBST([am__untar])
4460-]) # _AM_PROG_TAR
4461-
4462-m4_include([m4/ac_pkg_cython.m4])
4463-m4_include([m4/ac_python_devel.m4])
4464-m4_include([m4/as-compiler-flag.m4])
4465-m4_include([m4/cython_python.m4])
4466-m4_include([m4/libtool.m4])
4467-m4_include([m4/ltoptions.m4])
4468-m4_include([m4/ltsugar.m4])
4469-m4_include([m4/ltversion.m4])
4470-m4_include([m4/lt~obsolete.m4])
4471
4472=== added file 'autogen.sh'
4473--- autogen.sh 1970-01-01 00:00:00 +0000
4474+++ autogen.sh 2014-03-14 06:45:31 +0000
4475@@ -0,0 +1,15 @@
4476+#!/bin/sh
4477+gprefix=`which glibtoolize 2>&1 >/dev/null`
4478+if [ $? -eq 0 ]; then
4479+ glibtoolize --force
4480+else
4481+ libtoolize --force
4482+fi
4483+aclocal -I m4
4484+autoheader
4485+automake --add-missing
4486+autoconf
4487+
4488+if [ -z "$NOCONFIGURE" ]; then
4489+ ./configure "$@"
4490+fi
4491
4492=== added directory 'common'
4493=== added file 'common/Makefile.am'
4494--- common/Makefile.am 1970-01-01 00:00:00 +0000
4495+++ common/Makefile.am 2014-03-14 06:45:31 +0000
4496@@ -0,0 +1,18 @@
4497+AM_CPPFLAGS = -I$(top_srcdir)/include
4498+
4499+AM_CFLAGS = $(GLOBAL_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS)
4500+AM_LDFLAGS = $(libplist_LIBS) ${libpthread_LIBS}
4501+
4502+noinst_LTLIBRARIES = libinternalcommon.la
4503+libinternalcommon_la_LIBADD =
4504+libinternalcommon_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined
4505+libinternalcommon_la_SOURCES = \
4506+ socket.c socket.h \
4507+ thread.c thread.h \
4508+ debug.c debug.h \
4509+ userpref.c userpref.h \
4510+ utils.c utils.h
4511+
4512+if WIN32
4513+libinternalcommon_la_LIBADD += -lole32
4514+endif
4515
4516=== added file 'common/debug.c'
4517--- common/debug.c 1970-01-01 00:00:00 +0000
4518+++ common/debug.c 2014-03-14 06:45:31 +0000
4519@@ -0,0 +1,169 @@
4520+/*
4521+ * debug.c
4522+ * contains utilitary functions for debugging
4523+ *
4524+ * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
4525+ * Copyright (c) 2010 Martin S. All Rights Reserved.
4526+ *
4527+ * This library is free software; you can redistribute it and/or
4528+ * modify it under the terms of the GNU Lesser General Public
4529+ * License as published by the Free Software Foundation; either
4530+ * version 2.1 of the License, or (at your option) any later version.
4531+ *
4532+ * This library is distributed in the hope that it will be useful,
4533+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4534+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4535+ * Lesser General Public License for more details.
4536+ *
4537+ * You should have received a copy of the GNU Lesser General Public
4538+ * License along with this library; if not, write to the Free Software
4539+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4540+ */
4541+
4542+#ifdef HAVE_CONFIG_H
4543+#include <config.h>
4544+#endif
4545+#include <stdarg.h>
4546+#define _GNU_SOURCE 1
4547+#define __USE_GNU 1
4548+#include <stdio.h>
4549+#include <stdint.h>
4550+#include <stdlib.h>
4551+#include <time.h>
4552+
4553+#include "debug.h"
4554+#include "libimobiledevice/libimobiledevice.h"
4555+
4556+#ifndef STRIP_DEBUG_CODE
4557+#include "asprintf.h"
4558+#endif
4559+
4560+int debug_level = 0;
4561+
4562+/**
4563+ * Sets the level of debugging. Currently the only acceptable values are 0 and
4564+ * 1.
4565+ *
4566+ * @param level Set to 0 for no debugging or 1 for debugging.
4567+ */
4568+void idevice_set_debug_level(int level)
4569+{
4570+ debug_level = level;
4571+}
4572+
4573+#ifndef STRIP_DEBUG_CODE
4574+static void debug_print_line(const char *func, const char *file, int line, const char *buffer)
4575+{
4576+ char *str_time = NULL;
4577+ char *header = NULL;
4578+ time_t the_time;
4579+
4580+ time(&the_time);
4581+ str_time = (char*)malloc(255);
4582+ strftime(str_time, 254, "%H:%M:%S", localtime (&the_time));
4583+
4584+ /* generate header text */
4585+ (void)asprintf(&header, "%s %s:%d %s()", str_time, file, line, func);
4586+ free (str_time);
4587+
4588+ /* trim ending newlines */
4589+
4590+ /* print header */
4591+ printf ("%s: ", header);
4592+
4593+ /* print actual debug content */
4594+ printf ("%s\n", buffer);
4595+
4596+ /* flush this output, as we need to debug */
4597+ fflush (stdout);
4598+
4599+ free (header);
4600+}
4601+#endif
4602+
4603+void debug_info_real(const char *func, const char *file, int line, const char *format, ...)
4604+{
4605+#ifndef STRIP_DEBUG_CODE
4606+ va_list args;
4607+ char *buffer = NULL;
4608+
4609+ if (!debug_level)
4610+ return;
4611+
4612+ /* run the real fprintf */
4613+ va_start(args, format);
4614+ (void)vasprintf(&buffer, format, args);
4615+ va_end(args);
4616+
4617+ debug_print_line(func, file, line, buffer);
4618+
4619+ free(buffer);
4620+#endif
4621+}
4622+
4623+void debug_buffer(const char *data, const int length)
4624+{
4625+#ifndef STRIP_DEBUG_CODE
4626+ int i;
4627+ int j;
4628+ unsigned char c;
4629+
4630+ if (debug_level) {
4631+ for (i = 0; i < length; i += 16) {
4632+ fprintf(stderr, "%04x: ", i);
4633+ for (j = 0; j < 16; j++) {
4634+ if (i + j >= length) {
4635+ fprintf(stderr, " ");
4636+ continue;
4637+ }
4638+ fprintf(stderr, "%02x ", *(data + i + j) & 0xff);
4639+ }
4640+ fprintf(stderr, " | ");
4641+ for (j = 0; j < 16; j++) {
4642+ if (i + j >= length)
4643+ break;
4644+ c = *(data + i + j);
4645+ if ((c < 32) || (c > 127)) {
4646+ fprintf(stderr, ".");
4647+ continue;
4648+ }
4649+ fprintf(stderr, "%c", c);
4650+ }
4651+ fprintf(stderr, "\n");
4652+ }
4653+ fprintf(stderr, "\n");
4654+ }
4655+#endif
4656+}
4657+
4658+void debug_buffer_to_file(const char *file, const char *data, const int length)
4659+{
4660+#ifndef STRIP_DEBUG_CODE
4661+ if (debug_level) {
4662+ FILE *f = fopen(file, "wb");
4663+ fwrite(data, 1, length, f);
4664+ fflush(f);
4665+ fclose(f);
4666+ }
4667+#endif
4668+}
4669+
4670+void debug_plist_real(const char *func, const char *file, int line, plist_t plist)
4671+{
4672+#ifndef STRIP_DEBUG_CODE
4673+ if (!plist)
4674+ return;
4675+
4676+ char *buffer = NULL;
4677+ uint32_t length = 0;
4678+ plist_to_xml(plist, &buffer, &length);
4679+
4680+ /* get rid of ending newline as one is already added in the debug line */
4681+ if (buffer[length-1] == '\n')
4682+ buffer[length-1] = '\0';
4683+
4684+ debug_info_real(func, file, line, "printing %i bytes plist:\n%s", length, buffer);
4685+ free(buffer);
4686+#endif
4687+}
4688+
4689
4690=== added file 'common/debug.h'
4691--- common/debug.h 1970-01-01 00:00:00 +0000
4692+++ common/debug.h 2014-03-14 06:45:31 +0000
4693@@ -0,0 +1,59 @@
4694+/*
4695+ * debug.h
4696+ * contains utilitary functions for debugging
4697+ *
4698+ * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
4699+ * Copyright (c) 2010 Martin S. All Rights Reserved.
4700+ *
4701+ * This library is free software; you can redistribute it and/or
4702+ * modify it under the terms of the GNU Lesser General Public
4703+ * License as published by the Free Software Foundation; either
4704+ * version 2.1 of the License, or (at your option) any later version.
4705+ *
4706+ * This library is distributed in the hope that it will be useful,
4707+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4708+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4709+ * Lesser General Public License for more details.
4710+ *
4711+ * You should have received a copy of the GNU Lesser General Public
4712+ * License along with this library; if not, write to the Free Software
4713+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4714+ */
4715+
4716+#ifndef __DEBUG_H
4717+#define __DEBUG_H
4718+
4719+#include <plist/plist.h>
4720+
4721+#ifndef LIBIMOBILEDEVICE_INTERNAL
4722+#ifdef WIN32
4723+#define LIBIMOBILEDEVICE_INTERNAL
4724+#else
4725+#define LIBIMOBILEDEVICE_INTERNAL __attribute__((visibility("hidden")))
4726+#endif
4727+#endif
4728+
4729+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(STRIP_DEBUG_CODE)
4730+#define debug_info(...) debug_info_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
4731+#define debug_plist(a) debug_plist_real (__func__, __FILE__, __LINE__, a)
4732+#elif defined(__GNUC__) && __GNUC__ >= 3 && !defined(STRIP_DEBUG_CODE)
4733+#define debug_info(...) debug_info_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
4734+#define debug_plist(a) debug_plist_real (__FUNCTION__, __FILE__, __LINE__, a)
4735+#else
4736+#define debug_info(...)
4737+#define debug_plist(a)
4738+#endif
4739+
4740+LIBIMOBILEDEVICE_INTERNAL void debug_info_real(const char *func,
4741+ const char *file,
4742+ int line,
4743+ const char *format, ...);
4744+
4745+LIBIMOBILEDEVICE_INTERNAL void debug_buffer(const char *data, const int length);
4746+LIBIMOBILEDEVICE_INTERNAL void debug_buffer_to_file(const char *file, const char *data, const int length);
4747+LIBIMOBILEDEVICE_INTERNAL void debug_plist_real(const char *func,
4748+ const char *file,
4749+ int line,
4750+ plist_t plist);
4751+
4752+#endif
4753
4754=== added file 'common/socket.c'
4755--- common/socket.c 1970-01-01 00:00:00 +0000
4756+++ common/socket.c 2014-03-14 06:45:31 +0000
4757@@ -0,0 +1,392 @@
4758+/*
4759+ * socket.c
4760+ *
4761+ * Copyright (c) 2012 Martin Szulecki All Rights Reserved.
4762+ * Copyright (c) 2012 Nikias Bassen All Rights Reserved.
4763+ *
4764+ * This library is free software; you can redistribute it and/or
4765+ * modify it under the terms of the GNU Lesser General Public
4766+ * License as published by the Free Software Foundation; either
4767+ * version 2.1 of the License, or (at your option) any later version.
4768+ *
4769+ * This library is distributed in the hope that it will be useful,
4770+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4771+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4772+ * Lesser General Public License for more details.
4773+ *
4774+ * You should have received a copy of the GNU Lesser General Public
4775+ * License along with this library; if not, write to the Free Software
4776+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4777+ */
4778+
4779+#include <stdio.h>
4780+#include <stddef.h>
4781+#include <stdlib.h>
4782+#include <string.h>
4783+#include <unistd.h>
4784+#include <errno.h>
4785+#include <sys/time.h>
4786+#include <sys/stat.h>
4787+#ifdef WIN32
4788+#include <winsock2.h>
4789+#include <windows.h>
4790+static int wsa_init = 0;
4791+#else
4792+#include <sys/socket.h>
4793+#include <sys/un.h>
4794+#include <netinet/in.h>
4795+#include <netdb.h>
4796+#include <arpa/inet.h>
4797+#endif
4798+#include "socket.h"
4799+
4800+#define RECV_TIMEOUT 20000
4801+
4802+static int verbose = 0;
4803+
4804+void socket_set_verbose(int level)
4805+{
4806+ verbose = level;
4807+}
4808+
4809+#ifndef WIN32
4810+int socket_create_unix(const char *filename)
4811+{
4812+ struct sockaddr_un name;
4813+ int sock;
4814+ size_t size;
4815+
4816+ // remove if still present
4817+ unlink(filename);
4818+
4819+ /* Create the socket. */
4820+ sock = socket(PF_LOCAL, SOCK_STREAM, 0);
4821+ if (sock < 0) {
4822+ perror("socket");
4823+ return -1;
4824+ }
4825+
4826+ /* Bind a name to the socket. */
4827+ name.sun_family = AF_LOCAL;
4828+ strncpy(name.sun_path, filename, sizeof(name.sun_path));
4829+ name.sun_path[sizeof(name.sun_path) - 1] = '\0';
4830+
4831+ /* The size of the address is
4832+ the offset of the start of the filename,
4833+ plus its length,
4834+ plus one for the terminating null byte.
4835+ Alternatively you can just do:
4836+ size = SUN_LEN (&name);
4837+ */
4838+ size = (offsetof(struct sockaddr_un, sun_path)
4839+ + strlen(name.sun_path) + 1);
4840+
4841+ if (bind(sock, (struct sockaddr *) &name, size) < 0) {
4842+ perror("bind");
4843+ socket_close(sock);
4844+ return -1;
4845+ }
4846+
4847+ if (listen(sock, 10) < 0) {
4848+ perror("listen");
4849+ socket_close(sock);
4850+ return -1;
4851+ }
4852+
4853+ return sock;
4854+}
4855+
4856+int socket_connect_unix(const char *filename)
4857+{
4858+ struct sockaddr_un name;
4859+ int sfd = -1;
4860+ size_t size;
4861+ struct stat fst;
4862+
4863+ // check if socket file exists...
4864+ if (stat(filename, &fst) != 0) {
4865+ if (verbose >= 2)
4866+ fprintf(stderr, "%s: stat '%s': %s\n", __func__, filename,
4867+ strerror(errno));
4868+ return -1;
4869+ }
4870+ // ... and if it is a unix domain socket
4871+ if (!S_ISSOCK(fst.st_mode)) {
4872+ if (verbose >= 2)
4873+ fprintf(stderr, "%s: File '%s' is not a socket!\n", __func__,
4874+ filename);
4875+ return -1;
4876+ }
4877+ // make a new socket
4878+ if ((sfd = socket(PF_LOCAL, SOCK_STREAM, 0)) < 0) {
4879+ if (verbose >= 2)
4880+ fprintf(stderr, "%s: socket: %s\n", __func__, strerror(errno));
4881+ return -1;
4882+ }
4883+ // and connect to 'filename'
4884+ name.sun_family = AF_LOCAL;
4885+ strncpy(name.sun_path, filename, sizeof(name.sun_path));
4886+ name.sun_path[sizeof(name.sun_path) - 1] = 0;
4887+
4888+ size = (offsetof(struct sockaddr_un, sun_path)
4889+ + strlen(name.sun_path) + 1);
4890+
4891+ if (connect(sfd, (struct sockaddr *) &name, size) < 0) {
4892+ socket_close(sfd);
4893+ if (verbose >= 2)
4894+ fprintf(stderr, "%s: connect: %s\n", __func__,
4895+ strerror(errno));
4896+ return -1;
4897+ }
4898+
4899+ return sfd;
4900+}
4901+#endif
4902+
4903+int socket_create(uint16_t port)
4904+{
4905+ int sfd = -1;
4906+ int yes = 1;
4907+#ifdef WIN32
4908+ WSADATA wsa_data;
4909+ if (!wsa_init) {
4910+ if (WSAStartup(MAKEWORD(2,2), &wsa_data) != ERROR_SUCCESS) {
4911+ fprintf(stderr, "WSAStartup failed!\n");
4912+ ExitProcess(-1);
4913+ }
4914+ wsa_init = 1;
4915+ }
4916+#endif
4917+ struct sockaddr_in saddr;
4918+
4919+ if (0 > (sfd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP))) {
4920+ perror("socket()");
4921+ return -1;
4922+ }
4923+
4924+ if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void*)&yes, sizeof(int)) == -1) {
4925+ perror("setsockopt()");
4926+ socket_close(sfd);
4927+ return -1;
4928+ }
4929+
4930+ memset((void *) &saddr, 0, sizeof(saddr));
4931+ saddr.sin_family = AF_INET;
4932+ saddr.sin_addr.s_addr = htonl(INADDR_ANY);
4933+ saddr.sin_port = htons(port);
4934+
4935+ if (0 > bind(sfd, (struct sockaddr *) &saddr, sizeof(saddr))) {
4936+ perror("bind()");
4937+ socket_close(sfd);
4938+ return -1;
4939+ }
4940+
4941+ if (listen(sfd, 1) == -1) {
4942+ perror("listen()");
4943+ socket_close(sfd);
4944+ return -1;
4945+ }
4946+
4947+ return sfd;
4948+}
4949+
4950+int socket_connect(const char *addr, uint16_t port)
4951+{
4952+ int sfd = -1;
4953+ int yes = 1;
4954+ struct hostent *hp;
4955+ struct sockaddr_in saddr;
4956+#ifdef WIN32
4957+ WSADATA wsa_data;
4958+ if (!wsa_init) {
4959+ if (WSAStartup(MAKEWORD(2,2), &wsa_data) != ERROR_SUCCESS) {
4960+ fprintf(stderr, "WSAStartup failed!\n");
4961+ ExitProcess(-1);
4962+ }
4963+ wsa_init = 1;
4964+ }
4965+#endif
4966+
4967+ if (!addr) {
4968+ errno = EINVAL;
4969+ return -1;
4970+ }
4971+
4972+ if ((hp = gethostbyname(addr)) == NULL) {
4973+ if (verbose >= 2)
4974+ fprintf(stderr, "%s: unknown host '%s'\n", __func__, addr);
4975+ return -1;
4976+ }
4977+
4978+ if (!hp->h_addr) {
4979+ if (verbose >= 2)
4980+ fprintf(stderr, "%s: gethostbyname returned NULL address!\n",
4981+ __func__);
4982+ return -1;
4983+ }
4984+
4985+ if (0 > (sfd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP))) {
4986+ perror("socket()");
4987+ return -1;
4988+ }
4989+
4990+ if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void*)&yes, sizeof(int)) == -1) {
4991+ perror("setsockopt()");
4992+ socket_close(sfd);
4993+ return -1;
4994+ }
4995+
4996+ memset((void *) &saddr, 0, sizeof(saddr));
4997+ saddr.sin_family = AF_INET;
4998+ saddr.sin_addr.s_addr = *(uint32_t *) hp->h_addr;
4999+ saddr.sin_port = htons(port);
5000+
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: