[PD-cvs] externals/zexy/src configure.ac,1.3,1.4

IOhannes m zmölnig zmoelnig at users.sourceforge.net
Thu Jun 9 14:10:40 CEST 2005


Update of /cvsroot/pure-data/externals/zexy/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27546

Modified Files:
	configure.ac 
Log Message:
added support for mingw-xcompiler


Index: configure.ac
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/configure.ac,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** configure.ac	19 May 2005 10:22:42 -0000	1.3
--- configure.ac	9 Jun 2005 12:10:38 -0000	1.4
***************
*** 2,17 ****
  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.
--- 2,7 ----
  AC_INIT(zexy.c)
  
! LIBNAME=zexy
  
  
  dnl Checks for programs.
***************
*** 24,27 ****
--- 14,18 ----
  AC_SUBST(EXT)
  AC_SUBST(LD)
+ AC_SUBST(STRIP)
  AC_SUBST(STRIPFLAGS)
  AC_SUBST(ZEXY_VERSION)
***************
*** 30,36 ****
--- 21,31 ----
  AC_SUBST(INCLUDES)
  AC_SUBST(SOURCES)
+ AC_SUBST(LIBNAME)
+ 
  
  
  AC_ARG_WITH(pdversion, [  --with-pdversion=<ver>  enforce a certain pd-version (e.g. 0.37)])
+ AC_ARG_WITH(version,   [  --with-version=<ver>    enforce a certain zexy-version (e.g. 2.0)])
+ AC_ARG_WITH(extension, [  --with-extension=<ext>  enforce a certain extension for the dynamic library (e.g. dll)])
  AC_ARG_ENABLE(lpt,    [  --enable-lpt            enable parallelport-support])
  AC_ARG_ENABLE(icc,    [  --enable-icc            enable ICC-support])
***************
*** 40,43 ****
--- 35,78 ----
  fi
  
+ dnl Checks for libraries.
+ dnl Replace `main' with a function in -lc:
+ AC_CHECK_LIB(c, main)
+ AC_CHECK_LIB(crtdll, fclose)
+ 
+ dnl Replace `main' with a function in -lm:
+ AC_CHECK_LIB(m, main)
+ dnl Replace `main' with a function in -lpthread:
+ dnl AC_CHECK_LIB(pthread, main)
+ dnl Replace `main' with a function in -lstk:
+ dnl AC_CHECK_LIB(stk, main, STK=yes)
+ 
+ 
+ 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
+ 
+ if test $includedir
+ then
+  for id in $includedir
+  do
+   if test -d $id; then INCLUDES="-I$id $INCLUDES"; fi
+  done
+ fi
+ if test $libdir
+ then
+  for id in $libdir
+  do
+   if test -d $id; then LIBS="-L$id $LIBS"; fi
+  done
+ fi
+ 
  if test $includedir
  then
***************
*** 51,63 ****
  fi
  
! dnl Checks for libraries.
! dnl Replace `main' with a function in -lc:
! AC_CHECK_LIB(c, main)
! dnl Replace `main' with a function in -lm:
! AC_CHECK_LIB(m, main)
! dnl Replace `main' with a function in -lpthread:
! dnl AC_CHECK_LIB(pthread, main)
! dnl Replace `main' with a function in -lstk:
! dnl AC_CHECK_LIB(stk, main, STK=yes)
  
  dnl Checks for header files.
--- 86,90 ----
  fi
  
! AC_CHECK_LIB(pd, nullfn)
  
  dnl Checks for header files.
***************
*** 72,77 ****
  AC_CHECK_FUNCS(select socket strerror)
  
! dnl ifwe don't have $LD set, we set it to "ld"
! LD=${LD:-ld}
  
  DFLAGS="-DZEXY_LIBRARY"
--- 99,141 ----
  AC_CHECK_FUNCS(select socket strerror)
  
! dnl check for "-mms-bitfields" cflag
! dnl why is there no generic compiler-check for a given flag ?
! dnl it would make things so easy: AC_CHECK_FLAG([-mms-bitfields],,)
! AC_MSG_CHECKING("ms-bitfields")
! cat > conftest.c << EOF
! int main(){
!   return 0;
! }
! EOF
! if ${CC} ${INCLUDES} ${DFLAGS} -o conftest.o conftest.c ${CFLAGS} -mms-bitfields > /dev/null 2>&1
! then
!   echo "yes"
!   CFLAGS="${CFLAGS} -mms-bitfields"
! else
!   echo "no"
! fi
! 
! 
! 
! dnl if we don't have $LD set, we set it to $(CC)
! LD=${LD:=$CC}
! dnl if we don't have $STRIP set, we set it to ${host}-strip or strip
! if test "x$STRIP" = "x"
! then
!  if test "x$host" != "x"
!  then
!   STRIP=${host}-strip
!   if $(which ${host}-strip > /dev/null)
!   then
!     :
!   else
!     STRIP="echo fake strip"
!   fi
!  else
!   STRIP=strip
!  fi
! fi
! dnl STRIP=${STRIP:=strip}
! 
  
  DFLAGS="-DZEXY_LIBRARY"
***************
*** 83,89 ****
  if test "$with_pdversion" != ""
  then
! echo -n "($with_pdversion)... "
    PD_VERSION="$with_pdversion"
  else
  cat > conftest.c << EOF
  #include <stdio.h>
--- 147,156 ----
  if test "$with_pdversion" != ""
  then
!   echo -n "($with_pdversion)... "
    PD_VERSION="$with_pdversion"
  else
+  if test "x$cross_compiling" = "xno"
+  then
+ 
  cat > conftest.c << EOF
  #include <stdio.h>
***************
*** 94,102 ****
  }
  EOF
!  if $CC $INCLUDES -o conftest.o conftest.c > /dev/null 2>&1
!  then
!   PD_VERSION=`./conftest.o`
   else
!   PD_VERSION=""
   fi
  fi
--- 161,174 ----
  }
  EOF
!   if $CC $INCLUDES -o conftest.o conftest.c > /dev/null 2>&1
!   then
!    PD_VERSION=`./conftest.o`
!   else
!    PD_VERSION=""
!   fi
   else
!   dnl we are cross-compiling...
!   echo -n "(X)..."
!   PD_VERSION="0.38"
   fi
  fi
***************
*** 116,119 ****
--- 188,199 ----
  dnl check for zexy-version (but why...)
  AC_MSG_CHECKING("zexy-version")
+ 
+ if test "$with_version" != ""
+ then
+   echo -n "($with_version)...forced "
+   ZEXY_VERSION="$with_version"
+ else
+  if test "x$cross_compiling" = "xno"
+  then
  cat > conftest.c << EOF
  #include <stdio.h>
***************
*** 125,142 ****
  EOF
  
! if $CC $INCLUDES $DFLAGS -o conftest.o conftest.c > /dev/null 2>&1
! then
!   ZEXY_VERSION=`./conftest.o`
!   echo "$ZEXY_VERSION"
! else
!   ZEXY_VERSION="X"
!   echo "(unknown)"
  fi
  
  
- 
  dnl
  dnl  OK, checks which machines are here now
  dnl
  if test `uname -s` = Linux; 
  then
--- 205,228 ----
  EOF
  
!   if $CC $INCLUDES $DFLAGS -o conftest.o conftest.c > /dev/null 2>&1
!   then
!    ZEXY_VERSION=`./conftest.o`
!    echo "$ZEXY_VERSION"
!   else
!    ZEXY_VERSION="X"
!    echo "(unknown)"
!   fi
!  else
!    ZEXY_VERSION="X"
!    echo "(X)"
!  fi
  fi
  
  
  dnl
  dnl  OK, checks which machines are here now
+ dnl this needs some rethinking when cross-compiling (?)
  dnl
+ 
  if test `uname -s` = Linux; 
  then
***************
*** 197,206 ****
    LD=gcc
    INCLUDES="-I at prefix@/src"
!   DFLAGS="-DMSW -DNT"
    LFLAGS="-shared @prefix@/bin/pd.dll"
    EXT=dll
  else
    PDLIBDIR="/lib/pd"
!   LIBS="-lc -lm"
  fi
  if test `uname -s` = IRIX64; 
--- 283,294 ----
    LD=gcc
    INCLUDES="-I at prefix@/src"
! dnl mingw should (does?) define __WIN32__ which is now used
! dnl  DFLAGS="-DMSW -DNT"
    LFLAGS="-shared @prefix@/bin/pd.dll"
    EXT=dll
  else
    PDLIBDIR="/lib/pd"
! dnl this is handled by AC_CHECK_LIB above
! dnl  LIBS="-lc -lm"
  fi
  if test `uname -s` = IRIX64; 
***************
*** 237,240 ****
--- 325,334 ----
  fi
  
+ 
+ if test "x$with_extension" != "x"
+ then
+  EXT=$with_extension
+ fi
+ 
  dnl check for LPT
  AC_MSG_CHECKING("parallel-port")





More information about the Pd-cvs mailing list