Commit 2bdac4e4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

WTF?! VLC is NOT a f***ing COMPILER.

It has NO target.
parent affe4d59
...@@ -12,6 +12,7 @@ CODENAME="Grishenko" ...@@ -12,6 +12,7 @@ CODENAME="Grishenko"
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_CONFIG_SRCDIR(src/libvlc.c) AC_CONFIG_SRCDIR(src/libvlc.c)
AC_CONFIG_AUX_DIR(autotools) AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([1.7 check-news dist-bzip2]) AM_INIT_AUTOMAKE([1.7 check-news dist-bzip2])
...@@ -139,7 +140,7 @@ LDFLAGS_vlc="${LDFLAGS}" ...@@ -139,7 +140,7 @@ LDFLAGS_vlc="${LDFLAGS}"
dnl dnl
dnl Check the operating system dnl Check the operating system
dnl dnl
case "${target_os}" in case "${host_os}" in
"") "")
SYS=unknown SYS=unknown
;; ;;
...@@ -152,9 +153,9 @@ case "${target_os}" in ...@@ -152,9 +153,9 @@ case "${target_os}" in
VLC_ADD_LDFLAGS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd]) VLC_ADD_LDFLAGS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd])
;; ;;
*bsd*) *bsd*)
SYS="${target_os}" SYS="${host_os}"
CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}" CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
case "${target_os}" in case "${host_os}" in
freebsd*) freebsd*)
CPPFLAGS_save="${CPPFLAGS_save} -I/usr/local/include" CPPFLAGS_save="${CPPFLAGS_save} -I/usr/local/include"
CPPFLAGS="${CPPFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}"
...@@ -188,7 +189,7 @@ case "${target_os}" in ...@@ -188,7 +189,7 @@ case "${target_os}" in
AC_CHECK_TOOL(WINDRES, windres, :) AC_CHECK_TOOL(WINDRES, windres, :)
enable_libtool="no" enable_libtool="no"
case "${target_os}" in case "${host_os}" in
*mingw32*) *mingw32*)
SYS=mingw32 SYS=mingw32
;; ;;
...@@ -257,7 +258,7 @@ case "${target_os}" in ...@@ -257,7 +258,7 @@ case "${target_os}" in
fi fi
;; ;;
*) *)
SYS="${target_os}" SYS="${host_os}"
;; ;;
esac esac
AM_CONDITIONAL(HAVE_BEOS, test "${SYS}" = "beos") AM_CONDITIONAL(HAVE_BEOS, test "${SYS}" = "beos")
...@@ -970,7 +971,7 @@ AC_CACHE_CHECK([if \$CC accepts -Os], ...@@ -970,7 +971,7 @@ AC_CACHE_CHECK([if \$CC accepts -Os],
[ac_cv_c_os], [ac_cv_c_os],
[CFLAGS="${CFLAGS_save} -Os" [CFLAGS="${CFLAGS_save} -Os"
AC_TRY_COMPILE([],,ac_cv_c_os=yes, ac_cv_c_os=no)]) AC_TRY_COMPILE([],,ac_cv_c_os=yes, ac_cv_c_os=no)])
if test "${ac_cv_c_os}" != "no" -a "${target_cpu}" = "mipsel"; then if test "${ac_cv_c_os}" != "no" -a "${host_cpu}" = "mipsel"; then
CFLAGS_OPTIM="${CFLAGS_OPTIM} -Os" CFLAGS_OPTIM="${CFLAGS_OPTIM} -Os"
fi fi
...@@ -978,7 +979,7 @@ AC_CACHE_CHECK([if \$CC accepts -O3], ...@@ -978,7 +979,7 @@ AC_CACHE_CHECK([if \$CC accepts -O3],
[ac_cv_c_o3], [ac_cv_c_o3],
[CFLAGS="${CFLAGS_save} -O3" [CFLAGS="${CFLAGS_save} -O3"
AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)]) AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
if test "${ac_cv_c_o3}" != "no" -a "${target_cpu}" != "mipsel"; then if test "${ac_cv_c_o3}" != "no" -a "${host_cpu}" != "mipsel"; then
CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3" CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
fi fi
...@@ -986,7 +987,7 @@ AC_CACHE_CHECK([if \$CC accepts -O2], ...@@ -986,7 +987,7 @@ AC_CACHE_CHECK([if \$CC accepts -O2],
[ac_cv_c_o2], [ac_cv_c_o2],
[CFLAGS="${CFLAGS_save} -O2" [CFLAGS="${CFLAGS_save} -O2"
AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)]) AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
if test "${ac_cv_c_o2}" != "no" -a "${target_cpu}" != "mipsel"; then if test "${ac_cv_c_o2}" != "no" -a "${host_cpu}" != "mipsel"; then
if test "${ac_cv_c_o3}" = "no"; then if test "${ac_cv_c_o3}" = "no"; then
CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2" CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
fi fi
...@@ -996,7 +997,7 @@ else ...@@ -996,7 +997,7 @@ else
[ac_cv_c_o], [ac_cv_c_o],
[CFLAGS="${CFLAGS_save} -O" [CFLAGS="${CFLAGS_save} -O"
AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)]) AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
if test "${ac_cv_c_o}" != "no" -a "${target_cpu}" != "mipsel"; then if test "${ac_cv_c_o}" != "no" -a "${host_cpu}" != "mipsel"; then
if test "${ac_cv_c_o3}" = "no"; then if test "${ac_cv_c_o3}" = "no"; then
CFLAGS_OPTIM="${CFLAGS_OPTIM} -O" CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
fi fi
...@@ -1126,12 +1127,12 @@ fi ...@@ -1126,12 +1127,12 @@ fi
dnl dnl
dnl Check the CPU dnl Check the CPU
dnl dnl
case "${target_cpu}" in case "${host_cpu}" in
"") "")
ARCH=unknown ARCH=unknown
;; ;;
*) *)
ARCH="${target_cpu}" ARCH="${host_cpu}"
;; ;;
esac esac
...@@ -1315,16 +1316,14 @@ dnl - Linux PPC, gcc 3.x: need <altivec.h> and -fvec ...@@ -1315,16 +1316,14 @@ dnl - Linux PPC, gcc 3.x: need <altivec.h> and -fvec
dnl - Others: test should fail dnl - Others: test should fail
AC_CACHE_CHECK([if \$CC groks AltiVec C extensions], AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
[ac_cv_c_altivec], [ac_cv_c_altivec],
[AS_IF([test "${host_cpu}" != "ppc" -a "${host_cpu}" != "ppc64"], [ [# OS X/PPC test (gcc 4.x)
ac_cv_c_altivec="no"], [
# OS X/PPC test (gcc 4.x)
CFLAGS="${CFLAGS_save} -mpim-altivec -force_cpusubtype_ALL" CFLAGS="${CFLAGS_save} -mpim-altivec -force_cpusubtype_ALL"
AC_TRY_COMPILE([], AC_TRY_COMPILE([vector unsigned char foo;],
[vec_ld(0, (unsigned char *)0);], [vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-mpim-altivec -force_cpusubtype_ALL"], [ac_cv_c_altivec="-mpim-altivec -force_cpusubtype_ALL"],
[# OS X/PPC test (gcc 3.x) [# OS X/PPC test (gcc 3.x)
CFLAGS="${CFLAGS_save} -faltivec" CFLAGS="${CFLAGS_save} -faltivec"
AC_TRY_COMPILE([], AC_TRY_COMPILE([vector unsigned char foo;],
[vec_ld(1 * sizeof(vector float), (unsigned char *)0);], [vec_ld(1 * sizeof(vector float), (unsigned char *)0);],
[ac_cv_c_altivec="-faltivec"], [ac_cv_c_altivec="-faltivec"],
dnl Below this are the Linux tests dnl Below this are the Linux tests
...@@ -1394,13 +1393,13 @@ if test -n "${with_tuning}"; then ...@@ -1394,13 +1393,13 @@ if test -n "${with_tuning}"; then
CFLAGS_TUNING="-mtune=${with_tuning}" CFLAGS_TUNING="-mtune=${with_tuning}"
fi fi
else else
if test "${SYS}" = "darwin" -a "${target_cpu}" = "i686"; then if test "${SYS}" = "darwin" -a "${host_cpu}" = "i686"; then
CFLAGS_TUNING="-march=pentium-m -mtune=prescott" CFLAGS_TUNING="-march=pentium-m -mtune=prescott"
elif test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "i486" -o "${target_cpu}" = "i386"; then elif test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "i486" -o "${host_cpu}" = "i386"; then
CFLAGS_TUNING="-mtune=pentium2" CFLAGS_TUNING="-mtune=pentium2"
elif test "${target_cpu}" = "x86_64"; then elif test "${hostt_cpu}" = "x86_64"; then
CFLAGS_TUNING="-mtune=athlon64" CFLAGS_TUNING="-mtune=athlon64"
elif test "${target_cpu}" = "powerpc"; then elif test "${hostt_cpu}" = "powerpc"; then
CFLAGS_TUNING="-mtune=G4"; CFLAGS_TUNING="-mtune=G4";
fi fi
fi fi
...@@ -1424,7 +1423,7 @@ AS_IF([test "${CFLAGS_TUNING}"], ...@@ -1424,7 +1423,7 @@ AS_IF([test "${CFLAGS_TUNING}"],
dnl dnl
dnl x86 accelerations dnl x86 accelerations
dnl dnl
if test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "x86" -o "${target_cpu}" = "i386" -o "${target_cpu}" = "x86_64" if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}" = "x86_64"
then then
ARCH="${ARCH} mmx" ARCH="${ARCH} mmx"
VLC_ADD_BUILTINS([${ACCEL_MODULES}]) VLC_ADD_BUILTINS([${ACCEL_MODULES}])
...@@ -1453,7 +1452,7 @@ AC_ARG_ENABLE(altivec, ...@@ -1453,7 +1452,7 @@ AC_ARG_ENABLE(altivec,
[ --disable-altivec disable AltiVec optimizations (default enabled on PPC)], [ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
[ if test "${enable_altivec}" = "yes"; then ARCH="${ARCH} altivec"; [ if test "${enable_altivec}" = "yes"; then ARCH="${ARCH} altivec";
VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ], VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ],
[ if test "${target_cpu}" = "powerpc"; then ARCH="${ARCH} altivec"; [ if test "${host_cpu}" = "powerpc"; then ARCH="${ARCH} altivec";
VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ]) VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ])
dnl dnl
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment