futurerestore/configure.ac

97 lines
2.6 KiB
Plaintext
Raw Normal View History

AC_PREREQ([2.69])
AC_INIT([futurerestore], m4_esyscmd([git rev-list --count HEAD | tr -d '\n']), [tihmstar@gmail.com])
2016-12-28 16:43:26 +00:00
AC_CANONICAL_SYSTEM
2016-12-31 15:19:05 +00:00
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
AC_DEFINE([VERSION_COMMIT_COUNT], "m4_esyscmd([git rev-list --count HEAD | tr -d '\n'])", [Git commit count])
AC_DEFINE([VERSION_COMMIT_SHA], "m4_esyscmd([git rev-parse HEAD | tr -d '\n'])", [Git commit sha])
AC_SUBST([VERSION_COMMIT_COUNT], ["m4_esyscmd([git rev-list --count HEAD | tr -d '\n'])"])
AC_SUBST([VERSION_COMMIT_SHA], ["m4_esyscmd([git rev-parse HEAD | tr -d '\n'])"])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
2016-12-31 15:19:05 +00:00
# Check for operating system
AC_MSG_CHECKING([whether we need platform-specific build settings])
case $host_os in
darwin* )
CXXFLAGS+=" -stdlib=libc++"
;;
esac
2016-12-28 16:43:26 +00:00
CFLAGS="-DIDEVICERESTORE_NOMAIN=1 -DTSSCHECKER_NOMAIN=1"
CXXFLAGS+=" -std=c++11"
CFLAGS+=" -std=c11"
2016-12-28 16:43:26 +00:00
AC_DEFUN([AX_UNPRECIOUS], [
m4_define([_AC_PRECIOUS_VARS], m4_bpatsubst(_AC_PRECIOUS_VARS, [$1], []))
2016-12-28 16:43:26 +00:00
])
AX_UNPRECIOUS([CFLAGS])
export CFLAGS
AC_CONFIG_SUBDIRS(external/idevicerestore external/tsschecker)
2016-12-28 16:43:26 +00:00
AC_CONFIG_SRCDIR([futurerestore])
2016-12-28 16:43:26 +00:00
PKG_CHECK_MODULES(libplist, libplist >= 1.12)
PKG_CHECK_MODULES(libzip, libzip >= 0.10)
PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.2.1)
PKG_CHECK_MODULES(libfragmentzip, libfragmentzip >= 1.0)
2016-12-31 15:26:31 +00:00
PKG_CHECK_MODULES(libirecovery, libirecovery >= 0.2.0)
PKG_CHECK_MODULES(libimg4tool, libimg4tool >= 158)
2016-12-28 16:43:26 +00:00
2017-06-02 18:07:10 +00:00
# Optional module libipatcher
AC_ARG_WITH([libipatcher],
[AS_HELP_STRING([--without-libipatcher],
[build with bundle-less odysseus support (default is yes)])],
[build_libipatcher=false],
[build_libipatcher=true])
PKG_PROG_PKG_CONFIG
2017-06-25 18:25:59 +00:00
LIBIPATCHER_FLAGS=$($PKG_CONFIG --cflags libipatcher)
2017-06-02 18:07:10 +00:00
if [test -z "$LIBIPATCHER_FLAGS"]; then
do_libipatcher=no
else
AC_MSG_CHECKING([for futurerestore libipatcher])
if test "$build_libipatcher" = "true"; then
2018-01-01 17:01:48 +00:00
PKG_CHECK_MODULES(libipatcher, libipatcher >= 47)
AC_DEFINE(HAVE_LIBIPATCHER, 1, [Define if you have libipatcher])
do_libipatcher=yes
2017-06-02 18:07:10 +00:00
else
do_libipatcher=no
fi
fi
AM_CONDITIONAL([HAVE_LIBIPATCHER],[test "x$do_libipatcher" = "xyes"])
AC_DEFINE(CUSTOM_LOGGING, 1, [required for futurerestore])
2017-06-02 18:07:10 +00:00
2016-12-28 16:43:26 +00:00
LT_INIT
AC_OUTPUT([
Makefile
futurerestore/Makefile
])
2017-06-02 18:07:10 +00:00
echo "
Configuration for $PACKAGE $VERSION:
-------------------------------------------
Install prefix ..........: $prefix
With libipatcher ........: $do_libipatcher
Now type 'make' to build $PACKAGE $VERSION,
and then 'make install' for installation.
"