aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-04-13 17:24:22 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-04-13 17:24:22 +0000
commit3ac069de786e63c2386b6cf8fbe2a3dc38cdf26d (patch)
tree9620e0d7181654cad7cdf4f46b8183e72a77d2b9 /src
parentc4c0eb4d12a40d835d83739e711da6c84bbecd85 (diff)
initial support for icc (no optimization-flags yet)
svn path=/trunk/externals/zexy/; revision=2762
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in3
-rw-r--r--src/configure.in35
2 files changed, 34 insertions, 4 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 5466507..54fc023 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -19,8 +19,9 @@ TARNAME = $(LIBNAME)-@ZEXY_VERSION@.tgz
.SUFFIXES: .$(EXT)
+# ICCFLAGS=-march=pentiumiii -axK
PDCFLAGS = -g -O2 $(DEFS) $(IFLAGS) $(WFLAGS) $(LFLAGS) $(AFLAGS)
-CFLAGS = -g -O2 $(DEFS) $(IFLAGS) $(WFLAGS)
+CFLAGS = -g -O2 $(DEFS) $(IFLAGS) $(WFLAGS) @CFLAGS@
LIBS = @LIBS@
#LIBS = -lpthread -lm -lc
diff --git a/src/configure.in b/src/configure.in
index 8e7b428..cfc67e4 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,10 +1,24 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zexy.c)
+dnl for now i can test ICC only on linux
+dnl LATER we might want to use it for other platforms (namely:windoze) too
+
+if test `uname -s` = Linux;
+then
+ AC_ARG_ENABLE(icc, [ --enable-icc enable ICC-support])
+ if test "$enable_icc" = "yes"; then
+ CC=icc
+ LD=icc
+ fi
+fi
+
+
dnl Checks for programs.
AC_PROG_CC
AC_SUBST(STK)
+AC_SUBST(CFLAGS)
AC_SUBST(DFLAGS)
AC_SUBST(LFLAGS)
AC_SUBST(EXT)
@@ -19,6 +33,8 @@ AC_SUBST(SOURCES)
AC_ARG_WITH(pdversion, [ --with-pdversion=<ver> enforce a certain pd-version (e.g. 0.37)])
AC_ARG_ENABLE(lpt, [ --enable-lpt enable parallelport-support])
+#AC_ARG_ENABLE(icc, [ --enable-icc enable ICC-support])
+
if test $includedir
then
@@ -52,8 +68,9 @@ dnl Checks for library functions.
AC_FUNC_MMAP
AC_CHECK_FUNCS(select socket strerror)
+dnl ifwe don't have $LD set, we set it to "ld"
+LD=${LD:-ld}
-LD=ld
DFLAGS="-DZEXY_LIBRARY"
dnl
@@ -64,6 +81,18 @@ then
LFLAGS="-export_dynamic -shared"
EXT=pd_linux
STRIPFLAGS="--strip-unneeded"
+ if test "$enable_icc" = "yes"; then
+ CC=icc
+ fi
+
+ if test $CC = "icc"
+ then
+ LD=$CC
+ LFLAGS="-ip -ipo_obj "$LFLAGS
+ CFLAGS="-ip -ipo_obj "$CFLAGS
+ else
+ :
+ fi
fi
dnl This should use '-bundle_loader /path/to/pd/bin/pd' instead of'-undefined suppress'
@@ -173,12 +202,12 @@ int main(){
}
EOF
-if $CC $INCLUDES -o conftest.o conftest.c > /dev/null 2>&1
+if $CC $INCLUDES $DFLAGS -o conftest.o conftest.c > /dev/null 2>&1
then
ZEXY_VERSION=`./conftest.o`
echo "$ZEXY_VERSION"
else
- ZEXY_VERSION=""
+ ZEXY_VERSION="X"
echo "(unknown)"
fi