diff options
author | 2023-10-06 21:10:09 -0400 | |
---|---|---|
committer | 2023-11-03 18:34:27 +0100 | |
commit | f2a166b01445fe412b5bff1b71256aebd62d1fcb (patch) | |
tree | eff09c449572a4302a13d816e7ad9cb5b5112ca4 | |
parent | 74499fe02f43a7b289a7cc62932d215899b20ad2 (diff) | |
download | libirecovery-f2a166b01445fe412b5bff1b71256aebd62d1fcb.tar.gz libirecovery-f2a166b01445fe412b5bff1b71256aebd62d1fcb.tar.bz2 |
Allow building --without-tools
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | tools/Makefile.am | 2 |
2 files changed, 15 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index e15231f..2b12d8f 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -47,11 +47,6 @@ AC_TYPE_UINT8_T | |||
47 | # Checks for library functions. | 47 | # Checks for library functions. |
48 | AC_CHECK_FUNCS([strdup strerror strcasecmp strndup malloc realloc calloc]) | 48 | AC_CHECK_FUNCS([strdup strerror strcasecmp strndup malloc realloc calloc]) |
49 | 49 | ||
50 | # Checks for libraries. | ||
51 | AC_CHECK_HEADERS([readline/readline.h], [], | ||
52 | [AC_MSG_ERROR([Please install readline development headers])] | ||
53 | ) | ||
54 | |||
55 | # Check additional platform flags | 50 | # Check additional platform flags |
56 | AC_MSG_CHECKING([for platform-specific build settings]) | 51 | AC_MSG_CHECKING([for platform-specific build settings]) |
57 | case ${host_os} in | 52 | case ${host_os} in |
@@ -100,6 +95,19 @@ if test "$ac_cv_attribute_constructor" = "yes"; then | |||
100 | AC_DEFINE(HAVE_ATTRIBUTE_CONSTRUCTOR, 1, [Define if the C compiler supports constructor/destructor attributes]) | 95 | AC_DEFINE(HAVE_ATTRIBUTE_CONSTRUCTOR, 1, [Define if the C compiler supports constructor/destructor attributes]) |
101 | fi | 96 | fi |
102 | 97 | ||
98 | AC_ARG_WITH([tools], | ||
99 | [AS_HELP_STRING([--with-tools], [Build irecovery tools. (requires readline) [default=yes]])], | ||
100 | [], | ||
101 | [with_tools=yes]) | ||
102 | |||
103 | AS_IF([test "x$with_tools" = "xyes"], [ | ||
104 | AC_DEFINE(BUILD_TOOLS, 1, [Define if we are building irecovery tools]) | ||
105 | AC_CHECK_HEADERS([readline/readline.h], [], | ||
106 | [AC_MSG_ERROR([Please install readline development headers])] | ||
107 | )] | ||
108 | ) | ||
109 | AM_CONDITIONAL(BUILD_TOOLS, test "x$with_tools" = "xyes") | ||
110 | |||
103 | AC_ARG_WITH([dummy], | 111 | AC_ARG_WITH([dummy], |
104 | [AS_HELP_STRING([--with-dummy], [Use no USB driver at all [default=no]. This is only useful if you just want to query the device list by product type or hardware model. All other operations are no-ops or will return IRECV_E_UNSUPPORTED.])], | 112 | [AS_HELP_STRING([--with-dummy], [Use no USB driver at all [default=no]. This is only useful if you just want to query the device list by product type or hardware model. All other operations are no-ops or will return IRECV_E_UNSUPPORTED.])], |
105 | [], | 113 | [], |
diff --git a/tools/Makefile.am b/tools/Makefile.am index 03728b2..ebb085c 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am | |||
@@ -1,3 +1,4 @@ | |||
1 | if BUILD_TOOLS | ||
1 | AM_CPPFLAGS = -I$(top_srcdir)/include | 2 | AM_CPPFLAGS = -I$(top_srcdir)/include |
2 | 3 | ||
3 | AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusb_CFLAGS) | 4 | AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusb_CFLAGS) |
@@ -9,3 +10,4 @@ irecovery_SOURCES = irecovery.c | |||
9 | irecovery_CFLAGS = $(AM_CFLAGS) | 10 | irecovery_CFLAGS = $(AM_CFLAGS) |
10 | irecovery_LDFLAGS = $(AM_LDFLAGS) | 11 | irecovery_LDFLAGS = $(AM_LDFLAGS) |
11 | irecovery_LDADD = $(top_builddir)/src/libirecovery-1.0.la | 12 | irecovery_LDADD = $(top_builddir)/src/libirecovery-1.0.la |
13 | endif | ||