dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) AC_REVISION($Revision: 1.40 $) AC_INIT(IExtract, 0.9.02, [g17m0@lycos.com], IExtract) RELEASE=${PACKAGE_VERSION%.*} AC_SUBST(PACKAGE_VERSION) AC_SUBST(RELEASE) INCLUDES="-DLOCALEDIR=\\\"\$(datadir)/locale\\\"" AC_SUBST(INCLUDES) dnl AC_CANONICAL_SYSTEM AC_C_BIGENDIAN ALL_LINGUAS="de en es" AM_INIT_AUTOMAKE(dist-bzip2) AM_CONFIG_HEADER(IExtract-cfg.h) AC_PROG_CXX AC_LANG(C++) AC_PROG_LIBTOOL AC_PROG_INSTALL AC_PROG_MAKE_SET AC_GNU_SOURCE AM_GNU_GETTEXT dnl Checks for programs. dnl Checks for libraries. AC_CHECK_LIB(stdc++, main) PKG_CHECK_MODULES(YMP, YGP >= 0.8.20, [], [AC_MSG_ERROR(Need libYGP to make); exit]) dnl Checks for header files. dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. dnl Enable special features AC_ARG_ENABLE(debug, AC_HELP_STRING([[[[[--enable-debug[=LEVEL]]]]]], [Enables additional traces (LEVEL=0..9)]), if test "$enableval" != "no"; then test "$enableval" == "yes" && enableval=0 CXXFLAGS="-g -O2 -DTRACELEVEL=$enableval"; else CXXFLAGS="-O2 -UTRACELEVEL"; fi) AC_ARG_ENABLE(checks, AC_HELP_STRING([[[[[--enable-checks[=LEVEL]]]]]], [Enables additional (internal) checks (LEVEL=0..9)]), if test "$enableval" != "no"; then test "$enableval" == "yes" && enableval=0 CXXFLAGS="$CXXFLAGS -DCHECK=$enableval"; else CXXFLAGS="$CXXFLAGS -DNDEBUG -UCHECK"; fi) AC_ARG_ENABLE(threads, [AC_HELP_STRING([--enable-threads], [Enables threads for parsing])]) if test "$enable_threads" == "yes"; then CXXFLAGS="$CXXFLAGS -DENABLE_THREADS" fi AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--enable-plugins], [Enables adding new types of handled files])]) if test "$enable_plugins" == "yes"; then CXXFLAGS="$CXXFLAGS -DENABLE_PLUGINS" fi AC_ARG_ENABLE(html, AC_HELP_STRING([--disable-html], [Disables handling of HTML-files])) if test "$enable_html" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_HTML, 1, [Define if HTML-files are handled]) fi AM_CONDITIONAL(SUPPORT_HTML, test "$enable_html" != "no") AC_ARG_ENABLE(jpeg, AC_HELP_STRING([--disable-jpeg], [Disables handling of JPEG-images])) if test "$enable_jpeg" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_JPEG, 1, [Define if JPEG-images are handled]) fi AM_CONDITIONAL(SUPPORT_JPEG, test "$enable_jpeg" != "no") AC_ARG_ENABLE(png, AC_HELP_STRING([--disable-png], [Disables handling of PNG-images])) if test "$enable_png" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_PNG, 1, [Define if PNG-images are handled]) fi AM_CONDITIONAL(SUPPORT_PNG, test "$enable_png" != "no") AC_ARG_ENABLE(gif, AC_HELP_STRING([--disable-gif], [Disables handling of GIF-images])) if test "$enable_gif" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_GIF, 1, [Define if GIF-images are handled]) fi AM_CONDITIONAL(SUPPORT_GIF, test "$enable_gif" != "no") AC_ARG_ENABLE(mp3, AC_HELP_STRING([--disable-mp3], [Disables handling of MP3-audio files])) if test "$enable_mp3" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_MP3, 1, [Define if MP3-audio files are handled]) fi AM_CONDITIONAL(SUPPORT_MP3, test "$enable_mp3" != "no") AC_ARG_ENABLE(ogg, AC_HELP_STRING([--disable-ogg], [Disables handling of OGG-audio files])) if test "$enable_ogg" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_OGG, 1, [Define if OGG-audio files are handled]) fi AM_CONDITIONAL(SUPPORT_OGG, test "$enable_ogg" != "no") AC_ARG_ENABLE(pdf, AC_HELP_STRING([--disable-pdf], [Disables handling of PDF-documents])) if test "$enable_pdf" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_PDF, 1, [Define if PDF-documents are handled]) fi AM_CONDITIONAL(SUPPORT_PDF, test "$enable_pdf" != "no") AC_ARG_ENABLE(oo, AC_HELP_STRING([--disable-oo], [Disables handling of OpenOffice.org-documents])) if test "$enable_oo" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_OO, 1, [Define if OpenOffice.org documents are handled]) fi AM_CONDITIONAL(SUPPORT_OO, test "$enable_oo" != "no") AC_ARG_ENABLE(abiword, AC_HELP_STRING([--disable-abiword], [Disables handling of AbiWord-documents])) if test "$enable_abiword" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_ABIWORD, 1, [Define if AbiWord-documents are handled]) fi AM_CONDITIONAL(SUPPORT_ABIWORD, test "$enable_abiword" != "no") AC_ARG_ENABLE(rtf, AC_HELP_STRING([--disable-rtf], [Disables handling of RTF-documents])) if test "$enable_rtf" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_RTF, 1, [Define if RTF-documents are handled]) fi AM_CONDITIONAL(SUPPORT_RTF, test "$enable_rtf" != "no") AC_ARG_ENABLE(msoffice, AC_HELP_STRING([--disable-msoffice], [Disables handling of MS-Office-documents])) if test "$enable_msoffice" != "no"; then AC_DEFINE_UNQUOTED(SUPPORT_MSOFFICE, 1, [Define if MS-Office documents are handled]) fi AM_CONDITIONAL(SUPPORT_MSOFFICE, test "$enable_msoffice" != "no") AC_OUTPUT([Makefile src/Makefile src/Plugins/Makefile doc/Makefile po/Makefile.in intl/Makefile]) dnl Settings for autoheader AH_TOP([#ifndef IEXTRACT_CFG_H #define IEXTRACT_CFG_H]) AH_BOTTOM([#if defined (HAVE_GETTEXT) && defined (ENABLE_NLS) # include # define _(String) gettext (String) # define N_(String) gettext_noop (String) # define gettext_noop(String) (String) #else # define _(String) (String) # define N_(String) (String) # define ngettext(Str1, Str2, flag) (((flag) == 1) ? (Str1) : (Str2)) # define binddomain(Domain) # define bindtextdomain(Package, Directory) #endif #endif])