--- dvgrab-1.8/configure.in.old 2006-09-06 13:29:08.632750806 +0200 +++ dvgrab-1.8/configure.in 2006-09-06 13:32:20.919348163 +0200 @@ -67,37 +67,46 @@ AC_WARN(libdv missing; I make better dv2 AVI files with libdv 0.98 or newer installed.) ]) -AC_CHECK_HEADERS(quicktime/quicktime.h,, -[ - AC_WARN(quicktime headers missing; install libquicktime or quicktime4linux to support Quicktime files.) -]) +AC_ARG_WITH(libquicktime, [ --with-libquicktime Enables Quicktime support], +[enable_libquicktime=$withval], [enable_libquicktime=yes]) -# add various libs if using quicktime4linux and not libquicktime -AC_CHECK_HEADERS(quicktime/lqt.h, - [AC_CHECK_LIB(quicktime, quicktime_open, , - [AC_WARN(libquicktime missing; install libquicktime or quicktime4linux to support Quicktime files.)] - )], -[ - AC_CHECK_LIB(png, png_read_image) - AC_CHECK_LIB(ogg, ogg_stream_pagein) - AC_CHECK_LIB(vorbis, vorbis_info_clear) - AC_CHECK_LIB(vorbisenc, vorbis_encode_ctl) - AC_CHECK_LIB(jpeg, jpeg_read_scanlines) - AC_CHECK_LIB(a52, a52_init) - AC_CHECK_LIB(mpeg3, mpeg3demux_read_char_packet) - AC_CHECK_LIB(quicktime, quicktime_open, , - [AC_WARN(libquicktime missing; install libquicktime or quicktime4linux to support Quicktime files.)] - ) -]) +if test "$enable_libquicktime" = yes; then + AC_CHECK_HEADERS(quicktime/quicktime.h,, + [ + AC_ERROR(quicktime headers missing) + ]) + + AC_CHECK_HEADERS(quicktime/lqt.h, + [AC_CHECK_LIB(quicktime, quicktime_open, , + [AC_ERROR(libquicktime missing)] + )], + [ + AC_CHECK_LIB(png, png_read_image) + AC_CHECK_LIB(ogg, ogg_stream_pagein) + AC_CHECK_LIB(vorbis, vorbis_info_clear) + AC_CHECK_LIB(vorbisenc, vorbis_encode_ctl) + AC_CHECK_LIB(jpeg, jpeg_read_scanlines) + AC_CHECK_LIB(a52, a52_init) + AC_CHECK_LIB(mpeg3, mpeg3demux_read_char_packet) + AC_CHECK_LIB(quicktime, quicktime_open, , + [AC_ERROR(libquicktime missing)] + ) + ]) +fi -AC_CHECK_HEADERS(jpeglib.h,, -[ - AC_WARN(jpeglib headers missing; install jpeglib to save to JPEG files.) -]) -AC_CHECK_LIB(jpeg, jpeg_CreateCompress,, -[ - AC_WARN(jpeglib missing; install jpeglib to save to JPEG files.) -]) +AC_ARG_WITH(libjpeg, [ --with-libjpeg Enables JPEG support], +[enable_libjpeg=$withval], [enable_libjpeg=yes]) + +if test "$enable_libjpeg" = yes; then + AC_CHECK_HEADERS(jpeglib.h,, + [ + AC_WARN(jpeglib headers missing; install jpeglib to save to JPEG files.) + ]) + AC_CHECK_LIB(jpeg, jpeg_CreateCompress,, + [ + AC_WARN(jpeglib missing; install jpeglib to save to JPEG files.) + ]) +fi # EFENCE AC_ARG_WITH(efence,[ --with-efence Use ElectricFence for debugging support.],