dnl Bitmap to PNG conversion AC_INIT(png2pdf.c) AC_CONFIG_HEADER(config.h) AC_PROG_CC AC_PROG_CPP AC_PROG_RANLIB DKLIBS="no" DKLIBSINC="" DKLIBSLIB="" AC_HEADER_CHECK(dk.h, [DKLIBS="yes";AC_DEFINE(HAVE_DK_H)]) ZLIB="" BZLIB="" AC_HEADER_CHECK(setjmp.h,[AC_DEFINE(HAVE_SETJMP_H)]) AC_HEADER_CHECK(bzlib.h,BZLIB="-lbz2";AC_DEFINE(HAVE_BZLIB_H)) AC_HEADER_CHECK(dk.h,[DKLIBS="yes";AC_DEFINE(HAVE_DK_H)]) AC_CHECK_LIB(z, deflate, ZLIB='-lz';AC_DEFINE(HAVE_ZLIB_H),ZLIB='') AC_MSG_CHECKING(libpng) AC_TRY_COMPILE([#include ], [ png_structp png_ptr; ], LIBPNG='-lpng';echo yes;AC_DEFINE(HAVE_PNG_H), LIBPNG='';echo no) AC_ARG_WITH(dklibs,[ --with-dklibs=DIR dklibs base directory],[DKLIBS="$withval"]) case "X$DKLIBS" in Xno) echo 'ERROR: The dklibs library set was not found!' echo 'These libraries are required to build this application.' echo 'See http://dklibs.sourceforge.net for documentation or' echo 'http://sourceforge.net/projects/dklibs for download.' ;; Xyes) AC_DEFINE(HAVE_DK_H) ;; *) DKLIBSINC="-I${DKLIBS}/include" DKLIBSLIB="-L${DKLIBS}/lib" AC_DEFINE(HAVE_DK_H) ;; esac DKLIBSJ='${bindir}/dklibsj.jar' AC_ARG_WITH(dklibsj,[ --with-dklibsj=jarfile use specified dklibsj.jar file],DKLIBSJ=$withval) AC_SUBST(DKLIBSJ) AC_SUBST(DKLIBSINC) AC_SUBST(DKLIBSLIB) AC_SUBST(BZLIB) AC_SUBST(ZLIB) AC_SUBST(LIBPNG) AC_OUTPUT(Makefile) AC_OUTPUT(png2pdf-gui) AC_OUTPUT(Java/Png2PdfGUI/Makefile) AC_OUTPUT(Java/Png2PdfGUI/src/compile-archive) if test "X$ZLIB" = "X" then echo 'ERROR: The zlib library was not found!' echo 'This library is required to build this application.' echo 'See http://www.gzip.org/zlib for download.' fi if test "X$LIBPNG" = "X" then echo 'ERROR: The libpng library was not found!' echo 'This library is required to build this application.' echo 'See http://www.libpng.org for download.' fi if test "X$BZLIB" = "X" then echo 'Warning: The bzip2 library was not found.' echo 'This library is recommended by the dklibs library set.' echo 'If the dklibs library set was built without bzip2 support' echo '(I have no way to test this) you can ignore this warning.' echo 'When in doubt check linker output for undefined references.' echo 'See http://sources.redhat.com/bzip2/ for download.' fi