[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 1609, Mon Apr 4 23:49:37 2005 UTC revision 1794, Fri Nov 14 15:43:28 2008 UTC
# Line 17  Line 17 
17    
18  dnl NASM version requirement  dnl NASM version requirement
19  minimum_nasm_patch_version=34  minimum_nasm_patch_version=34
20    minimum_nasm_minor_version=99
21    minimum_nasm_major_version=2
22  nasm_prog="nasm"  nasm_prog="nasm"
23  yasm_prog="yasm"  yasm_prog="yasm"
24    
# Line 265  Line 267 
267  SPECIFIC_CFLAGS=""  SPECIFIC_CFLAGS=""
268  PRE_SHARED_LIB=""  PRE_SHARED_LIB=""
269  case "$target_os" in  case "$target_os" in
270       *bsd*|linux*|irix*|solaris*)       linux*|solaris*)
271            AC_MSG_RESULT([ok])
272            STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
273            SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\$(API_MINOR)"
274            SPECIFIC_LDFLAGS="-Wl,-soname,libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR) -shared -Wl,--version-script=libxvidcore.ld -lc -lm"
275            SPECIFIC_CFLAGS="-fPIC"
276            ;;
277         *bsd*|irix*)
278          AC_MSG_RESULT([ok])          AC_MSG_RESULT([ok])
279          STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"          STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
280          SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\$(API_MINOR)"          SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\$(API_MINOR)"
# Line 349  Line 358 
358     fi     fi
359    
360     dnl if yasm hasn't been found, then check for nasm (not buggy version)     dnl if yasm hasn't been found, then check for nasm (not buggy version)
361     if test "$found_nasm_comp_prog" = "no" -a "$ARCHITECTURE" != "X86_64" ; then     if test "$found_nasm_comp_prog" = "no" ; then
362         AC_CHECK_PROG([ac_nasm], [$nasm_prog], [yes], [no], , [yes])         AC_CHECK_PROG([ac_nasm], [$nasm_prog], [yes], [no], , [yes])
363         if test "$ac_nasm" = "yes" ; then         if test "$ac_nasm" = "yes" ; then
364             dnl             dnl
# Line 357  Line 366 
366             dnl             dnl
367             AC_MSG_CHECKING([for nasm patch version])             AC_MSG_CHECKING([for nasm patch version])
368             nasm_patch=`$nasm_prog -r | cut -d '.' -f 3 | cut -d ' ' -f 1`             nasm_patch=`$nasm_prog -r | cut -d '.' -f 3 | cut -d ' ' -f 1`
369               nasm_minor=`$nasm_prog -v | cut -d '.' -f 2 | cut -d ' ' -f 1`
370               nasm_major=`$nasm_prog -v | cut -d '.' -f 1 | cut -d ' ' -f 3`
371             if test -z $nasm_patch ; then             if test -z $nasm_patch ; then
372                nasm_patch=-1                nasm_patch=-1
373             fi             fi
374               if test -z $nasm_minor ; then
375                  nasm_minor=-1
376               fi
377               if test -z $nasm_major ; then
378                  nasm_major=-1
379               fi
380             AC_MSG_RESULT([$nasm_patch])             AC_MSG_RESULT([$nasm_patch])
381    
382               dnl need nasm 2.x for SSE3/4 and X86_64
383             if test "$nasm_patch" -lt "$minimum_nasm_patch_version" ; then             if test "$nasm_major" -lt "$minimum_nasm_major_version" ; then
384                 AC_MSG_WARN([nasm patch version is too old])               AC_MSG_WARN([nasm version is too old])
385             else             else
386                 found_nasm_comp_prog="yes"                 found_nasm_comp_prog="yes"
387                         chosen_asm_prog="$nasm_prog"                         chosen_asm_prog="$nasm_prog"
# Line 390  Line 407 
407                 PREFIX="-DPREFIX"                 PREFIX="-DPREFIX"
408                 MARK_FUNCS=""                 MARK_FUNCS=""
409                 ;;                 ;;
410               *darwin*)
411                   AC_MSG_RESULT([macho])
412                   NASM_FORMAT="macho"
413                   PREFIX="-DPREFIX"
414                   MARK_FUNCS=""
415                   ;;
416         esac         esac
417    
418         AS="$chosen_asm_prog"         AS="$chosen_asm_prog"
# Line 538  Line 561 
561    
562  dnl ==========================================================================  dnl ==========================================================================
563  dnl  dnl
564    dnl Check for pthread
565    dnl
566    dnl ==========================================================================
567    
568    AC_CHECK_HEADER(
569            pthread.h,
570            AC_CHECK_LIB(
571                    pthread,
572                    pthread_create,
573                    AC_CHECK_LIB(
574                            pthread,
575                            pthread_join,
576                            SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_PTHREAD"
577                            SPECIFIC_LDFLAGS="$SPECIFIC_LDFLAGS -lpthread",
578                            AC_MSG_WARN(Pthread not supported. No SMP support)),
579                    AC_MSG_WARN(Pthread not supported. No SMP support)),
580            AC_MSG_WARN(Pthread not supported. No SMP support))
581    
582    dnl ==========================================================================
583    dnl
584  dnl Now we can set CFLAGS if needed  dnl Now we can set CFLAGS if needed
585  dnl  dnl
586  dnl ==========================================================================  dnl ==========================================================================
# Line 562  Line 605 
605  fi  fi
606    
607  dnl ==========================================================================  dnl ==========================================================================
608    dnl Some gcc flags can't be used for gcc >= 3.4.0
609    dnl ==========================================================================
610    
611    if test "$GCC" = "yes" ; then
612    cat << EOF > test.c
613    #include <stdio.h>
614    int main(int argc, char **argv)
615    {
616            if (*argv[[1]] == 'M') {
617                    printf("%d", __GNUC__);
618            }
619            if (*argv[[1]] == 'm') {
620                    printf("%d", __GNUC_MINOR__);
621            }
622            return 0;
623    }
624    EOF
625            $CC -o gcc-ver test.c
626    
627            GCC_MAJOR=`./gcc-ver M`
628            GCC_MINOR=`./gcc-ver m`
629    
630            rm -f test.c
631            rm -f gcc-ver
632    
633            # GCC 4.x
634            if test "${GCC_MAJOR}" -gt 3 ; then
635                    CFLAGS=`echo $CFLAGS | sed s,"-mcpu","-mtune",g`
636                    CFLAGS=`echo $CFLAGS | sed s,'-freduce-all-givs','',g`
637                    CFLAGS=`echo $CFLAGS | sed s,'-fmove-all-movables','',g`
638                    CFLAGS=`echo $CFLAGS | sed s,'-fnew-ra','',g`
639                    CFLAGS=`echo $CFLAGS | sed s,'-fwritable-strings','',g`
640            fi
641    
642            # GCC 3.4.x
643            if test "${GCC_MAJOR}" -eq 3 && test "${GCC_MINOR}" -gt 3 ; then
644                    CFLAGS=`echo $CFLAGS | sed s,"-mcpu","-mtune",g`
645            fi
646    fi
647    
648    
649    dnl ==========================================================================
650  dnl  dnl
651  dnl Substitions  dnl Substitions
652  dnl  dnl

Legend:
Removed from v.1609  
changed lines
  Added in v.1794

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