--- configure.ac.orig 2003-02-08 23:53:42.000000000 -0500 +++ configure.ac 2003-08-07 21:10:37.000000000 -0400 @@ -13,11 +13,17 @@ AH_TEMPLATE(BACKCHANNEL, [Enable BackChannel communication]) AC_ARG_WITH(backchannel, [ --without-backchannel disable backchannel method], - ,AC_DEFINE(BACKCHANNEL)) + , [ with_backchannel=yes ]) +if test "x$with_backchannel" = "xyes"; then + AC_DEFINE(BACKCHANNEL) +fi AH_TEMPLATE(ALLOW24BPP, [Enable 24 bit per pixel in native framebuffer]) AC_ARG_WITH(24bpp, [ --without-24bpp disable 24 bpp framebuffers], - ,AC_DEFINE(ALLOW24BPP)) + , [ with_24bpp=yes ]) +if test "x$with_24bpp" = "xyes"; then + AC_DEFINE(ALLOW24BPP) +fi # Checks for X libraries HAVE_X="false" @@ -35,28 +41,36 @@ AM_CONDITIONAL(HAVE_X, test $HAVE_X != "false") # Checks for libraries. -AC_CHECK_HEADERS(jpeglib.h pthread.h zlib.h) -if test ! -z "$HAVE_JPEGLIB.H"; then - AC_CHECK_LIB(jpeg, jpeg_CreateCompress) +AC_ARG_WITH(jpeg, + [ --without-jpeg disable support for jpeg], + , [ with_jpeg=yes ]) +if test "x$with_jpeg" = "xyes"; then + AC_CHECK_HEADER(jpeglib.h, + [ AC_CHECK_LIB(jpeg, jpeg_CreateCompress) ]) fi +AC_CHECK_HEADERS(pthread.h) if test ! -z "$HAVE_PTHREAD.H"; then AC_CHECK_LIB(pthread, pthread_mutex_lock) AC_CHECK_LIB(pthread, pthread_mutex_lock, HAVE_LIBPTHREAD="true") fi #AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_PTHREAD.H") AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_LIBPTHREAD") -if test ! -z "$HAVE_ZLIB.H"; then - AC_CHECK_LIB(z, deflate) - # check for c++, but don't fail if not found - AC_CHECK_PROGS(CXX,[g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC],none) - AH_TEMPLATE(HAVE_ZRLE, [Use zrle compression; needs a c++ compiler]) - if test x$CXX != xnone; then - AC_DEFINE(HAVE_ZRLE) - AC_PROG_CXX - CCLD="\$(CXX)" - fi -else - CXX=none +AC_ARG_WITH(zlib, + [ --without-zlib disable support for deflate], + , [ with_zlib=yes ]) +if test "x$with_zlib" = "xyes"; then + AC_CHECK_HEADER(zlib.h, + [ + AC_CHECK_LIB(z, deflate) + # check for c++, but don't fail if not found + AC_CHECK_PROGS(CXX,[g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC],none) + AH_TEMPLATE(HAVE_ZRLE, [Use zrle compression; needs a c++ compiler]) + if test x$CXX != xnone; then + AC_DEFINE(HAVE_ZRLE) + AC_PROG_CXX + CCLD="\$(CXX)" + fi + ], [ CXX=none ]) fi AM_CONDITIONAL(HAVE_CXX, test x$CXX != xnone) AC_SUBST(CCLD)