|
Packit Bot |
4c90e1 |
#!/bin/sh
|
|
Packit Bot |
4c90e1 |
#
|
|
Packit Bot |
4c90e1 |
# nghttp2 - HTTP/2 C Library
|
|
Packit Bot |
4c90e1 |
#
|
|
Packit Bot |
4c90e1 |
# Copyright (c) 2013 Tatsuhiro Tsujikawa
|
|
Packit Bot |
4c90e1 |
#
|
|
Packit Bot |
4c90e1 |
# Permission is hereby granted, free of charge, to any person obtaining
|
|
Packit Bot |
4c90e1 |
# a copy of this software and associated documentation files (the
|
|
Packit Bot |
4c90e1 |
# "Software"), to deal in the Software without restriction, including
|
|
Packit Bot |
4c90e1 |
# without limitation the rights to use, copy, modify, merge, publish,
|
|
Packit Bot |
4c90e1 |
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
Packit Bot |
4c90e1 |
# permit persons to whom the Software is furnished to do so, subject to
|
|
Packit Bot |
4c90e1 |
# the following conditions:
|
|
Packit Bot |
4c90e1 |
#
|
|
Packit Bot |
4c90e1 |
# The above copyright notice and this permission notice shall be
|
|
Packit Bot |
4c90e1 |
# included in all copies or substantial portions of the Software.
|
|
Packit Bot |
4c90e1 |
#
|
|
Packit Bot |
4c90e1 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
Packit Bot |
4c90e1 |
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
Packit Bot |
4c90e1 |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
Packit Bot |
4c90e1 |
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
Packit Bot |
4c90e1 |
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
Packit Bot |
4c90e1 |
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
Packit Bot |
4c90e1 |
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Packit Bot |
4c90e1 |
|
|
Packit Bot |
4c90e1 |
if [ -z "$ANDROID_HOME" ]; then
|
|
Packit Bot |
4c90e1 |
echo 'No $ANDROID_HOME specified.'
|
|
Packit Bot |
4c90e1 |
exit 1
|
|
Packit Bot |
4c90e1 |
fi
|
|
Packit Bot |
4c90e1 |
PREFIX="$ANDROID_HOME"/usr/local
|
|
Packit Bot |
4c90e1 |
TOOLCHAIN="$ANDROID_HOME"/toolchain
|
|
Packit Bot |
4c90e1 |
PATH="$TOOLCHAIN"/bin:"$PATH"
|
|
Packit Bot |
4c90e1 |
|
|
Packit Bot |
4c90e1 |
./configure \
|
|
Packit Bot |
4c90e1 |
--disable-shared \
|
|
Packit Bot |
4c90e1 |
--host=arm-linux-androideabi \
|
|
Packit Bot |
4c90e1 |
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
|
|
Packit Bot |
4c90e1 |
--with-xml-prefix="$PREFIX" \
|
|
Packit Bot |
4c90e1 |
--without-libxml2 \
|
|
Packit Bot |
4c90e1 |
--disable-python-bindings \
|
|
Packit Bot |
4c90e1 |
--disable-examples \
|
|
Packit Bot |
4c90e1 |
--disable-threads \
|
|
Packit Bot |
4c90e1 |
CC="$TOOLCHAIN"/bin/arm-linux-androideabi-clang \
|
|
Packit Bot |
4c90e1 |
CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-clang++ \
|
|
Packit Bot |
4c90e1 |
CPPFLAGS="-fPIE -I$PREFIX/include" \
|
|
Packit Bot |
4c90e1 |
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
|
Packit Bot |
4c90e1 |
LDFLAGS="-fPIE -pie -L$PREFIX/lib"
|