[svn] / branches / release-1_3-branch / xvidcore / build / generic / configure.in Repository:
ViewVC logotype

Diff of /branches/release-1_3-branch/xvidcore/build/generic/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1617, Mon May 23 09:29:43 2005 UTC revision 1797, Wed Nov 26 02:17:50 2008 UTC
# Line 1  Line 1 
1  dnl ==========================================================================  dnl ==========================================================================
2  dnl  dnl
3  dnl Autoconf script for XviD  dnl Autoconf script for Xvid
4  dnl  dnl
5  dnl Copyright(C) 2003-2004 Edouard Gomez <ed.gomez@free.fr>  dnl Copyright(C) 2003-2004 Edouard Gomez <ed.gomez@free.fr>
6  dnl  dnl
# Line 8  Line 8 
8    
9  AC_PREREQ([2.50])  AC_PREREQ([2.50])
10    
11  AC_INIT([XviD], [1.1.0-beta2], [xvid-devel@xvid.org])  AC_INIT([Xvid], [1.2.0], [xvid-devel@xvid.org])
12  AC_CONFIG_SRCDIR(configure.in)  AC_CONFIG_SRCDIR(configure.in)
13    
14  dnl Do not forget to increase that when needed.  dnl Do not forget to increase that when needed.
# Line 16  Line 16 
16  API_MINOR="1"  API_MINOR="1"
17    
18  dnl NASM version requirement  dnl NASM version requirement
19  minimum_nasm_patch_version=34  minimum_nasm_minor_version=0
20    minimum_nasm_major_version=2
21  nasm_prog="nasm"  nasm_prog="nasm"
 yasm_prog="yasm"  
22    
23  dnl Default CFLAGS -- Big impact on overall speed  dnl Default CFLAGS -- Big impact on overall speed
24  our_cflags_defaults="-Wall"  our_cflags_defaults="-Wall"
25  our_cflags_defaults="$our_cflags_defaults -O2"  our_cflags_defaults="$our_cflags_defaults -O2"
26  our_cflags_defaults="$our_cflags_defaults -fstrength-reduce"  our_cflags_defaults="$our_cflags_defaults -fstrength-reduce"
27  our_cflags_defaults="$our_cflags_defaults -finline-functions"  our_cflags_defaults="$our_cflags_defaults -finline-functions"
 our_cflags_defaults="$our_cflags_defaults -freduce-all-givs"  
28  our_cflags_defaults="$our_cflags_defaults -ffast-math"  our_cflags_defaults="$our_cflags_defaults -ffast-math"
29  our_cflags_defaults="$our_cflags_defaults -fomit-frame-pointer"  our_cflags_defaults="$our_cflags_defaults -fomit-frame-pointer"
30    
# Line 199  Line 198 
198          BUS="64BIT"          BUS="64BIT"
199          ;;          ;;
200       *)       *)
201          AC_MSG_ERROR([XviD supports only 32/64 bit architectures])          AC_MSG_ERROR([Xvid supports only 32/64 bit architectures])
202          ;;          ;;
203  esac  esac
204    
# Line 341  Line 340 
340    
341     dnl     dnl
342     dnl Checking for nasm compatible programs     dnl Checking for nasm compatible programs
    dnl yasm is preferred over nasm, because... i can use it  
    dnl to profile assembly code ;-)  
343     dnl     dnl
344    
345     found_nasm_comp_prog="no"     found_nasm_comp_prog="no"
346     chosen_asm_prog=""     chosen_asm_prog=""
347    
348     dnl Check for yasm first     dnl Check for nasm (not buggy version)
349     AC_CHECK_PROG([ac_yasm], [$yasm_prog], [yes], [no], , [yes])     if test "$found_nasm_comp_prog" = "no" ; then
    if test "$ac_yasm" = "yes" ; then  
      found_nasm_comp_prog="yes"  
      chosen_asm_prog="$yasm_prog"  
    fi  
   
    dnl if yasm hasn't been found, then check for nasm (not buggy version)  
    if test "$found_nasm_comp_prog" = "no" -a "$ARCHITECTURE" != "X86_64" ; then  
350         AC_CHECK_PROG([ac_nasm], [$nasm_prog], [yes], [no], , [yes])         AC_CHECK_PROG([ac_nasm], [$nasm_prog], [yes], [no], , [yes])
351         if test "$ac_nasm" = "yes" ; then         if test "$ac_nasm" = "yes" ; then
352             dnl             dnl
353             dnl Checking nasm patch version             dnl Checking nasm version
354             dnl             dnl
355             AC_MSG_CHECKING([for nasm patch version])             AC_MSG_CHECKING([for nasm version])
356             nasm_patch=`$nasm_prog -r | cut -d '.' -f 3 | cut -d ' ' -f 1`             nasm_minor=`$nasm_prog -v | cut -d '.' -f 2 | cut -d ' ' -f 1`
357             if test -z $nasm_patch ; then             nasm_major=`$nasm_prog -v | cut -d '.' -f 1 | cut -d ' ' -f 3`
358                nasm_patch=-1             if test -z $nasm_minor ; then
359             fi                nasm_minor=-1
360             AC_MSG_RESULT([$nasm_patch])             fi
361               if test -z $nasm_major ; then
362                  nasm_major=-1
363             if test "$nasm_patch" -lt "$minimum_nasm_patch_version" ; then             fi
364                 AC_MSG_WARN([nasm patch version is too old])             AC_MSG_RESULT([$nasm_major])
365    
366               dnl need nasm 2.x for SSE3/4 and X86_64
367               if test "$nasm_major" -lt "$minimum_nasm_major_version" ; then
368                 AC_MSG_WARN([nasm version is too old])
369             else             else
370                 found_nasm_comp_prog="yes"                 found_nasm_comp_prog="yes"
371                         chosen_asm_prog="$nasm_prog"                         chosen_asm_prog="$nasm_prog"
# Line 386  Line 380 
380         AC_MSG_CHECKING([for asm object format])         AC_MSG_CHECKING([for asm object format])
381         case "$target_os" in         case "$target_os" in
382             *bsd*|linux*|beos|irix*|solaris*)             *bsd*|linux*|beos|irix*|solaris*)
383                   if test "$ARCHITECTURE" = "X86_64" ; then
384                       AC_MSG_RESULT([elf64])
385                       NASM_FORMAT="elf64"
386                   else
387                 AC_MSG_RESULT([elf])                 AC_MSG_RESULT([elf])
388                 NASM_FORMAT="elf"                 NASM_FORMAT="elf"
389                   fi
390                 MARK_FUNCS="-DMARK_FUNCS"                 MARK_FUNCS="-DMARK_FUNCS"
391                     PREFIX=""                     PREFIX=""
392                 ;;                 ;;
393             [[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]*|mingw32*|mks*)             [[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]*|mingw32*|mks*)
394                   if test "$ARCHITECTURE" = "X86_64" ; then
395                       AC_MSG_RESULT([win64])
396                       NASM_FORMAT="win64"
397                   else
398                 AC_MSG_RESULT([win32])                 AC_MSG_RESULT([win32])
399                 NASM_FORMAT="win32"                 NASM_FORMAT="win32"
400                   fi
401                   PREFIX="-DWINDOWS"
402                   MARK_FUNCS=""
403                   ;;
404               *darwin*)
405                   AC_MSG_RESULT([macho])
406                   NASM_FORMAT="macho"
407                 PREFIX="-DPREFIX"                 PREFIX="-DPREFIX"
408                 MARK_FUNCS=""                 MARK_FUNCS=""
409                 ;;                 ;;
# Line 401  Line 411 
411    
412         AS="$chosen_asm_prog"         AS="$chosen_asm_prog"
413         ASSEMBLY_EXTENSION="asm"         ASSEMBLY_EXTENSION="asm"
414         AFLAGS="-I\$(<D)/ -f $NASM_FORMAT $PREFIX $MARK_FUNCS"         AFLAGS="-I\$(<D)/ -I../../src/ -f $NASM_FORMAT $PREFIX $MARK_FUNCS"
415         ASSEMBLY_SOURCES="SRC_${ARCHITECTURE}"         ASSEMBLY_SOURCES="SRC_${ARCHITECTURE}"
416         if test "$ARCHITECTURE" = "X86_64" ; then         if test "$ARCHITECTURE" = "X86_64" ; then
417                 AFLAGS=${AFLAGS}" -m amd64"                 AFLAGS=${AFLAGS}" -DARCH_IS_X86_64"
418         fi         fi
419     else     else
420         AC_MSG_WARN([no correct assembler was found - Compiling generic sources only])         AC_MSG_WARN([no correct assembler was found - Compiling generic sources only])
# Line 545  Line 555 
555    
556  dnl ==========================================================================  dnl ==========================================================================
557  dnl  dnl
558    dnl Check for pthread
559    dnl
560    dnl ==========================================================================
561    
562    AC_CHECK_HEADER(
563            pthread.h,
564            AC_CHECK_LIB(
565                    pthread,
566                    pthread_create,
567                    AC_CHECK_LIB(
568                            pthread,
569                            pthread_join,
570                            SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_PTHREAD"
571                            SPECIFIC_LDFLAGS="$SPECIFIC_LDFLAGS -lpthread",
572                            AC_MSG_WARN(Pthread not supported. No SMP support)),
573                    AC_MSG_WARN(Pthread not supported. No SMP support)),
574            AC_MSG_WARN(Pthread not supported. No SMP support))
575    
576    dnl ==========================================================================
577    dnl
578  dnl Now we can set CFLAGS if needed  dnl Now we can set CFLAGS if needed
579  dnl  dnl
580  dnl ==========================================================================  dnl ==========================================================================

Legend:
Removed from v.1617  
changed lines
  Added in v.1797

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4