--- suck-4.3.2/configure.in.orig 2003-03-23 21:11:07 +0300 +++ suck-4.3.2/configure.in 2003-07-06 19:03:11 +0400 @@ -4,8 +4,13 @@ AC_INIT(suck.c) AC_CONFIG_HEADER(config.h) -AC_ARG_WITH(inn-lib, [ --with-inn-lib=path location of libinn.a]) -AC_ARG_WITH(inn-include, [ --with-inn-include=path location of inn include files]) +AC_ARG_WITH(inn-lib, +[ --with-inn-lib=path location of libinn.a]) +AC_ARG_WITH(inn-include, +[ --with-inn-include=path location of inn include files]) + +AC_ARG_ENABLE(inn, +[ --enable-inn build with inn support]) AC_ARG_WITH(perl-exe, [ --with-perl-exe=full path to perl executable eg: /usr/bin]) # we want these before the checks, so the checks can modify their values @@ -41,45 +46,47 @@ dnl Checks for library functions. AC_TYPE_SIGNAL AC_CHECK_FUNCS(gettimeofday select strerror memmove setvbuf sigaction) -if test "$with_inn_lib" ; then - LDFLAGS="$DB_LIB -L${with_inn_lib}" -fi -if test "$with_inn_include" ; then - testpath=$with_inn_include + +if test "$enable_inn" = "yes" ; then + if test "$with_inn_lib" ; then + LDFLAGS="$DB_LIB -L${with_inn_lib}" + fi + if test "$with_inn_include" ; then + testpath=$with_inn_include + else + testpath="/usr/include/inn /usr/local/include /usr/local/include/inn" + fi + HISTORY="chkhistory_db.o" + AC_CHECK_LIB(inn, main, [ + DB_LIB="-linn" + DB_TYPE="-DUSE_INN23" + savedLIBS=$LIBS + LIBS="$LIBS -linn" + AC_CHECK_FUNC(QIOopen, , [ + LIBS="$savedLIBS -lstorage" + AC_CHECK_FUNC(QIOopen, [DB_LIB="$DB_LIB -lstorage"]) + ]) + LIBS=$savedLIBS + AC_MSG_CHECKING([for libinn.h]) + for path in $testpath ; do + if test -f $path/libinn.h; then + AC_MSG_RESULT($path) + found="yes" + CPPFLAGS="$CPPFLAGS -I$path" + break + fi + done + test "$found" != "yes" && AC_MSG_RESULT(not found) + ], [ + AC_CHECK_LIB(dbz, main, [DB_LIB="-ldbz"; DB_TYPE="-DUSE_DBZ"], [ + AC_CHECK_LIB(ndbm, main, [DB_LIB="-lndbm"; DB_TYPE="-DUSE_NDBM"], [ + AC_CHECK_LIB(gdbm, main, [DB_LIB="-lgdbm"; DB_TYPE="-DUSE_GDBM"], [ + AC_CHECK_LIB(dbm, main, [DB_LIB="-ldbm"; DB_TYPE="-DUSE_DBM"], [ + HISTORY="chkhistory.o"])])])]) + ]) else - testpath="/usr/include/inn /usr/local/include /usr/local/include/inn" + HISTORY="chkhistory.o" fi -HISTORY="chkhistory_db.o" -AC_CHECK_LIB(inn, main, [ - DB_LIB="-linn" - DB_TYPE="-DUSE_INN23" - savedLIBS=$LIBS - LIBS="$LIBS -linn" - AC_CHECK_FUNC(QIOopen, , [ - LIBS="$savedLIBS -lstorage" - AC_CHECK_FUNC(QIOopen, [DB_LIB="$DB_LIB -lstorage"]) - ]) - LIBS=$savedLIBS - AC_MSG_CHECKING([for libinn.h]) - for path in $testpath ; do - if test -f $path/libinn.h; then - AC_MSG_RESULT($path) - found="yes" - CPPFLAGS="$CPPFLAGS -I$path" - if test ! -f $path/configdata.h ; then - CPPFLAGS="$CPPFLAGS -DNO_CONFIGDATA" - fi - break - fi - done - test "$found" != "yes" && AC_MSG_RESULT(not found) - ], [ - AC_CHECK_LIB(dbz, main, [DB_LIB="-ldbz"; DB_TYPE="-DUSE_DBZ"], [ - AC_CHECK_LIB(ndbm, main, [DB_LIB="-lndbm"; DB_TYPE="-DUSE_NDBM"], [ - AC_CHECK_LIB(gdbm, main, [DB_LIB="-lgdbm"; DB_TYPE="-DUSE_GDBM"], [ - AC_CHECK_LIB(dbm, main, [DB_LIB="-ldbm"; DB_TYPE="-DUSE_DBM"], [ - HISTORY="chkhistory.o"])])])]) -]) if test "$with_perl_exe" ; then AC_CHECK_PROG(PERL, perl, true, false, [$with_perl_exe])