From 3ac069de786e63c2386b6cf8fbe2a3dc38cdf26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 13 Apr 2005 17:24:22 +0000 Subject: initial support for icc (no optimization-flags yet) svn path=/trunk/externals/zexy/; revision=2762 --- src/Makefile.in | 3 ++- src/configure.in | 35 ++++++++++++++++++++++++++++++++--- 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= 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 -- cgit v1.2.1