forked from tihmstar/libpatchfinder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautogen.sh
executable file
·39 lines (31 loc) · 907 Bytes
/
autogen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
gprefix=`which glibtoolize 2>&1 >/dev/null`
if [ $? -eq 0 ]; then
glibtoolize --force
else
libtoolize --force
fi
aclocal -I m4
autoconf
autoheader
automake --add-missing
SYSROOT="$(xcrun --show-sdk-path --sdk iphoneos)"
export CFLAGS+="-arch arm64 -isysroot $SYSROOT -DIMG4TOOL_NOMAIN"
export CXXFLAGS+="-arch arm64 -isysroot $SYSROOT -DIMG4TOOL_NOMAIN"
# otherwise img4tool cant find libplist
CFLAGS+=" -I$PWD/external/libplist/include"
CXXFLAGS+=" -I$PWD/external/libplist/include"
export LDFLAGS+="-L$PWD/external/libplist/src"
CONFIGURE_FLAGS="--enable-static --disable-shared\
--build=x86_64-apple-darwin`uname -r` \
--host=aarch64-apple-darwin \
--without-cython --without-openssl \
--without-lzfse \
$@"
SUBDIRS="external/libplist external/img4tool"
for SUB in $SUBDIRS; do
pushd $SUB
./autogen.sh $CONFIGURE_FLAGS
popd
done
./configure $CONFIGURE_FLAGS