[x264-devel] Change ppccommon.h's inclusion of the AltiVec header to not be OS specific.

Brad brad at comstyle.com
Thu Jan 8 08:57:56 CET 2009

The following diff changes the PowerPC ppccommon.h header so it no longer
checks for a particular OS such as Linux but instead looks for HAVE_ALTIVEC_H
being set. Since at the moment AltiVec is hardcoded on in the configure
script I have just added the setting of the flag unconditional just as the
flag is since the header is necessary if using the flag and the associated
code. This fixes the PowerPC build on OpenBSD/PowerPC and would also fix
NetBSD/PowerPC, FreeBSD/PowerPC and who knows what other PowerPC OS's
trying to use the AltiVec code.

--- configure.orig	Wed Jan  7 16:45:07 2009
+++ configure	Wed Jan  7 23:17:23 2009
@@ -263,7 +263,7 @@ case $host_cpu in
       ALTIVECFLAGS="$ALTIVECFLAGS -faltivec -fastf -mcpu=G4"
-      ALTIVECFLAGS="$ALTIVECFLAGS -maltivec -mabi=altivec"
+      ALTIVECFLAGS="$ALTIVECFLAGS -maltivec -mabi=altivec -DHAVE_ALTIVEC_H"
--- common/ppc/ppccommon.h.orig	Tue Jan  6 14:09:10 2009
+++ common/ppc/ppccommon.h	Tue Jan  6 14:09:32 2009
@@ -18,7 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
-#ifdef SYS_LINUX
 #include <altivec.h>

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the x264-devel mailing list