AC_INIT(src/corona.h) AC_CONFIG_AUX_DIR(config) VERSION=1.0.2 PACKAGE="corona" AC_SUBST(VERSION) AC_SUBST(PACKAGE) AM_INIT_AUTOMAKE($PACKAGE, $VERSION) dnl Checks for options. AC_ARG_ENABLE(debug, AC_HELP_STRING(--enable-debug, build debug), CXXFLAGS="$CXXFLAGS -g" AC_DEFINE(DEBUG)) dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_MAKE_SET AM_PROG_LIBTOOL dnl Checks for libraries. AC_CHECK_LIB(png, png_create_read_struct, LIBS="-lpng -lz -lm $LIBS" EXTRA_LIBS="-lpng -lz -lm $EXTRA_LIBS" , AC_MSG_WARN([libpng not found. PNG support will not be compiled.]) AC_DEFINE(NO_PNG) NO_PNG=true , -lz -lm) AM_CONDITIONAL(NO_PNG, test "x$NO_PNG" = "xtrue") AC_CHECK_LIB(jpeg, jpeg_start_decompress, LIBS="-ljpeg $LIBS" EXTRA_LIBS="-ljpeg $EXTRA_LIBS" , AC_MSG_WARN([libjpeg not found. JPEG support will not be compiled.]) AC_DEFINE(NO_JPEG) NO_JPEG=true) AM_CONDITIONAL(NO_JPEG, test "x$NO_JPEG" = "xtrue") dnl Checks for header files. AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. dnl If building with gcc, build with all warnings except "class has virtual dnl functions but non-virtual destructor". if [[ "x$GXX" = "xyes" ]]; then CXXFLAGS="$CXXFLAGS -Wall -Wno-non-virtual-dtor" fi if [[ "x$GCC" = "xyes" ]]; then CFLAGS="$CFLAGS -Wall -Wno-non-virtual-dtor" fi dnl Output makefiles. AC_SUBST(EXTRA_LIBS) AC_OUTPUT( corona-config Makefile doc/Makefile examples/Makefile examples/formats/Makefile src/Makefile src/libungif-4.1.0/Makefile tools/Makefile tools/corconvert/Makefile , [chmod a+x corona-config])