aboutsummaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in35
1 files changed, 32 insertions, 3 deletions
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