Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
e0c0ea96
Commit
e0c0ea96
authored
Aug 23, 2005
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* configure.ac: reworked the AltiVec checks.
parent
fab0ba86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
31 deletions
+46
-31
configure.ac
configure.ac
+46
-31
No files found.
configure.ac
View file @
e0c0ea96
...
...
@@ -1112,43 +1112,58 @@ 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)])
dnl The AltiVec C extensions
dnl
dnl There are several possible cases:
dnl - OS X PPC, gcc 4.x: use -mpim-altivec, don't need <altivec.h>
dnl - OS X PPC, gcc 3.x: need -faltivec, don't need <altivec.h>
dnl - Linux PPC, gcc 4.x: need <altivec.h> which itself requires -maltivec
dnl - Linux PPC, gcc 3.3: need <altivec.h> and -maltivec -mabi=altivec
dnl - Linux PPC, gcc 3.x: need <altivec.h> and -fvec
dnl - Others: test should fail
AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
[ac_cv_c_altivec],
[# OS X/PPC test (gcc 4.x)
CFLAGS="${CFLAGS_save} -mpim-altivec"
AC_TRY_COMPILE([],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-mpim-altivec"],
[# OS X/PPC test (gcc 3.x)
CFLAGS="${CFLAGS_save} -faltivec"
AC_TRY_COMPILE([],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-faltivec"],
dnl Below this are the Linux tests
[# Linux/PPC test (gcc 4.x)
CFLAGS="${CFLAGS_save} -maltivec"
AC_TRY_COMPILE([#include <altivec.h>],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-maltivec"],
[# Linux/PPC test (gcc 3.3)
CFLAGS="${CFLAGS_save} -maltivec -mabi=altivec"
AC_TRY_COMPILE([#include <altivec.h>],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec=""
ac_cv_c_altivec_abi="-maltivec -mabi=altivec"],
[# Linux/PPC test (gcc 3.3)
CFLAGS="${CFLAGS_save} -fvec"
AC_TRY_COMPILE([#include <altivec.h>],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-fvec"],
[ac_cv_c_altivec=no])
])
])
])
])
CFLAGS="${CFLAGS_save}"
])
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],
[# Linux/PPC test (no flags)
CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -maltivec -mabi=altivec"
AC_TRY_COMPILE([#ifdef HAVE_ALTIVEC_H
#include <altivec.h>
#endif],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec=""
ac_cv_c_altivec_abi="-maltivec -mabi=altivec"],
[# Darwin test
CFLAGS="${CFLAGS_save} -faltivec"
AC_TRY_COMPILE([],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-faltivec"],
[# Linux/PPC test (old GCC versions)
CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
AC_TRY_COMPILE([#ifdef HAVE_ALTIVEC_H
#include <altivec.h>
#endif],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-fvec"],
[ac_cv_c_altivec=no])
])
])
CFLAGS="${CFLAGS_save}"])
if test "${ac_cv_c_altivec}" != "no"; then
AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
VLC_ADD_CFLAGS([vlc],[${ac_cv_c_altivec}])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment