diff --git a/.gitignore b/.gitignore index 4f3d1a52..c815f96a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,6 @@ Makefile TAGS ylwrap py-compile -py/freej.pth py/freej.py py/freej.pyc py/freej_py.cpp diff --git a/configure.in b/configure.in index fd6646f0..7b89f0ac 100644 --- a/configure.in +++ b/configure.in @@ -33,12 +33,18 @@ dnl AM_CONDITIONAL(ARCH_PPC, test x$hostcpu = xpowerpc) have_ppc=yes ;; - i*86*|x86_64*|ia64*) + x86_64*|ia64*) + AC_DEFINE(ARCH_X86,1,[define if compiling for Linux/x86]) + AC_DEFINE(HAVE_64BIT,1,[define if host has 64 bit]) + ;; + + i*86*) AC_DEFINE(ARCH_X86,1,[define if compiling for Linux/x86]) AC_DEFINE(PA_LITTLE_ENDIAN,1,[define little endian arch for portaudio]) # AC_DEFINE(SDL_BYTEORDER,SDL_LIL_ENDIAN,[define little endian arch for SDL]) ;; + *) ;; esac @@ -56,6 +62,11 @@ dnl AM_CONDITIONAL(ARCH_PPC, test x$hostcpu = xpowerpc) have_sse=yes AC_DEFINE(HAVE_SSE2,1,[define if enabling SSE2 acceleration]) fi + if grep "^flags.* ssse3" /proc/cpuinfo > /dev/null; then + have_ssse3=yes + AC_DEFINE(HAVE_SSSE3,1,[define if enabling SSSE3 acceleration]) + fi + ;; Darwin) @@ -391,9 +402,9 @@ if test x$have_lubrifications = xyes; then if test x$have_ppc = xyes; then # use optimization flags for darwin - CFLAGS="$CFLAGS -O2 -fomit-frame-pointer -ffast-math -mabi=altivec -maltivec -mpowerpc-gfxopt" + CFLAGS="$CFLAGS -O2 -mabi=altivec -maltivec -mpowerpc-gfxopt" else - CFLAGS="$CFLAGS -O2 -fexpensive-optimizations -msse -fomit-frame-pointer -ffast-math" + CFLAGS="$CFLAGS -O2 -mfpmath=sse -mtune=pentium4" fi # adding these provoke 'illegal instruction' errors in some @@ -401,16 +412,24 @@ if test x$have_lubrifications = xyes; then elif test x$have_ppc = xyes; then CFLAGS="$CFLAGS -O2 -fomit-frame-pointer -ffast-math -mabi=altivec -maltivec -mpowerpc-gfxopt" elif test x$host_cpu = xx86_64; then - CFLAGS="$CFLAGS -O2 -fomit-frame-pointer -ffast-math" - AC_DEFINE(HAVE_64BIT,1,[define if host has 64 bit]) - else # any other platform optimizations - CFLAGS="$CFLAGS -O2 -ffast-math" + # should complete this with all 64bit CPUs (AMD too) + if test x$have_ssse3 = xyes; then + # multiple core cpu + CFLAGS="$CFLAGS -O2 -mfpmath=sse -mtune=core2" + else + # single core 64bit cpu + CFLAGS="$CFLAGS -O2 -mfpmath=sse -mtune=nocona" + fi fi + # any other platform optimizations + echo "no special optimisation flags found for your cpu" + echo "please suggest some on our mailinglist if you know better!" + CFLAGS="$CFLAGS -O2" fi else if test x$have_profiling = xno -a x$debug = xfalse; then echo "enabling generic compiler optimizations" - CFLAGS="$CFLAGS -O2 -fomit-frame-pointer -ffast-math -mmmx" + CFLAGS="$CFLAGS -O2" fi fi AC_SUBST(CFLAGS) diff --git a/py/freej.pth b/py/freej.pth new file mode 100644 index 00000000..bc9a8254 --- /dev/null +++ b/py/freej.pth @@ -0,0 +1 @@ +freej