diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am index b0f39b6..2ced913 100644 --- a/contrib/minizip/Makefile.am +++ b/contrib/minizip/Makefile.am @@ -1,5 +1,9 @@ lib_LTLIBRARIES = libminizip.la +if COND_DEMOS +bin_PROGRAMS = miniunzip minizip +endif + zlib_top_srcdir = $(top_srcdir)/../.. zlib_top_builddir = $(top_builddir)/../.. diff --git a/contrib/minizip/configure.ac b/contrib/minizip/configure.ac index 4799cdc..53adbb8 100644 --- a/contrib/minizip/configure.ac +++ b/contrib/minizip/configure.ac @@ -6,6 +6,16 @@ AC_CONFIG_SRCDIR([minizip.c]) AM_INIT_AUTOMAKE([foreign]) LT_INIT +AC_MSG_CHECKING([whether to build example programs]) +AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs])) +AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes]) +if test "$enable_demos" = yes +then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + AC_SUBST([HAVE_UNISTD_H], [0]) AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) AC_CONFIG_FILES([Makefile minizip.pc])