AC_INIT([zlib],[1.3.1],[https://github.com/madler/zlib/issues](https://github.com/madler/zlib/issues)) AC_CONFIG_SRCDIR([zlib.h]) #AC_CONFIG_HEADERS([zconf.h]) AM_INIT_AUTOMAKE([foreign subdir-objects no-dist-gzip dist-xz]) AC_PROG_CC AM_PROG_AR LT_INIT([disable-static]) dnl ou [dlopen] etc. selon ton besoin # Options usuelles AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared],[build shared libz (default=yes)])], [], [enable_shared=yes]) AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static],[build static libz (default=yes)])], [], [enable_static=yes]) # Tests de headers / fonctions inspirés du configure existant AC_CHECK_HEADERS([unistd.h stdarg.h]) AC_CHECK_FUNCS([fseeko snprintf vsnprintf strerror]) # Tu peux ajouter des checks pour types (off64_t, etc.) AC_CHECK_TYPES([off64_t],[],[],[[#include ]]) AM_CONDITIONAL([COND_DEMOS], [test "x$enable_demos" = "xyes"]) AM_CONDITIONAL([WIN32], [test "x$host_os" = "xmingw32" -o "x$host_os" = "xcygwin"]) AM_CONDITIONAL([BUILD_SHARED], [test "x$enable_shared" = "xyes"]) AM_CONDITIONAL([BUILD_STATIC], [test "x$enable_static" = "xyes"]) sharedlibdir='${libdir}' dnl valeur par défaut AC_ARG_WITH([sharedlibdir], [AS_HELP_STRING([--with-sharedlibdir=DIR], [Directory for runtime shared libraries])], [sharedlibdir="$withval"], []) dnl si non fourni, on garde '${libdir}' AC_SUBST([sharedlibdir]) AC_CONFIG_FILES([ Makefile contrib/minizip/Makefile contrib/minizip/minizip.pc zlib.pc ]) AC_OUTPUT