]> git.sesse.net Git - vlc/commitdiff
* configure.ac: on Linux PPC and gcc 4.x, we need to check for the -maltivec
authorSam Hocevar <sam@videolan.org>
Tue, 23 Aug 2005 09:44:45 +0000 (09:44 +0000)
committerSam Hocevar <sam@videolan.org>
Tue, 23 Aug 2005 09:44:45 +0000 (09:44 +0000)
    flag before trying to use <altivec.h>.

configure.ac

index 91fc1ce3b9c0e40c0b084206314fe80365ed6c20..b658f66b2e7c12f937bed4f9de411da26c5cf93a 100644 (file)
@@ -655,7 +655,7 @@ AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h stdbool.h getopt.h strings.h i
 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
-AC_CHECK_HEADERS(machine/param.h sys/shm.h altivec.h)
+AC_CHECK_HEADERS(machine/param.h sys/shm.h)
 AC_CHECK_HEADERS(linux/version.h)
 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
 
@@ -1108,6 +1108,17 @@ if test "${ac_cv_altivec_inline}" != "no"; then
   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
 fi
 
+dnl Check for <altivec.h>, gcc 4.x needs -maltivec for it
+AC_CACHE_CHECK([if \$CC accepts -maltivec],
+    [ac_cv_c_maltivec],
+    [CFLAGS="${CFLAGS_save} -maltivec"
+     AC_TRY_COMPILE([],,ac_cv_c_maltivec=yes, ac_cv_c_maltivec=no)])
+if test "${ac_cv_c_maltivec}" != "no"; then
+  CPPFLAGS="${CPPFLAGS_save} -maltivec"
+fi
+AC_CHECK_HEADERS(altivec.h)
+CPPFLAGS="${CPPFLAGS_save}"
+
 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
     [ac_cv_c_altivec],
     [# Darwin test