dnl Process this file with autoconf to produce a configure script. AC_INIT(src/ziproxy.c) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE(ziproxy, 2.4.2) AC_PREFIX_DEFAULT(/usr/local) AM_CONFIG_HEADER(src/config.h) dnl Checks for programs. AC_PROG_CC AM_PROG_LEX if test "$LEX" != "flex" ; then AC_MSG_ERROR([Flex not found. Plain lex is not supported.]) fi LEX_OUTPUT_ROOT=lex.htmlmodify_yy LEX="flex -s -Cfa -8" dnl Checks for libraries. ETR_SOCKET_NSL LIBS="$LIBS $ETR_SOCKET_LIBS" AC_CHECK_LIB(z, gzopen,, AC_MSG_ERROR([ZLib not found.])) AC_CHECK_LIB(m, pow,, AC_MSG_ERROR([Math library not found.])) USE_LIB([gif],[You may use this option for setting libungif location, too.]) AC_SEARCH_LIBS(DGifSlurp, gif ungif,, AC_SEARCH_LIBS(DGifSlurp, gif ungif, "-L/usr/X11R6/lib -lX11", [AC_MSG_ERROR([Both libgif and libungif not found.])])) USE_LIB(jpeg) AC_CHECK_LIB(jpeg, jpeg_start_decompress,, AC_MSG_ERROR([libjpeg not found.])) USE_LIB(png) AC_CHECK_LIB(png, png_check_sig,, AC_MSG_ERROR([libpng not found.]), -lz -lm) USE_LIB(pthread) AC_CHECK_LIB(pthread, pthread_create,, AC_MSG_ERROR([libpthread not found.]), -lpthread) USE_LIB(jasper, [If set, ziproxy will be compiled with JPEG2000 support.], AC_CHECK_LIB(jasper, jas_init, [ AC_DEFINE(JP2K,1,[JPEG2000 support]) HTMLMODIFY=htmlmodify_jp2 LIBS="$LIBS -ljasper"], AC_MSG_ERROR([libJasper not found.])), HTMLMODIFY=htmlmodify) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h assert.h errno.h fcntl.h getopt.h gif_lib.h inttypes.h jpeglib.h netdb.h netinet/in.h png.h pthread.h resolv.hsignal.h stdarg.h stdio.h stdlib.h string.h sys/select.h sys/socket.h sys/stat.h sys/time.h sys/types.h sys/wait.h syslog.h time.h unistd.h zlib.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_FUNC_SETVBUF_REVERSED AC_TYPE_SIGNAL AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_CHECK_FUNCS(gettimeofday select socket strdup strstr strtol) AC_ARG_ENABLE(testprogs,[ --enable-testprogs Build test utilities: cfgtest imgtest modifytest], [TESTPROGS=\$\(EXTRA_PROGRAMS\)],[unset TESTPROGS]) AC_ARG_WITH(cfgfile, [ --with-cfgfile=/dir/ziproxy.conf Set /dir/ziproxy.conf as the default configuration file.], [AC_DEFINE_UNQUOTED(DefaultCfgLocation,["$withval"],[Default configuration file])]) AC_SUBST(TESTPROGS) AC_SUBST(HTMLMODIFY) dnl AC_CYGWIN AC_OUTPUT(Makefile src/Makefile src/tools/Makefile)