dnl Configure.in script for CvsGraph dnl Most of the stuff is gathered from other dnl scripts that seem to do a pretty good job. AC_INIT(cvsgraph.c) AC_CONFIG_HEADER(config.h) AC_PROG_CC AC_PROG_LEX AC_PROG_YACC LEXFLAGS="-8" LEXSPEED="-Cf" INCL="" dnl Extra libraries 'with'-options AC_ARG_WITH(gd-inc,[ --with-gd-inc=DIR location of the gd includes], [INCL="${INCL} -I${withval}" ]) AC_ARG_WITH(gd-lib,[ --with-gd-lib=DIR location of the gd library], [LIBS="${LIBS} -L${withval}" ]) LIBS="$LIBS -lgd" LIBPATH="" AC_ARG_WITH(freetype-lib,[ --with-freetype-lib=DIR location of freetype library], [LIBS="${LIBS} -L${withval}" ]) AC_ARG_WITH(freetype2-lib,[ --with-freetype2-lib=DIR location of freetype2 library], [LIBS="${LIBS} -L${withval}" ]) AC_ARG_WITH(png-inc,[ --with-png-inc=DIR location of png includes], [INCL="${INCL} -I${withval}" ]) AC_ARG_WITH(png-lib,[ --with-png-lib=DIR location of png library], [LIBS="${LIBS} -L${withval}" ]) AC_ARG_WITH(jpeg-inc,[ --with-jpeg-inc=DIR location of jpeg includes], [INCL="${INCL} -I${withval}" ]) AC_ARG_WITH(jpeg-lib,[ --with-jpeg-lib=DIR location of jpeg library], [LIBS="${LIBS} -L${withval}" ]) AC_ARG_WITH(z-inc,[ --with-z-inc=DIR location of zlib includes], [INCL="${INCL} -I${withval}" ]) AC_ARG_WITH(z-lib,[ --with-z-lib=DIR location of zlib library], [LIBS="${LIBS} -L${withval}" ]) AC_ARG_ENABLE(speed,[ --disable-speed Turn off lex table optimization reducing speed and size of executable], [if test "$enableval" = "no"; then LEXSPEED=""; fi]) if test "x$LEXSPEED" != "x" then LEXFLAGS="$LEXFLAGS $LEXSPEED" fi CPPFLAGS="$CPPFLAGS $INCL" CFLAGS="$CFLAGS $INCL" dnl Tests for gcc if test "x${GCC}" = "xyes" then CFLAGS="$CFLAGS -Wall" AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug, AC_TRY_RUN([ int main(void) { static int Array[[3]]; unsigned int B = 3; int i; for(i=0; i