[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 1382, Mon Mar 22 22:36:25 2004 UTC revision 1472, Sat Jun 12 13:02:12 2004 UTC
# Line 2  Line 2 
2  dnl  dnl
3  dnl Autoconf script for XviD  dnl Autoconf script for XviD
4  dnl  dnl
5  dnl Copyright(C) 2003 Edouard Gomez <ed.gomez@free.fr>  dnl Copyright(C) 2003-2004 Edouard Gomez <ed.gomez@free.fr>
6  dnl  dnl
7  dnl ==========================================================================  dnl ==========================================================================
8    
9  AC_INIT([XviD], [1.0.0 rc3], [xvid-devel@xvid.org])  AC_PREREQ([2.50])
10    
11    AC_INIT([XviD], [1.0.1], [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 162  Line 164 
164                  ;;                  ;;
165                  powerpc)                  powerpc)
166                  AC_MSG_RESULT(PowerPC)                  AC_MSG_RESULT(PowerPC)
167                  dnl ATM the ppc port is out of date                  ARCHITECTURE="PPC"
                 dnl ARCHITECTURE="PPC"  
                 ARCHITECTURE="GENERIC"  
168                  ;;                  ;;
169                  ia64)                  ia64)
170                  AC_MSG_RESULT(ia64)                  AC_MSG_RESULT(ia64)
# Line 382  Line 382 
382  dnl  dnl
383  dnl PPC  dnl PPC
384  dnl  dnl
385    dnl With the PPC platform we do not use assembly language, we better keep with
386    dnl intrinsic altivec functions and types as they are supported by both Apple
387    dnl and GNU gcc with very slight changes to code which can be sumed up by:
388    dnl
389    dnl Apple:
390    dnl  - compile with the option -faltivec
391    dnl  - define vectors with parentheses vec = (0,0,0,0)
392    dnl GNU
393    dnl  - compile with -maltivec -mabi=altivec
394    dnl  - include <altivec.h> before using intrincic
395    dnl  - define vectors with vec = {0,0,0,0}
396    dnl
397    dnl * The compile time option will be "injected" into SPECIFIC_CFLAGS variable
398    dnl * The need for altivec.h will also be injected into SPECIFIC_CFLAGS through
399    dnl   a -DHAVE_ALTIVEC_H
400    dnl * The vector definition is handled in portab.h thx to
401    dnl   HAVE_PARENTHESES/BRACES_ALTIVEC_DECL
402    dnl
403    PPC_ALTIVEC_SOURCES=""
404  if test "$ARCHITECTURE" = "PPC" ; then  if test "$ARCHITECTURE" = "PPC" ; then
405     AS="\$(CC)"     AS="\$(CC)"
406     AFLAGS="-c"     AFLAGS=""
407     ASSEMBLY_EXTENSION="s"     ASSEMBLY_EXTENSION=".s"
408     ASSEMBLY_SOURCES="SRC_PPC"     ASSEMBLY_SOURCES=""
409     AC_MSG_CHECKING([for Altivec support])  
410     cat > conftest.S << EOF     AC_MSG_CHECKING([for altivec.h])
411           .text  cat > conftest.c << EOF
412           vxor 0,0,0  #include <altivec.h>
413    int main() { return(0); }
414  EOF  EOF
415     if $CC -c conftest.S 2>/dev/null 1>/dev/null ; then     if $CC -faltivec -c conftest.c 2>/dev/null 1>/dev/null || \
416          $CC -maltivec -mabi=altivec -c conftest.c 2>/dev/null 1>/dev/null ; then
417          AC_MSG_RESULT(yes)          AC_MSG_RESULT(yes)
418          SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DARCH_IS_PPC_ALTIVEC"          SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_ALTIVEC_H"
419          ASSEMBLY_SOURCES="SRC_ALTIVEC"          TEMP_ALTIVEC="-DHAVE_ALTIVEC_H"
420     else     else
421          AC_MSG_RESULT(no)          AC_MSG_RESULT(no)
422            TEMP_ALTIVEC=""
423     fi     fi
424    
425       AC_MSG_CHECKING([for Altivec compiler support])
426    cat > conftest.c << EOF
427    #ifdef HAVE_ALTIVEC_H
428    #include <altivec.h>
429    #endif
430    
431    int main()
432    {
433      vector unsigned int vartest2 = (vector unsigned int)(0);
434      vector unsigned int vartest3 = (vector unsigned int)(1);
435      vartest2 = vec_add(vartest2, vartest3);
436      return(0);
437    }
438    EOF
439       if $CC $TEMP_ALTIVEC -faltivec -c conftest.c 2>/dev/null 1>/dev/null ; then
440            AC_MSG_RESULT([yes (Apple)])
441            SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -faltivec -DHAVE_ALTIVEC_PARENTHESES_DECL $TEMP_ALTIVEC"
442            PPC_ALTIVEC_SOURCES="SRC_PPC_ALTIVEC"
443       else
444    cat > conftest.c << EOF
445    #ifdef HAVE_ALTIVEC_H
446    #include <altivec.h>
447    #endif
448    
449    int main()
450    {
451      vector unsigned int vartest2 = (vector unsigned int){0};
452      vector unsigned int vartest3 = (vector unsigned int){1};
453      vartest2 = vec_add(vartest2, vartest3);
454      return(0);
455    }
456    EOF
457       if $CC $TEMP_ALTIVEC -maltivec -mabi=altivec -c conftest.c 2>/dev/null 1>/dev/null ; then
458            AC_MSG_RESULT([yes (GNU)])
459            SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -maltivec -mabi=altivec -DHAVE_ALTIVEC_BRACES_DECL $TEMP_ALTIVEC"
460            PPC_ALTIVEC_SOURCES="SRC_PPC_ALTIVEC"
461       else
462            AC_MSG_RESULT([no (ppc support won't be compiled in)])
463            dnl Only C code can be compiled :-(
464            ARCHITECTURE="GENERIC"
465       fi
466       fi
467    
468     rm -f conftest.*     rm -f conftest.*
469  fi  fi
470    
# Line 439  Line 504 
504  AC_CHECK_HEADERS(  AC_CHECK_HEADERS(
505          stdio.h \          stdio.h \
506          signal.h \          signal.h \
507            stdlib.h \
508            string.h \
509            assert.h \
510            math.h \
511          , , AC_MSG_ERROR(Missing header file))          , , AC_MSG_ERROR(Missing header file))
512    
513  dnl ==========================================================================  dnl ==========================================================================
# Line 490  Line 559 
559  AC_SUBST(SPECIFIC_LDFLAGS)  AC_SUBST(SPECIFIC_LDFLAGS)
560  AC_SUBST(SPECIFIC_CFLAGS)  AC_SUBST(SPECIFIC_CFLAGS)
561  AC_SUBST(DCT_IA64_SOURCES)  AC_SUBST(DCT_IA64_SOURCES)
562    AC_SUBST(PPC_ALTIVEC_SOURCES)
563  AC_SUBST(RANLIB)  AC_SUBST(RANLIB)
564  AC_SUBST(API_MAJOR)  AC_SUBST(API_MAJOR)
565  AC_SUBST(API_MINOR)  AC_SUBST(API_MINOR)

Legend:
Removed from v.1382  
changed lines
  Added in v.1472

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