--- dvgrab-2.0/configure.in.old 2006-12-07 19:41:05.000000000 +0100 +++ dvgrab-2.0/configure.in 2006-12-07 19:41:09.000000000 +0100 @@ -41,37 +41,46 @@ AC_ERROR(You need the pthread library to compile dvgrab) ]) -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.],