2
# Process this file with autoconf to produce a configure script.
5
AC_INIT(libimobiledevice, 0.9.7, nospam@nowhere.com)
6
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip])
7
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
8
AC_CONFIG_SRCDIR([src/])
9
AC_CONFIG_HEADERS([config.h])
10
AC_CONFIG_MACRO_DIR([m4])
17
dnl libtool versioning
18
# +1 : 0 : +1 == adds new functions to the interface
19
# +1 : 0 : 0 == changes or removes functions (changes include both
20
# changes to the signature and the semantic)
21
# ? :+1 : ? == just internal changes
22
# CURRENT : REVISION : AGE
23
LIBIMOBILEDEVICE_SO_VERSION=0:0:0
25
AC_SUBST(LIBIMOBILEDEVICE_SO_VERSION)
27
# Checks for programs.
32
# Checks for libraries.
33
PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4)
34
PKG_CHECK_MODULES(libglib2, glib-2.0 >= 2.14.1)
35
PKG_CHECK_MODULES(libgthread2, gthread-2.0 >= 2.14.1)
36
PKG_CHECK_MODULES(libgnutls, gnutls >= 1.6.3 )
37
PKG_CHECK_MODULES(libtasn1, libtasn1 >= 1.1)
38
PKG_CHECK_MODULES(libplist, libplist >= 0.15)
39
PKG_CHECK_MODULES(libplistmm, libplist++ >= 0.15)
40
AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], ["libgcrypt is required to build libimobiledevice"])
42
# Checks for header files.
44
AC_CHECK_HEADERS([arpa/inet.h stdint.h stdlib.h string.h gcrypt.h])
46
# Checks for typedefs, structures, and compiler characteristics.
54
# Checks for library functions.
57
AC_CHECK_FUNCS([strcasecmp strdup strerror strndup])
61
[AS_HELP_STRING([--without-swig],
62
[build Python bindings using swig (default is yes)])],
65
if test "$build_swig" = "true" -a "$SWIG" != "false" ; then
72
AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG_SUB" = "xswig"])
77
AC_ARG_ENABLE([dev-tools],
78
[AS_HELP_STRING([--enable-dev-tools],
79
[build development helper tools (default is no)])],
80
[build_dev_tools=true],
81
[build_dev_tools=false])
82
if test "$build_dev_tools" = true; then
84
AC_CHECK_HEADERS([readline/readline.h],
86
[AC_MSG_ERROR([Please install readline development headers])]
88
building_dev_tools=yes
94
AM_CONDITIONAL([ENABLE_DEVTOOLS],[test "x$DEV_SUB" = "xdev"])
98
AC_ARG_ENABLE([debug-code],
99
[AS_HELP_STRING([--disable-debug-code],
100
[disable debug message reporting in library (default is yes)])],
101
[no_debug_code=false],
102
[no_debug_code=true])
103
if test "$no_debug_code" = true; then
104
building_debug_code=no
105
AC_DEFINE(STRIP_DEBUG_CODE,1,[Strip debug reporting code])
107
building_debug_code=yes
110
AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter")
111
AC_SUBST(GLOBAL_CFLAGS)
113
# check for large file support
116
if test "$enable_largefile" != no; then
117
if test "$ac_cv_sys_file_offset_bits" != 'no'; then
118
LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
120
AC_MSG_CHECKING(for native large file support)
121
AC_RUN_IFELSE([#include <unistd.h>
122
int main (int argc, char **argv)
124
exit(!(sizeof(off_t) == 8));
126
[ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
130
if test "$ac_cv_sys_large_files" != 'no'; then
131
LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=1"
134
if test "$ac_cv_sys_largefile_source" != 'no'; then
135
LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=1"
140
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
150
libimobiledevice-1.0.pc
154
Configuration for $PACKAGE $VERSION:
155
-------------------------------------------
157
Install prefix: .........: $prefix
158
Debug code ..............: $building_debug_code
159
Dev tools ...............: $building_dev_tools
160
Python bindings .........: $python_bindings
162
Now type 'make' to build $PACKAGE $VERSION,
163
and then 'make install' for installation.