dnl dnl Initialization part dnl AC_INIT([pfstmo], [1.1], [gkrawczyk@users.sourceforge.net]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) AC_LANG(C++) # perform tests in C++ language AC_PROG_CXX AC_PROG_CC AC_PROG_LIBTOOL dnl dnl Default setup dnl CXXFLAGS="-O3 -funroll-loops -fstrength-reduce -fschedule-insns2 -felide-constructors -frerun-loop-opt -fexceptions -fno-strict-aliasing -fexpensive-optimizations -ffast-math -pipe" enable_fftw3f="yes" dnl dnl Templates for autoheader defines dnl AH_TEMPLATE([DEBUG], [Define as 1 when compiling in debug mode ]) dnl dnl Commandline switches dnl AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debug symbols and asserts]), [if test "$enable_debug" = "yes" ; then CXXFLAGS="-g" fi],[enable_debug="no"]) dnl dnl System detection and configuration dnl dnl PFS tools library - base for input sources AC_MSG_CHECKING([for pfs library]) PKG_CHECK_MODULES(PFS, pfs >= 1.0) AC_SUBST(PFS_CFLAGS) AC_SUBST(PFS_LIBS) dnl FFTW - library for computing the Discrete Fourier Transform (DFT) AC_MSG_CHECKING([for fftw3f library]) PKG_CHECK_MODULES(FFTW3F, fftw3f >= 3.0, [AC_DEFINE( HAVE_FFTW3F, 1, [FFTW3F library is required for fast bilateral filtering.]) enable_fftw3f="yes"],[ enable_fftw3f="no"]) AC_SUBST(FFTW3F_LIBS) dnl Debug version if test "$enable_debug" = "yes" ; then AC_DEFINE([DEBUG], 1, [Compilation for debugging purposes.]) fi dnl dnl Autoheader defines dnl AH_BOTTOM([ /* Output stream for debug messages. */ #ifdef DEBUG #define DEBUG_STR std::cerr #else #define DEBUG_STR if(1); else std::cerr #endif /* Output stream for verbose mode messages. */ #define VERBOSE_STR if( verbose ) std::cerr << PROG_NAME << ": " extern bool verbose; /* verbose should be declared for each standalone code */ ]) dnl dnl Decide, what is supported dnl AM_CONDITIONAL(SUP_FFTW3F, test "$enable_fftw3f" = "yes" ) dnl dnl Finish dnl AC_CONFIG_FILES([ Makefile ]) AC_CONFIG_FILES([ src/Makefile ]) AC_CONFIG_FILES([ src/durand02/Makefile ]) AC_CONFIG_FILES([ src/drago03/Makefile ]) AC_CONFIG_FILES([ src/fattal02/Makefile ]) AC_CONFIG_FILES([ src/mantiuk06/Makefile ]) AC_CONFIG_FILES([ src/reinhard02/Makefile ]) AC_CONFIG_FILES([ src/reinhard05/Makefile ]) AC_CONFIG_FILES([ src/pattanaik00/Makefile ]) AC_OUTPUT AC_MSG_RESULT([ PFStmo 1.1 is now configured Source directory: $srcdir Installation prefix: $prefix C++ compiler: $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS LIBS: $LIBS fftw3f: $enable_fftw3f LIBS: $FFTW3F_LIBS Debug mode: $enable_debug ])