- [[#include <sys/stat.h>]])
-
-AM_ICONV
-if test "x$am_cv_func_iconv" != "xyes"; then
- AC_MSG_ERROR([Cannot find the iconv() function.
- iconv() is used to convert between UTF-8 and UTF-16 encodings of WIM
- filenames and XML data. Wimlib cannot be compiled without it. iconv()
- is available in the latest version of glibc and sometimes in other
- libraries.])
-fi
-
-
-AC_ARG_WITH(pkgconfigdir,
- [ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
- [pkgconfigdir=$withval],
- [pkgconfigdir='${libdir}/pkgconfig'])
-AC_SUBST(pkgconfigdir)
-
-AC_CHECK_LIB([xml2], [xmlParseFile], [have_libxml=true],
- [AC_MSG_ERROR(["cannot find libxml2"])])
-LIBXML2_LDADD=`pkg-config libxml-2.0 --libs`
-LIBXML2_CFLAGS=`pkg-config libxml-2.0 --cflags`
-AC_SUBST([LIBXML2_LDADD], [$LIBXML2_LDADD])
-AC_SUBST([LIBXML2_CFLAGS], [$LIBXML2_CFLAGS])
-
-AC_MSG_CHECKING([whether to include debugging messages])
-AC_ARG_ENABLE([debug],
- AS_HELP_STRING([--enable-debug], [include lots of debugging messages]),
- [ENABLE_DEBUG=$enableval],
- [ENABLE_DEBUG=no]
- )
-AC_MSG_RESULT([$ENABLE_DEBUG])
-if test "x$ENABLE_DEBUG" = "xyes"; then
- AC_DEFINE([ENABLE_DEBUG], [1],
- [Define to 1 if including lots of debug messages.])
-fi
-
-AC_MSG_CHECKING([whether to include more debugging messages])
-AC_ARG_ENABLE([more_debug],
- AS_HELP_STRING([--enable-more-debug],
- [include even more debugging messages]),
- [ENABLE_MORE_DEBUG=$enableval],
- [ENABLE_MORE_DEBUG=no]
- )
-AC_MSG_RESULT([$ENABLE_MORE_DEBUG])
-if test "x$ENABLE_MORE_DEBUG" = "xyes"; then
- AC_DEFINE([ENABLE_MORE_DEBUG], [1],
- [Define to 1 if including even more debug messages.])
-fi
-
-AC_MSG_CHECKING([whether to include error messages])
-AC_ARG_ENABLE([error_messages],
- AS_HELP_STRING([--disable-error-messages],
- [do not compile in error messsages]),
- [ENABLE_ERROR_MESSAGES=$enableval],
- [ENABLE_ERROR_MESSAGES=yes]
- )
-AC_MSG_RESULT([$ENABLE_ERROR_MESSAGES])
-if test "x$ENABLE_ERROR_MESSAGES" = "xyes"; then
- AC_DEFINE([ENABLE_ERROR_MESSAGES], [1],
- [Define to 1 if including error messages])
-fi
-
-AC_MSG_CHECKING([whether to support custom memory allocation functions])
-AC_ARG_ENABLE([custom_memory_allocator],
- AS_HELP_STRING([--disable-custom-memory-allocator],
- [do not support the use of custom memory allocation
- functions]),
- [ENABLE_CUSTOM_MEMORY_ALLOCATOR=$enableval],
- [ENABLE_CUSTOM_MEMORY_ALLOCATOR=yes]
- )
-AC_MSG_RESULT([$ENABLE_CUSTOM_MEMORY_ALLOCATOR])
-if test "x$ENABLE_CUSTOM_MEMORY_ALLOCATOR" = "xyes"; then
- AC_DEFINE([ENABLE_CUSTOM_MEMORY_ALLOCATOR], [1],
- [Define to 1 if supporting custom memory allocation functions])
-fi
-
-AC_MSG_CHECKING([whether to include assertions])
-AC_ARG_ENABLE([assertions],
- AS_HELP_STRING([--disable-assertions], [do not include assertions]),
- [ENABLE_ASSERTIONS=$enableval],
- [ENABLE_ASSERTIONS=yes]
- )
-AC_MSG_RESULT([$ENABLE_ASSERTIONS])
-if test "x$ENABLE_ASSERTIONS" = "xyes"; then
- AC_DEFINE([ENABLE_ASSERTIONS], [1], [Define to 1 if including assertions.])
-fi
-
-AC_MSG_CHECKING([whether to include more assertions])
-AC_ARG_ENABLE([more-assertions],
- AS_HELP_STRING([--enable-more-assertions], [include even more assertions]),
- [ENABLE_MORE_ASSERTIONS=$enableval],
- [ENABLE_MORE_ASSERTIONS=no]
- )
-AC_MSG_RESULT([$ENABLE_MORE_ASSERTIONS])
-if test "x$ENABLE_MORE_ASSERTIONS" = "xyes"; then
- AC_DEFINE([ENABLE_MORE_ASSERTIONS], [1], [Define to 1 if including more assertions.])
-fi