[svn] / trunk / xvidcore / build / generic / configure.in Repository:
ViewVC logotype

Diff of /trunk/xvidcore/build/generic/configure.in

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

revision 1411, Sun Apr 4 20:39:58 2004 UTC revision 1412, Mon Apr 5 20:36:37 2004 UTC
# Line 6  Line 6 
6  dnl  dnl
7  dnl ==========================================================================  dnl ==========================================================================
8    
9  AC_INIT([XviD], [1.0.0 rc3], [xvid-devel@xvid.org])  AC_INIT([XviD], [1.0.0 rc4], [xvid-devel@xvid.org])
10  AC_CONFIG_SRCDIR(configure.in)  AC_CONFIG_SRCDIR(configure.in)
11    
12  dnl Do not forget to increase that when needed.  dnl Do not forget to increase that when needed.
# Line 162  Line 162 
162                  ;;                  ;;
163                  powerpc)                  powerpc)
164                  AC_MSG_RESULT(PowerPC)                  AC_MSG_RESULT(PowerPC)
165                  dnl ATM the ppc port is out of date                  ARCHITECTURE="PPC"
                 dnl ARCHITECTURE="PPC"  
                 ARCHITECTURE="GENERIC"  
166                  ;;                  ;;
167                  ia64)                  ia64)
168                  AC_MSG_RESULT(ia64)                  AC_MSG_RESULT(ia64)
# Line 382  Line 380 
380  dnl  dnl
381  dnl PPC  dnl PPC
382  dnl  dnl
383    dnl With the PPC platform we do not use assembly language, we better keep with
384    dnl intrinsic altivec functions and types as they are supported by both Apple
385    dnl and GNU gcc with very slight changes to code which can be sumed up by:
386    dnl
387    dnl Apple:
388    dnl  - compile with the option -faltivec
389    dnl  - define vectors with parentheses vec = (0,0,0,0)
390    dnl GNU
391    dnl  - compile with -maltivec -mabi=altivec
392    dnl  - include <altivec.h> before using intrincic
393    dnl  - define vectors with vec = {0,0,0,0}
394    dnl
395    dnl * The compile time option will be "injected" into SPECIFIC_CFLAGS variable
396    dnl * The need for altivec.h will also be injected into SPECIFIC_CFLAGS through
397    dnl   a -DHAVE_ALTIVEC_H
398    dnl * The vector definition is handled in portab.h thx to
399    dnl   HAVE_PARENTHESES/BRACES_ALTIVEC_DECL
400    dnl
401    PPC_ALTIVEC_SOURCES=""
402  if test "$ARCHITECTURE" = "PPC" ; then  if test "$ARCHITECTURE" = "PPC" ; then
403     AS="\$(CC)"     AS="\$(CC)"
404     AFLAGS="-c"     AFLAGS=""
405     ASSEMBLY_EXTENSION="s"     ASSEMBLY_EXTENSION=".s"
406     ASSEMBLY_SOURCES="SRC_PPC"     ASSEMBLY_SOURCES=""
407     AC_MSG_CHECKING([for Altivec support])  
408     cat > conftest.S << EOF     AC_MSG_CHECKING([for altivec.h])
409           .text  cat > conftest.c << EOF
410           vxor 0,0,0  #include <altivec.h>
411    int main() { return(0); }
412  EOF  EOF
413     if $CC -c conftest.S 2>/dev/null 1>/dev/null ; then     if $CC -faltivec -c conftest.c 2>/dev/null 1>/dev/null || \
414          $CC -maltivec -mabi=altivec -c conftest.c 2>/dev/null 1>/dev/null ; then
415          AC_MSG_RESULT(yes)          AC_MSG_RESULT(yes)
416          SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DARCH_IS_PPC_ALTIVEC"          SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_ALTIVEC_H"
417          ASSEMBLY_SOURCES="SRC_ALTIVEC"          TEMP_ALTIVEC="-DHAVE_ALTIVEC_H"
418     else     else
419          AC_MSG_RESULT(no)          AC_MSG_RESULT(no)
420            TEMP_ALTIVEC=""
421     fi     fi
422    
423       AC_MSG_CHECKING([for Altivec compiler support])
424    cat > conftest.c << EOF
425    #ifdef HAVE_ALTIVEC_H
426    #include <altivec.h>
427    #endif
428    
429    int main()
430    {
431      vector unsigned int vartest2 = (vector unsigned int)(0);
432      vector unsigned int vartest3 = (vector unsigned int)(1);
433      vartest2 = vec_add(vartest2, vartest3);
434      return(0);
435    }
436    EOF
437       if $CC $TEMP_ALTIVEC -faltivec -c conftest.c 2>/dev/null 1>/dev/null ; then
438            AC_MSG_RESULT([yes (Apple)])
439            SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -faltivec -DHAVE_ALTIVEC_PARENTHESES_DECL $TEMP_ALTIVEC"
440            PPC_ALTIVEC_SOURCES="SRC_PPC_ALTIVEC"
441       else
442    cat > conftest.c << EOF
443    #ifdef HAVE_ALTIVEC_H
444    #include <altivec.h>
445    #endif
446    
447    int main()
448    {
449      vector unsigned int vartest2 = (vector unsigned int){0};
450      vector unsigned int vartest3 = (vector unsigned int){1};
451      vartest2 = vec_add(vartest2, vartest3);
452      return(0);
453    }
454    EOF
455       if $CC $TEMP_ALTIVEC -maltivec -mabi=altivec -c conftest.c 2>/dev/null 1>/dev/null ; then
456            AC_MSG_RESULT([yes (GNU)])
457            SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -maltivec -mabi=altivec -DHAVE_ALTIVEC_BRACES_DECL $TEMP_ALTIVEC"
458            PPC_ALTIVEC_SOURCES="SRC_PPC_ALTIVEC"
459       else
460            AC_MSG_RESULT([no (ppc support won't be compiled in)])
461            dnl Only C code can be compiled :-(
462            ARCHITECTURE="GENERIC"
463       fi
464       fi
465    
466     rm -f conftest.*     rm -f conftest.*
467  fi  fi
468    
# Line 490  Line 553 
553  AC_SUBST(SPECIFIC_LDFLAGS)  AC_SUBST(SPECIFIC_LDFLAGS)
554  AC_SUBST(SPECIFIC_CFLAGS)  AC_SUBST(SPECIFIC_CFLAGS)
555  AC_SUBST(DCT_IA64_SOURCES)  AC_SUBST(DCT_IA64_SOURCES)
556    AC_SUBST(PPC_ALTIVEC_SOURCES)
557  AC_SUBST(RANLIB)  AC_SUBST(RANLIB)
558  AC_SUBST(API_MAJOR)  AC_SUBST(API_MAJOR)
559  AC_SUBST(API_MINOR)  AC_SUBST(API_MINOR)

Legend:
Removed from v.1411  
changed lines
  Added in v.1412

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