AC_INIT(dwf, 7.7.0, http://www.autodesk.com/dwf) AC_CONFIG_SRCDIR(configure.in) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) AC_LANG_CPLUSPLUS AC_PROG_CXX AM_PROG_LIBTOOL dnl AC_CHECK_LIB( dwfcore ) AC_ARG_WITH([zlib], AC_HELP_STRING([--with-zlib], [use system zlib [[default=yes]]]), [with_zlib=$withval], [with_zlib=yes]) if test $with_zlib = yes; then AC_CHECK_LIB(z, inflate,, AC_MSG_ERROR([System zlib is required])) else AC_MSG_NOTICE([Using custom zlib from dwfcore]) AC_DEFINE(DWFTK_USE_DWFCORE_ZLIB, 1, [Using custom zlib from dwfcore]) fi AC_ARG_WITH([jpeg], AC_HELP_STRING([--with-jpeg], [use system jpeg [[default=yes]]]), [with_jpeg=$withval], [with_jpeg=yes]) if test $with_jpeg = yes; then #AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([System jpeg is required])) echo "foo" else AC_MSG_NOTICE([Building custom jpeg code into w3dtk]) AC_DEFINE(DWFTK_BUILD_JPEG, 1, [Building custom jpeg code into w3dtk]) fi AC_ARG_WITH([exportapi], AC_HELP_STRING([--with-exportapi], [export api [[default=yes]]]), [with_exportapi=$withval], [with_exportapi=yes]) if test $with_exportapi = yes; then AC_MSG_NOTICE([Building for toolkit api]) AC_DEFINE(DWFTK_EXPORT_API, 1, [Building for toolkit api]) fi AC_ARG_WITH([whipwchar], AC_HELP_STRING([--with-whipwchar], [wchar function [[default=yes]]]), [with_whipwchar=$withval], [with_whipwchar=yes]) if test $with_whipwchar = yes; then AC_MSG_NOTICE([Building wchar function in whiptoolkit]) AC_DEFINE(WHIP_USE_WCHAR_STRINGS, 1, [Building wchar function in whiptoolkit]) fi AC_ARG_WITH([whiptool], AC_HELP_STRING([--with-whiptool], [whip tool client [[default=yes]]]), [with_whiptool=$withval], [with_whiptool=yes]) if test $with_whiptool = yes; then AC_MSG_NOTICE([Building whip tool client]) AC_DEFINE(WHIPTOOL_CLIENT, 1, [Building whip tool client]) fi gcc --version > gccver.txt sed -e '/^gcc version 3.2/ p' gccver.txt > gcc32.txt AC_ARG_WITH([expat], AC_HELP_STRING([--with-expat], [use system expat [[default=no]]]), [with_expat=$withval], [with_expat=no]) if test $with_expat = yes; then AC_MSG_CHECKING([system expat existence and version]) AC_CHECK_LIB(expat, XML_ResumeParser,, AC_MSG_ERROR([System expat version 2.0 or greater is required.])) AC_DEFINE(DWF_USE_SYSTEM_EXPAT, 1, [Using system expat]) else AC_MSG_NOTICE([Using custom expat from dwfcore]) fi AC_ARG_ENABLE([optimized], AC_HELP_STRING([--enable-optimized], [enable optimized build [[default=no]]]), [enable_optimized=$enableval], [enable_optimized=no]) if test $enable_optimized = no; then AC_MSG_NOTICE([Using debug configuration]) if test -s gcc32.txt then AC_MSG_NOTICE([gcc 3.2.x requires less strict compiler flags. Please pay attention to warnings!]) AC_SUBST(CXXFLAGS, ["-g3 -ggdb -p -O0 -pipe -pedantic -Wall -Wno-long-long -Wnon-virtual-dtor -Wsign-promo -Wsign-compare -Wundef"]) else AC_SUBST(CXXFLAGS, ["-g3 -ggdb -p -O0 -pipe -pedantic-errors -Wall -Werror -Wno-long-long -Wnon-virtual-dtor -Wsign-promo -Wsign-compare -Wundef -Wunreachable-code"]) fi else AC_MSG_NOTICE([Using optimized configuration]) if test -s gcc32.txt then AC_MSG_NOTICE([gcc 3.2.x requires less strict compiler flags. Please pay attention to warnings!]) AC_SUBST(CXXFLAGS, ["-g0 -O2 -pipe -pedantic -Wall -Wno-long-long -Wnon-virtual-dtor -Wsign-promo -Wsign-compare -Wundef -fforce-addr -fomit-frame-pointer -finline-functions -ffast-math -fno-strict-aliasing"]) else AC_SUBST(CXXFLAGS, ["-g0 -O2 -pipe -pedantic-errors -Wall -Werror -Wno-long-long -Wnon-virtual-dtor -Wsign-promo -Wsign-compare -Wundef -Wunreachable-code -fforce-addr -fomit-frame-pointer -finline-functions -ffast-math -fno-strict-aliasing"]) fi fi rm gccver.txt rm gcc32.txt AC_OUTPUT(Makefile package/Makefile package/reader/Makefile package/writer/Makefile package/writer/extensions/Makefile package/writer/extensions/6.0/Makefile package/writer/extensions/6.01/Makefile package/writer/extensions/6.11/Makefile package/writer/extensions/6.20/Makefile package/utility/Makefile whiptk/Makefile XAML/Makefile w3dtk/Makefile w3dtk/jpeg/Makefile w3dtk/utility/Makefile w3dtk/hoops/Makefile publisher/Makefile publisher/impl/Makefile publisher/model/Makefile publisher/plot/Makefile publisher/data/Makefile presentation/Makefile presentation/reader/Makefile presentation/utility/Makefile opc/Makefile opc/reader/Makefile xps/Makefile dwfx/Makefile dwfx/reader/Makefile)