comparison configure.in @ 1175:867f521591e5

Fixed Altivec support on Mac OS X.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 17 Nov 2005 03:43:42 +0000
parents 8c43aceeed81
children 19d8949b4584
comparison
equal deleted inserted replaced
1174:8c43aceeed81 1175:867f521591e5
1920 } 1920 }
1921 1921
1922 dnl Check for altivec instruction support using gas syntax 1922 dnl Check for altivec instruction support using gas syntax
1923 CheckAltivec() 1923 CheckAltivec()
1924 { 1924 {
1925 dnl FIXME: Theoretically, you might not have altivec.h, we should check 1925 have_altivec_h_hdr=no
1926 dnl FIXME: that seperately, but I think all major platforms have it 1926 AC_CHECK_HEADER(altivec.h, have_altivec_h_hdr=yes)
1927 dnl FIXME: at the moment... --ryan.
1928 1927
1929 save_CFLAGS="${CFLAGS}" 1928 save_CFLAGS="${CFLAGS}"
1930 have_gcc_altivec=no 1929 have_gcc_altivec=no
1931 AC_MSG_CHECKING(for Altivec with GCC -maltivec option) 1930 AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
1932 CFLAGS="${save_CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -maltivec" 1931 CFLAGS="${save_CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -maltivec"
1933 AC_TRY_COMPILE([ 1932
1934 #include <altivec.h> 1933 if test x$have_altivec_h_hdr = xyes; then
1935 vector unsigned int vzero() { 1934 AC_TRY_COMPILE([
1936 return vec_splat_u32(0); 1935 #include <altivec.h>
1937 } 1936 vector unsigned int vzero() {
1938 ],[ 1937 return vec_splat_u32(0);
1939 ],[ 1938 }
1940 have_gcc_altivec=yes 1939 ],[
1941 ]) 1940 ],[
1942 AC_MSG_RESULT($have_gcc_altivec) 1941 have_gcc_altivec=yes
1942 ])
1943 AC_MSG_RESULT($have_gcc_altivec)
1944 else
1945 AC_TRY_COMPILE([
1946 vector unsigned int vzero() {
1947 return vec_splat_u32(0);
1948 }
1949 ],[
1950 ],[
1951 have_gcc_altivec=yes
1952 ])
1953 AC_MSG_RESULT($have_gcc_altivec)
1954 fi
1943 1955
1944 if test x$have_gcc_altivec = xno; then 1956 if test x$have_gcc_altivec = xno; then
1945 AC_MSG_CHECKING(for Altivec with GCC -faltivec option) 1957 AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
1946 CFLAGS="${CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -faltivec" 1958 CFLAGS="${save_CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -faltivec"
1947 AC_TRY_COMPILE([ 1959 if test x$have_altivec_h_hdr = xyes; then
1948 #include <altivec.h> 1960 AC_TRY_COMPILE([
1949 vector unsigned int vzero() { 1961 #include <altivec.h>
1950 return vec_splat_u32(0); 1962 vector unsigned int vzero() {
1951 } 1963 return vec_splat_u32(0);
1952 ],[ 1964 }
1953 ],[ 1965 ],[
1954 have_gcc_altivec=yes 1966 ],[
1955 ]) 1967 have_gcc_altivec=yes
1956 AC_MSG_RESULT($have_gcc_altivec) 1968 ])
1969 AC_MSG_RESULT($have_gcc_altivec)
1970 else
1971 AC_TRY_COMPILE([
1972 vector unsigned int vzero() {
1973 return vec_splat_u32(0);
1974 }
1975 ],[
1976 ],[
1977 have_gcc_altivec=yes
1978 ])
1979 AC_MSG_RESULT($have_gcc_altivec)
1980 fi
1957 fi 1981 fi
1958 1982
1959 if test x$have_gcc_altivec = xno; then 1983 if test x$have_gcc_altivec = xno; then
1960 CFLAGS="${save_CFLAGS}" 1984 CFLAGS="${save_CFLAGS}"
1985 else
1986 if test x$have_altivec_h_hdr = xyes; then
1987 CFLAGS="${CFLAGS} -DHAVE_ALTIVEC_H"
1988 fi
1961 fi 1989 fi
1962 } 1990 }
1963 1991
1964 dnl Check for a valid linux/version.h 1992 dnl Check for a valid linux/version.h
1965 CheckLinuxVersion() 1993 CheckLinuxVersion()