diff options
| author | 2009-12-06 10:36:14 +0100 | |
|---|---|---|
| committer | 2009-12-06 13:58:40 -0800 | |
| commit | 3bb7d9596e9b852b2e13185386cc0b71c952e84d (patch) | |
| tree | 31dee21d6b27d8b626aebeaf5650db0fffda4d53 /configure.ac | |
| parent | 15b9f3451e20ccb4f9c6cdadc0dd75bc72246360 (diff) | |
| download | libimobiledevice-3bb7d9596e9b852b2e13185386cc0b71c952e84d.tar.gz libimobiledevice-3bb7d9596e9b852b2e13185386cc0b71c952e84d.tar.bz2 | |
Updated autofoo stuff; swig is now optional and can be disabled.
Use --without-swig to prevent building the swig extensions even if swig
is installed.
[#93 state:resolved]
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 7c59171..32a55f7 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -46,6 +46,24 @@ AC_FUNC_MALLOC | |||
| 46 | AC_FUNC_REALLOC | 46 | AC_FUNC_REALLOC |
| 47 | AC_CHECK_FUNCS([strcasecmp strdup strerror strndup]) | 47 | AC_CHECK_FUNCS([strcasecmp strdup strerror strndup]) |
| 48 | 48 | ||
| 49 | python_bindings=yes | ||
| 50 | AC_ARG_WITH([swig], | ||
| 51 | [AS_HELP_STRING([--without-swig], | ||
| 52 | [build Python bindings using swig (default is yes)])], | ||
| 53 | [build_swig=false], | ||
| 54 | [build_swig=true]) | ||
| 55 | if test "$build_swig" = "true" -a "$SWIG" != "false" ; then | ||
| 56 | SWIG_SUB=swig | ||
| 57 | else | ||
| 58 | SWIG_SUB= | ||
| 59 | python_bindings=no | ||
| 60 | fi | ||
| 61 | |||
| 62 | AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG_SUB" = "xswig"]) | ||
| 63 | |||
| 64 | AC_SUBST([DEV_SUB]) | ||
| 65 | |||
| 66 | |||
| 49 | AC_ARG_ENABLE([dev-tools], | 67 | AC_ARG_ENABLE([dev-tools], |
| 50 | [AS_HELP_STRING([--enable-dev-tools], | 68 | [AS_HELP_STRING([--enable-dev-tools], |
| 51 | [build development helper tools (default is no)])], | 69 | [build development helper tools (default is no)])], |
| @@ -57,8 +75,10 @@ if test "$build_dev_tools" = true; then | |||
| 57 | [], | 75 | [], |
| 58 | [AC_MSG_ERROR([Please install readline development headers])] | 76 | [AC_MSG_ERROR([Please install readline development headers])] |
| 59 | ) | 77 | ) |
| 78 | building_dev_tools=yes | ||
| 60 | else | 79 | else |
| 61 | DEV_SUB= | 80 | DEV_SUB= |
| 81 | building_dev_tools=no | ||
| 62 | fi | 82 | fi |
| 63 | 83 | ||
| 64 | AM_CONDITIONAL([ENABLE_DEVTOOLS],[test "x$DEV_SUB" = "xdev"]) | 84 | AM_CONDITIONAL([ENABLE_DEVTOOLS],[test "x$DEV_SUB" = "xdev"]) |
| @@ -71,7 +91,10 @@ AC_ARG_ENABLE([debug-code], | |||
| 71 | [no_debug_code=false], | 91 | [no_debug_code=false], |
| 72 | [no_debug_code=true]) | 92 | [no_debug_code=true]) |
| 73 | if test "$no_debug_code" = true; then | 93 | if test "$no_debug_code" = true; then |
| 94 | building_debug_code=no | ||
| 74 | AC_DEFINE(STRIP_DEBUG_CODE,1,[Strip debug reporting code]) | 95 | AC_DEFINE(STRIP_DEBUG_CODE,1,[Strip debug reporting code]) |
| 96 | else | ||
| 97 | building_debug_code=yes | ||
| 75 | fi | 98 | fi |
| 76 | 99 | ||
| 77 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter") | 100 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter") |
| @@ -106,4 +129,26 @@ AC_SUBST(LFS_CFLAGS) | |||
| 106 | 129 | ||
| 107 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | 130 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
| 108 | 131 | ||
| 109 | AC_OUTPUT(Makefile src/Makefile include/Makefile fdi/Makefile dev/Makefile tools/Makefile swig/Makefile libiphone-1.0.pc) | 132 | AC_OUTPUT([ |
| 133 | Makefile | ||
| 134 | src/Makefile | ||
| 135 | include/Makefile | ||
| 136 | fdi/Makefile | ||
| 137 | dev/Makefile | ||
| 138 | tools/Makefile | ||
| 139 | swig/Makefile | ||
| 140 | libiphone-1.0.pc | ||
| 141 | ]) | ||
| 142 | |||
| 143 | echo " | ||
| 144 | Configuration for $PACKAGE $VERSION: | ||
| 145 | ------------------------------------------- | ||
| 146 | |||
| 147 | Install prefix: .........: $prefix | ||
| 148 | Debug code ..............: $building_debug_code | ||
| 149 | Dev tools ...............: $building_dev_tools | ||
| 150 | Python bindings .........: $python_bindings | ||
| 151 | |||
| 152 | Now type 'make' to build $PACKAGE $VERSION, | ||
| 153 | and then 'make install' for installation. | ||
| 154 | " | ||
