1dnl Process this file with autoconf to produce a configure script. 2AC_INIT([mjpegtools],[2.1.0],[mjpeg-developer@lists.sourceforge.net]) 3AC_PREREQ(2.57) 4AC_CONFIG_SRCDIR([lavtools/lav_io.c]) 5 6MJPEG_MAJOR_VERSION=2 7MJPEG_MINOR_VERSION=1 8MJPEG_MICRO_VERSION=0 9MJPEG_VERSION=$MJPEG_MAJOR_VERSION.$MJPEG_MINOR_VERSION.$MJPEG_MICRO_VERSION 10 11AC_CONFIG_HEADERS([config.h]) 12 13AC_CANONICAL_HOST 14AM_INIT_AUTOMAKE([1.7]) 15AM_MAINTAINER_MODE 16 17 18# libtool versioning 19LT_RELEASE=$MJPEG_MAJOR_VERSION.$MJPEG_MINOR_VERSION 20LT_CURRENT=$MJPEG_MICRO_VERSION 21LT_REVISION=$MJPEG_MICRO_VERSION 22LT_AGE=$MJPEG_MICRO_VERSION 23AC_SUBST(LT_RELEASE) 24AC_SUBST(LT_CURRENT) 25AC_SUBST(LT_REVISION) 26AC_SUBST(LT_AGE) 27AC_SUBST(LT_STATIC) 28 29dnl ********************************************************************** 30dnl Options 31 32AC_ARG_ENABLE(compile-warnings, 33 AC_HELP_STRING([--enable-compile-warnings], 34 [Turn on compiler warnings.])) 35AC_ARG_ENABLE(warnings_as_errors, 36 AC_HELP_STRING([--enable-warnings_as_errors], 37 [Compiler warnings are errors.])) 38AC_ARG_ENABLE(static-build, 39 AC_HELP_STRING([--enable-static-build], 40 [Force static linkage instead of shared libraries (useful for profiling etc).])) 41AC_ARG_ENABLE(simd-accel, 42 AC_HELP_STRING([--enable-simd-accel], 43 [use SIMD multimedia instructions 44 (MMX, AltiVec, etc.) if possible])) 45AC_ARG_WITH(extra-cflags, 46 AC_HELP_STRING([--with-extra-cflags=flags], 47 [Options to be added to CFLAGS (optional)])) 48AC_ARG_WITH(libquicktime, 49 AC_HELP_STRING([--without-libquicktime], 50 [Do not use libquicktime.]), 51 [], [with_libquicktime=yes]) 52AC_ARG_WITH(libdv, 53 AC_HELP_STRING([--without-libdv], [Do not use libdv.]), 54 [], [with_libdv=yes]) 55AC_ARG_WITH(libpng, 56 AC_HELP_STRING([--without-libpng], [Do not use libpng.]), 57 [], [with_libpng=yes]) 58AC_ARG_WITH(dga, 59 AC_HELP_STRING([--without-dga], [Do not use dga.]), 60 [], [with_dga=yes]) 61AC_ARG_WITH(gtk, 62 AC_HELP_STRING([--without-gtk], [Do not use gtk.]), 63 [], [with_gtk=yes]) 64AC_ARG_WITH(libsdl, 65 AC_HELP_STRING([--without-libsdl], [Do not use libsdl.]), 66 [], [with_libsdl=yes]) 67AC_ARG_WITH(sdlgfx, 68 AC_HELP_STRING([--without-sdlgfx], [Do not use sdlgfx.]), 69 [], [with_sdlgfx=yes]) 70AC_GNU_SOURCE 71 72dnl Initialize libtool 73AC_PROG_LIBTOOL 74 75dnl Checks for programs. 76AC_PROG_AWK 77AC_PROG_CC 78 79# automake 1.9 could use AM_PROG_STDC but 1.10 became picky and needs CC_C_0 80AM_PROG_CC_C_O 81# AM_PROG_CC_STDC 82 83AC_PROG_CXX 84AC_PROG_INSTALL 85AC_PROG_LN_S 86AC_C_BIGENDIAN 87AC_C_CONST 88AC_C_INLINE 89AC_SYS_LARGEFILE 90 91dnl configure AS and ASFLAGS... 92AM_PROG_AS 93 94if test x"$with_extra_cflags" != "x"; then 95 CFLAGS="$CFLAGS $with_extra_cflags" 96 CXXFLAGS="$CXXFLAGS $with_extra_cflags" 97 CCASFLAGS="$CCASFLAGS $with_extra_cflags" 98fi 99 100AC_CHECK_HEADERS([stdint.h inttypes.h sys/types.h getopt.h malloc.h sys/soundcard.h]) 101 102#maddog: check for math lib, and add it to LIBS (needed for fmax, lround...) 103#maddog: (How does this interact with cpml stuff below???????) 104AC_CHECK_LIB([m],[sin]) 105AC_CHECK_FUNCS([posix_memalign memalign fmax fmin lround]) 106 107AC_CHECK_FUNC(getopt_long, 108 [AC_DEFINE(HAVE_GETOPT_LONG, 1, [long getopt support])], 109 [ # FreeBSD and BSD/OS have a gnugetopt library for this: 110 AC_CHECK_LIB([gnugetopt], [getopt_long], 111 [AC_DEFINE(HAVE_GETOPT_LONG, 1, 112 [long getopt support]) 113 LIBGETOPT_LIB="-lgnugetopt"]) 114 ]) 115AC_SUBST(LIBGETOPT_LIB) 116 117AC_TYPE_SIGNAL 118 119AC_MSG_NOTICE([The host is $host $host_cpu $host_vendor $host_os .]) 120 121dnl test for alpha architecture, and Compaq Math Library (cpml) -- much faster 122dnl than GNU libm on this arch. 123LIBM_LIBS="-lm " 124AC_SUBST(LIBM_LIBS) 125AC_MSG_CHECKING([for alpha architecture]) 126case $host in 127 alpha*-*-linux-*) 128 AC_MSG_RESULT([yes]) 129 AC_CHECK_LIB(cpml, asin, 130 [ LIBM_LIBS="-lcpml" 131 have_cpml=true ],,) 132 ;; 133 *) 134 AC_MSG_RESULT([no]) 135 ;; 136esac 137 138dnl ********************************************************************* 139dnl Some host-specific tweaks: 140dnl o OS-X/Darwin needs "-no-cpp-precomp" to avoid compile errors. 141dnl o (e.g) Cygwin shared libs cannot have undefined symbols, libtool only 142dnl builds them if really given flag to force this (see ltmain.sh) 143dnl This also requires inter-library dependency to be indicated in _LIBADD; 144dnl (probably good libtool practice in any case) to have all symbols satisfied 145dnl o Linux handles with or without this flag, but at least on OS-X/Darwin 146dnl altivec (utils) can cause circular library dependency (with mpeg2enc), 147dnl so better limit this flag 148dnl ********************************************************************* 149case $host in 150 *-apple-darwin*) 151 CFLAGS="$CFLAGS -no-cpp-precomp" 152 ;; 153 *-unknown-netbsdelf2.*) 154 LIBS="-lossaudio" 155 ;; 156 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) EXTRA_LDFLAGS="-no-undefined" 157 ;; 158esac 159AC_SUBST(EXTRA_LDFLAGS) 160 161dnl ********************************************************************* 162dnl Test whether we're linux or not. If so, define HAVE_V4L and build the 163dnl video4linux/hardware dependent tools. Else, undefine HAVE_V4L 164 165have_video4linux=false 166AC_ARG_WITH([v4l], AC_HELP_STRING([--without-v4l], [Disable v4l1 API])) 167AS_IF([test "x$with_v4l" != "xno"], [ 168case $host in 169 *-*-linux*) 170 AC_CHECK_HEADER(linux/videodev.h, 171 [have_video4linux=true 172 AC_DEFINE(HAVE_V4L, 1, 173 [Building for Linux - using the video4linux API])], []) 174 ;; 175esac]) 176 177AS_IF([test "x$have_video4linux" != "xtrue" && test "x$with_v4l" != "xno"], 178 [have_video4linux=false 179 AC_MSG_WARN([videodev.h not found - please install the linux kernel headers programms needing v4l disabled])]) 180AM_CONDITIONAL(HAVE_V4L, test x$have_video4linux = xtrue) 181 182dnl ********************************************************************* 183dnl Figure out how to build with POSIX threads. 184dnl (Creates PTHREAD_LIBS, PTHREAD_CFLAGS, PTHREAD_CC, 185dnl and defines HAVE_PTHREAD.) 186dnl ********************************************************************* 187ACX_PTHREAD 188dnl maddog: The following matches the original pthread-checking behavior 189dnl in this script, i.e. "If a CFLAG is necessary, use it for 190dnl *everything*." Hopefully, any CFLAGs will eventually go away. 191dnl The other option is to stick PTHREAD_CFLAGS/CC in Makefile.am.... 192CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 193CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" 194CC="$PTHREAD_CC" 195 196oldLIBS="$LIBS" 197LIBS="$LIBS $PTHREAD_LIBS" 198AC_CHECK_FUNC(pthread_attr_getstacksize, 199 [AC_DEFINE(HAVE_PTHREADSTACKSIZE, 1, 200 [pthread stack sizes accesible])]) 201LIBS="$oldLIBS" 202 203AC_CHECK_LIB(jpeg, jpeg_start_compress, 204 [ JPEG_LIBS="-ljpeg" 205 JPEG_CFLAGS="" 206 have_libjpeg=true ],,) 207 208if test x$have_libjpeg != "xtrue"; then 209 AC_MSG_ERROR([JPEG 6b library missing - Go to http://www.ijg.org/]) 210fi 211 212AC_SUBST(JPEG_LIBS) 213AC_SUBST(JPEG_CFLAGS) 214 215PKG_PROG_PKG_CONFIG 216 217have_libquicktime=false 218if test x$with_libquicktime != xno ; then 219 PKG_CHECK_MODULES(LIBQUICKTIME, [libquicktime > 0.9.7], 220 [have_libquicktime=true 221 AC_DEFINE(HAVE_LIBQUICKTIME, 1, [libquicktime > 0.9.7 present])], 222 [have_libquicktime=false]) 223fi 224AM_CONDITIONAL(HAVE_LIBQUICKTIME, test x$have_libquicktime = xtrue) 225 226dnl ********************************************************************* 227dnl Check for PNG library 228dnl (creates LIBPNG_CFLAGS, LIBPNG_LIBS) 229dnl ********************************************************************* 230have_libpng=false 231if test x$with_libpng != xno ; then 232 PKG_CHECK_MODULES(LIBPNG, [libpng], [have_libpng=true], [have_libpng=false]) 233 if test x$have_libpng = xfalse ; then 234 PKG_CHECK_MODULES(LIBPNG, [libpng12], [have_libpng=true], [have_libpng=false]) 235 fi 236fi 237AM_CONDITIONAL(HAVE_LIBPNG, test x$have_libpng = xtrue) 238 239dnl ********************************************************************* 240dnl Check for libdv 241dnl (creates LIBDV_CFLAGS, LIBDV_LIBS; defines HAVE_LIBDV) 242dnl ********************************************************************* 243have_libdv=false 244if test x$with_libdv != xno ; then 245 PKG_CHECK_MODULES(LIBDV, [libdv >= 0.9], 246 [have_libdv=true 247 AC_DEFINE(HAVE_LIBDV, 1, [libdv is present])], 248 [have_libdv=false]) 249fi 250 251dnl ********************************************************************* 252dnl Look for X Window System. 253dnl (creates X_CFLAGS, X_PRE_LIBS, X_EXTRA_LIBS, X_LIBS; 254dnl defines X_DISPLAY_MISSING if no X) 255dnl ********************************************************************* 256AC_PATH_XTRA 257 258dnl ******************************************************************** 259dnl Check to see if __progname is provided by the system 260dnl ******************************************************************** 261AC_CACHE_CHECK([for __progname], 262 [mjt_cv_extern___progname], 263 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], 264 [[extern char *__progname; 265 puts(__progname);]])], 266 [mjt_cv_extern___progname=yes], 267 [mjt_cv_extern___progname=no])]) 268if test x$mjt_cv_extern___progname = xyes ; then 269 AC_DEFINE(HAVE___PROGNAME, 1, [Is __progname defined by system?]) 270fi 271 272dnl ******************************************************************** 273dnl Check for DGA (for v4l-conf) 274dnl ******************************************************************** 275have_dga=false 276if test x$with_dga != xno ; then 277 AC_SUBST(V4LCONF_LIBS) 278 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, 279 V4LCONF_LIBS="$X_LIBS -lXxf86dga" 280 have_dga="true" 281 AC_DEFINE(HAVE_LIBXXF86DGA,1, [libxf86dga is present]), 282 have_dga="false", 283 $X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS) 284fi 285AM_CONDITIONAL(HAVE_LIBXXF86DGA, test x$have_dga = xtrue) 286 287dnl ******************************************************************** 288dnl Check for Gtk+/glib (for glav). 2.4.0 or greater required (should 289dnl not be a problem on recent distributions). 290dnl (defines GTK_CFLAGS and GTK_LIBS) 291dnl ******************************************************************** 292have_gtk=false 293if test x$with_gtk != xno ; then 294 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.4.0], 295 have_gtk="true", have_gtk="false") 296fi 297AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xtrue) 298 299dnl ******************************************************************** 300dnl Check for the SDL library (for software playback) 301dnl (defines SDL_CFLAGS and SDL_LIBS) 302dnl ******************************************************************** 303have_sdl=false 304if test x$with_libsdl != xno ; then 305 PKG_CHECK_MODULES(SDL, [sdl > 1.1.3], 306 [have_sdl=true 307 AC_DEFINE(HAVE_SDL, 1, [libsdl > 1.1.3 present])], 308 [have_sdl=false]) 309fi 310AM_CONDITIONAL(HAVE_SDL, test x$have_sdl = xtrue) 311 312dnl ******************************************************************** 313dnl Check for SDL_gfx which is used by y4mhist to display a graphical 314dnl histogram. 315dnl ******************************************************************** 316have_sdlgfx=false 317if test x$with_sdlgfx != xno ; then 318 AC_SUBST(SDLgfx_LIBS) 319 if test x$have_sdl = xtrue; then 320 OLD_LIBS="$LIBS" 321 LIBS="$LIBS -lSDL -lSDL_gfx" 322 AC_CHECK_LIB(SDL_gfx, vlineColor, 323 [SDLgfx_LIBS="-lSDL_gfx" 324 AC_DEFINE(HAVE_SDLgfx, 1, [SDL_gfx library present]) 325 have_sdlgfx=true ],[have_sdlgfx=false]) 326 LIBS="$OLD_LIBS" 327 fi 328 329fi 330AM_CONDITIONAL(HAVE_SDLgfx, test x$have_sdlgfx = xtrue) 331 332dnl ******************************************************************** 333dnl Test for MMX support if an IA32 platform. If on a PPC then look for 334dnl Altivec support. For the IA32 platform see if gcc understands inline 335dnl MMX instructions. 336dnl 337dnl TODO: host = non intel, target = intel <blah> do the checks also? 338dnl Remember we are checking that the toolchain can generate the 339dnl code, not whether the host can execute the code, thats done 340dnl at run time with the exception of the SSE code. 341 342have_asm_mmx=false 343have_x86cpu=false 344have_altivec=false 345AC_MSG_CHECKING([Architecture]) 346case $host_cpu in 347 i[[3-7]]86) 348 AC_MSG_RESULT(IA32) 349 AC_DEFINE(HAVE_X86CPU,1, [Compiling for x86 architecture CPU]) 350 have_x86cpu=true 351 PROGRAM_NOPIC="-fno-PIC" 352 ;; 353 x86_64*) 354 AC_MSG_RESULT(x86_64) 355 AC_DEFINE(HAVE_X86CPU,1, [Compiling for x86-64 architecture CPU]) 356 have_x86cpu=true 357 have_x86_64cpu=true 358 PROGRAM_NOPIC="-fno-PIC" 359 ;; 360 powerpc | powerpc64) 361 AC_MSG_RESULT(PowerPC) 362 AC_DEFINE(HAVE_PPCCPU,1, [Compiling for PowerPC CPU]) 363 have_ppccpu=true 364 PROGRAM_NOPIC="" 365 ;; 366 *) 367 AC_MSG_RESULT(unknown) 368 PROGRAM_NOPIC="" 369 ;; 370esac 371 372dnl Apple's darwin works on multiple hosts now, so add a catchall override 373dnl after processing normal hosts 374case $host in 375 *-apple-darwin*) 376 PROGRAM_NOPIC="-mdynamic-no-pic" # dynamic-no-pic is an Apple gcc option 377 ;; 378esac 379 380dnl This flag is used for PROGRAMS not SHARED LIBRARIES. PIC code is required 381dnl for shared libraries but is slower than non-pic code. Compute bound 382dnl programs such as yuvdenoise and y4mspatialfilter can use this flag by 383dnl simply adding programname_CFLAGS=@PROGRAM_NOPIC@ to the Makefile.am 384 385AC_SUBST(PROGRAM_NOPIC) 386 387if test "$enable_simd_accel" != "false" -a "$enable_simd_accel" != "no" 388then 389 if test x$have_x86cpu = xtrue 390 then 391 AC_MSG_CHECKING([if C compiler accepts inline MMX assembly]) 392 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], 393 [[__asm__ __volatile__("emms":::"memory");]])], 394 [have_asm_mmx=true], 395 [have_asm_mmx=false]) 396 if test $have_asm_mmx = true; then 397 AC_MSG_RESULT(yes) 398 else 399 AC_MSG_RESULT(no) 400 fi 401 402 if test $have_asm_mmx = true; then 403 AC_DEFINE(HAVE_ASM_MMX,1,[Inline MMX assembly accepted by C compiler]) 404 fi 405 fi 406 407 if test x$have_ppccpu = xtrue 408 then 409 AC_MSG_CHECKING([compiler support for AltiVec]) 410 cat > conftest.c <<EOF 411#ifdef HAVE_ALTIVEC_H 412#include <altivec.h> 413#endif 414int main() { 415 union { vector signed int v; 416 signed int i; 417 } vi; 418 vi.v = vec_splat_s32(1); 419 return vi.i; 420} 421EOF 422 ALTIVEC_CFLAGS="" 423 if $CC -o conftest conftest.c >/dev/null 2>&1; then 424 have_altivec=true 425 elif $CC $CFLAGS -faltivec -maltivec -o conftest conftest.c >/dev/null 2>&1; then 426 # Mac OS X style with -maltivec 427 have_altivec=true 428 ALTIVEC_CFLAGS="-faltivec -maltivec" 429 elif $CC $CFLAGS -faltivec -o conftest conftest.c >/dev/null 2>&1; then 430 # Mac OS X style without -maltivec 431 have_altivec=true 432 ALTIVEC_CFLAGS="-faltivec" 433 elif $CC $CFLAGS -fvec -o conftest conftest.c >/dev/null 2>&1; then 434 # Motorola style 435 have_altivec=true 436 ALTIVEC_CFLAGS="-fvec" 437 elif $CC $CFLAGS -DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec -o conftest conftest.c >/dev/null 2>&1; then 438 # gcc 3.1 style 439 have_altivec=true 440 ALTIVEC_CFLAGS="-DHAVE_ALTIVEC_H=1 -maltivec -mabi=altivec" 441 fi 442 rm -f conftest*; 443 444 if test x$have_altivec = xtrue 445 then 446 CFLAGS="$CFLAGS ${ALTIVEC_CFLAGS}" 447 CXXFLAGS="$CXXFLAGS ${ALTIVEC_CFLAGS}" 448 AC_MSG_RESULT(yes) 449 AC_DEFINE(HAVE_ALTIVEC,1, [Inline PPC Altivec primitives available]) 450 else 451 AC_MSG_RESULT(no) 452 fi 453 fi 454fi 455 456dnl ********************************************************************* 457dnl For x86 and ppc machines check which code model we should use. This is 458dnl done with the helper script cpuinfo.sh because the logic to do the job 459dnl correctly is complex and lengthy (about as long as the entire configure.ac 460dnl file). 461 462if test x$have_x86cpu = xtrue -o x$have_ppccpu = xtrue; then 463 if test x$host_alias != x; then 464 dnl This is to allow cross compiling 465 AC_MSG_CHECKING(sub-architecture settings) 466 if test x$have_x86cpu = xtrue; then 467 host_mod_cpu=`echo $host_cpu | tr _ -` 468 ARCHFLAGS="-march=$host_mod_cpu -mcpu=$host_mod_cpu" 469 fi 470 else 471 if test ! -r $srcdir/cpuinfo.sh; then 472 AC_MSG_ERROR([cpuinfo.sh script not found - do a cvs update]) 473 fi 474 AC_MSG_CHECKING(sub-architecture settings) 475 chmod +x $srcdir/cpuinfo.sh 476 if test x$have_x86cpu = xtrue; then 477 ARCHFLAGS=`$srcdir/cpuinfo.sh x86` 478 elif test x$have_ppccpu = xtrue; then 479 ARCHFLAGS=`$srcdir/cpuinfo.sh ppc` 480 fi 481 fi 482 AC_MSG_RESULT($ARCHFLAGS) 483fi 484 485dnl ********************************************************************** 486dnl Handle forcing static linkage in key places 487if test "x$enable_static_build" = "xyes" ; then 488 echo "Forcing static linkage..." 489 LT_STATIC=-all-static 490else 491 echo enable_static_build="\'${enable_static_build}\'" 492fi 493 494 495 496dnl ********************************************************************** 497dnl All the conditional stuff for the Makefiles 498 499AM_CONDITIONAL(HAVE_ASM_MMX, test x$have_asm_mmx = xtrue) 500AM_CONDITIONAL(HAVE_X86CPU, test x$have_x86cpu = xtrue) 501AM_CONDITIONAL(HAVE_PPCCPU, test x$have_ppccpu = xtrue) 502AM_CONDITIONAL(HAVE_ALTIVEC, test x$have_altivec = xtrue) 503 504# This is a redhat ppc hack - OSX (which also uses gcc4) does NOT have any 505# of the problems with undefined symbols, etc caused by a misplaced reference 506# to an encoder routine (next_larger_quant) in the utils/altivec routines. 507ALTIVEC_EXTRA_LIBS= 508if test x$have_altivec = xtrue; then 509 ALTIVEC_EXTRA_LIBS=-lmpeg2encpp 510fi 511AC_SUBST(ALTIVEC_EXTRA_LIBS) 512 513have_v4l_or_sdl=false 514if test x$have_video4linux = xtrue; then 515 have_v4l_or_sdl=true 516else 517 if test x$have_sdl = xtrue; then 518 have_v4l_or_sdl=true 519 fi 520fi 521AM_CONDITIONAL(HAVE_V4L_OR_SDL, test x$have_v4l_or_sdl = xtrue) 522 523dnl ********************************************************************* 524dnl Check for what warnings we want gcc to use and adjust the CFLAGS 525dnl as needed. This only works for GCC. 526dnl We do this last as it can screw up library detection etc... 527 528CFLAGS="$ARCHFLAGS $CFLAGS" 529CXXFLAGS="$ARCHFLAGS $CXXFLAGS" 530 531if test "x${GCC}" != "xyes" ; then 532 enable_compile_warnings=no 533fi 534AC_MSG_CHECKING(what warning flags to pass to the C compiler) 535warnCFLAGS= 536warnCXXFLAGS= 537if test "x$enable_compile_warnings" != "xno" ; then 538 if test "x$GCC" = "xyes" ; then 539 case "$CFLAGS" in 540 *-Wall*) ;; 541 *) warnCFLAGS="-Wall -Wunused" ;; 542 esac 543 if test "x$enable_compile_warnings" = "xyes" ; then 544 warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" 545 warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" 546 fi 547 if test "x$enable_warnings_as_errors" = "xyes" ; then 548 warnCFLAGS="$warnCFLAGS -Werror" 549 warnCXXFLAGS="$warnCXXFLAGS -Werror" 550 fi 551 fi 552fi 553AC_MSG_RESULT($warnCFLAGS) 554AC_MSG_RESULT($warnCXXFLAGS) 555if test "x$cflags_set" != "xyes" ; then 556 CFLAGS="$CFLAGS $warnCFLAGS" 557 CXXFLAGS="$CXXFLAGS $warnCXXFLAGS" 558 cflags_set=yes 559fi 560 561AC_ARG_ENABLE(assert, 562 AC_HELP_STRING([--disable-assert], 563 [Disable assertions (compile with NDEBUG).]), 564 [ case "$enableval" in yes|no) : ;; *) AC_MSG_ERROR(bad value for --enable-assert) ;; esac ], 565 [ enable_assert=yes ]) 566 567if test x"$enable_assert" = x"no"; then NDEBUG=1; fi 568 569AC_DEFINE(MJPEGTOOLS,1, [Building mjpegtools]) 570 571case x"$NDEBUG" in x"1") 572 AC_DEFINE(NDEBUG,1, [Optimised no DEBUG build, assertions disabled]) 573 ;; 574esac 575 576dnl ********************************************************************** 577dnl Output a Makefile or two and the lib/header descriptor script 578dnl ********************************************************************** 579AC_CONFIG_FILES([ 580 Makefile 581 debian/Makefile 582 debian/control 583 docs/Makefile 584 lavtools/Makefile 585 yuvcorrect/Makefile 586 yuvdenoise/Makefile 587 yuvdeinterlace/Makefile 588 yuvscaler/Makefile 589 y4munsharp/Makefile 590 y4mutils/Makefile 591 yuvfilters/Makefile 592 mpeg2enc/Makefile 593 aenc/Makefile 594 mplex/Makefile 595 scripts/Makefile 596 utils/Makefile 597 utils/altivec/Makefile 598 utils/mmxsse/Makefile 599 y4mdenoise/Makefile 600 y4mscaler/Makefile 601 mjpegtools.pc 602 mjpegtools.spec 603 ]) 604AC_OUTPUT 605 606dnl ************************************************************************ 607dnl Summarize the config for the user. 608dnl ************************************************************************ 609AC_MSG_NOTICE([]) 610AC_MSG_NOTICE([ MJPEG tools ${VERSION} build configuration :]) 611AC_MSG_NOTICE([]) 612if test "$have_x86cpu" = "true" ; then 613 AC_MSG_NOTICE([ - X86 Optimizations:]) 614 AC_MSG_NOTICE([ - MMX/3DNow!/SSE enabled : ${have_asm_mmx}]) 615fi 616if test "$have_ppccpu" = "true" ; then 617 AC_MSG_NOTICE([ - PowerPC Optimizations:]) 618 AC_MSG_NOTICE([ - AltiVec enabled : ${have_altivec}]) 619fi 620if test x"$ARCHFLAGS" != x; then 621 AC_MSG_NOTICE([ - arch/cpu compiler flags : ${ARCHFLAGS}]) 622fi 623if test x"$with_extra_cflags" != "x"; then 624 AC_MSG_NOTICE([ - extra_cflags added to CFLAGS: ${with_extra_cflags}]) 625fi 626AC_MSG_NOTICE([ - video4linux recording/playback: ${have_video4linux}]) 627AC_MSG_NOTICE([ - software MJPEG playback : ${have_sdl}]) 628AC_MSG_NOTICE([ - Quicktime playback/recording : ${have_libquicktime}]) 629AC_MSG_NOTICE([ - PNG input support : ${have_libpng}]) 630AC_MSG_NOTICE([ - AVI MJPEG playback/recording : true (always)]) 631AC_MSG_NOTICE([ - libDV (digital video) support : ${have_libdv} ]) 632AC_MSG_NOTICE([ - Gtk+ support for glav : ${have_gtk}]) 633AC_MSG_NOTICE([]) 634