[PD-cvs] externals/zexy/src configure,NONE,1.1 configure.in,NONE,1.1 makefile,NONE,1.1 makefile.in,NONE,1.1
IOhannes m zmölnig
zmoelnig at users.sourceforge.net
Wed Jul 21 17:58:18 CEST 2004
Update of /cvsroot/pure-data/externals/zexy/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18507
Added Files:
configure configure.in makefile makefile.in
Log Message:
added first configure support
--- NEW FILE: makefile.in ---
LIBNAME =zexy
PREFIX =@prefix@
PDLIBDIR =lib/pd
INSTALLDOCS=@REFERENCEPATH@$LIBNAME
INSTALL_BIN=$(PREFIX)/$(PDLIBDIR)/extra
INSTALL_DOC=$(PREFIX)/$(PDLIBDIR)/$(INSTALLDOCS)
EXT = @EXT@
DEFS = @DFLAGS@
IFLAGS = -I. @INCLUDES@
CC = @CC@
LD = @LD@
AFLAGS =
LFLAGS = @LFLAGS@
WFLAGS =
TARNAME = $(LIBNAME)- at ZEXY_VERSION@.tgz
.SUFFIXES: .$(EXT)
PDCFLAGS = -g -O2 $(DEFS) $(IFLAGS) $(WFLAGS) $(LFLAGS) $(AFLAGS)
CFLAGS = -g -O2 $(DEFS) $(IFLAGS) $(WFLAGS)
LIBS = -lc -lm
#LIBS = -lpthread -lm -lc
include make.source
TARGETS = $(SOURCES:.c=.o)
all: $(LIBNAME)
cp $(LIBNAME).$(EXT) ..
$(LIBNAME): $(TARGETS)
$(LD) $(LFLAGS) -o $(LIBNAME).$(EXT) *.o $(LIBS)
strip @STRIPFLAGS@ $(LIBNAME).$(EXT)
.c.o:
$(CC) -c -o $@ $(CFLAGS) -DPD $*.c
# cp $@ $*_stat.o
.o.$(EXT):
$(CC) -o $@ $(PDCFLAGS) -DPD $*.o
clean:
-rm -f *.$(EXT) *.o
cleaner: clean
-rm -f *~ _* config.*
cleanest: cleaner
-rm -f makefile ../*.$(EXT) make.source
distclean: cleanest newmakefile
install: install-bin install-doc
install-bin:
-install -d $(INSTALL_BIN)
-install -m 644 $(LIBNAME).$(EXT) $(INSTALL_BIN)
install-doc:
-install -d $(INSTALL_DOC)
-install -m 644 reference/*.pd $(INSTALL_DOC)
dist: all cleaner
(cd ../..;tar czvf $(TARNAME) $(LIBNAME))
everything: clean all install distclean
newmakefile:
echo "current:">makefile
echo " ./configure && make">>makefile
--- NEW FILE: makefile ---
current:
./configure && make
--- NEW FILE: configure ---
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-pdversion=<ver> enforce a certain pd-version (e.g. 0.37)"
ac_help="$ac_help
--enable-lpt enable parallelport-support"
# Initialize some variables set by options.
[...1835 lines suppressed...]
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
EOF
cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
rm -f conftest.*
--- NEW FILE: configure.in ---
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zexy.c)
dnl Checks for programs.
AC_PROG_CC
AC_SUBST(STK)
AC_SUBST(DFLAGS)
AC_SUBST(LFLAGS)
AC_SUBST(EXT)
AC_SUBST(LD)
AC_SUBST(STRIPFLAGS)
AC_SUBST(ZEXY_VERSION)
AC_SUBST(REFERENCEPATH)
AC_SUBST(INCLUDES)
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])
if test $includedir
then
for id in $includedir
do
if test -d $id
then
INCLUDES="-I$id $INCLUDES"
fi
done
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.
AC_HEADER_STDC
AC_CHECK_HEADERS(stdlib.h stdio.h string.h math.h time.h sys/time.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_TIME
dnl Checks for library functions.
AC_FUNC_MMAP
AC_CHECK_FUNCS(select socket strerror)
LD=ld
DFLAGS=""
dnl
dnl OK, checks for machines are here now
dnl
if test `uname -s` = Linux;
then
LFLAGS="-export_dynamic -shared"
EXT=pd_linux
STRIPFLAGS="--strip-unneeded"
fi
dnl This should use '-bundle_loader /path/to/pd/bin/pd' instead of'-undefined suppress'
dnl then strip might do something
if test `uname -s` = Darwin;
then
LD=cc
LFLAGS="-bundle -undefined suppress -flat_namespace"
EXT=pd_darwin
STRIPFLAGS=
if test "$enable_lpt" = "yes"; then
AC_MSG_ERROR("lpt not supported on this platform");
fi
if test "$enable_lpt" = ""; then
AC_MSG_WARN("lpt not supported on this platform - disabling");
enable_lpt="no";
fi
fi
if test `uname -s` = IRIX64;
then
LFLAGS="-n32 -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \
-OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
-shared -rdata_shared"
EXT=pd_irix6
dnl DFLAGS="-DUNIX -DIRIX6"
STRIPFLAGS="--strip-unneeded"
if test "$enable_lpt" = "yes"; then
AC_MSG_ERROR("lpt not supported on this platform");
fi
if test "$enable_lpt" = ""; then
AC_MSG_WARN("lpt not supported on this platform - disabling");
enable_lpt="no";
fi
fi
if test `uname -s` = IRIX32;
then
LFLAGS="-o32 -DUNIX -DIRIX -O2
-shared -rdata_shared"
EXT=pd_irix5
dnl DFLAGS="-DUNIX -DIRIX5"
STRIPFLAGS="--strip-unneeded"
if test "$enable_lpt" = "yes"; then
AC_MSG_ERROR("lpt not supported on this platform");
fi
if test "$enable_lpt" = ""; then
AC_MSG_WARN("lpt not supported on this platform - disabling");
enable_lpt="no";
fi
fi
dnl Checks for pd-version, to set the correct help-path
AC_MSG_CHECKING("pd\>=0.37")
if test "$with_pdversion" != ""
then
echo -n "($with_pdversion)... "
PD_VERSION="$with_pdversion"
else
cat > conftest.c << EOF
#include <stdio.h>
#include "m_pd.h"
int main(){
printf("%d.%d\n", PD_MAJOR_VERSION, PD_MINOR_VERSION);
return 0;
}
EOF
if $CC $INCLUDES -o conftest.o conftest.c > /dev/null 2>&1
then
PD_VERSION=`./conftest.o`
else
PD_VERSION=""
fi
fi
let PD_MAJORVERSION=`echo $PD_VERSION | cut -d"." -f1`+0
let PD_MINORVERSION=`echo $PD_VERSION | cut -d"." -f2`+0
if test "$PD_MAJORVERSION" -gt 0 || test "$PD_MINORVERSION" -ge 37
then
REFERENCEPATH=extra/help-
echo "yes"
else
REFERENCEPATH=doc/5.reference/
echo "no"
fi
dnl check for zexy-version (but why...)
AC_MSG_CHECKING("zexy-version")
cat > conftest.c << EOF
#include <stdio.h>
#include "zexy.h"
int main(){
printf("%s\n", VERSION);
return 0;
}
EOF
if $CC $INCLUDES -o conftest.o conftest.c > /dev/null 2>&1
then
ZEXY_VERSION=`./conftest.o`
echo "$ZEXY_VERSION"
else
ZEXY_VERSION=""
echo "(unknown)"
fi
dnl check for LPT
AC_MSG_CHECKING("parallel-port")
if test "$enable_lpt" != "no"
then
if test "$enable_lpt" = "yes"
then
DFLAGS="$DFLAGS -DZ_WANT_LPT"
echo "yes (forced)"
else
cat > conftest.c << EOF
# include <sys/io.h>
int main(){
ioperm(0x3bc, 8, 1);
outb(0, 0x3bc);
ioperm(0x3bc, 8, 0);
return 0;
}
EOF
if $CC $INCLUDES -o conftest.o conftest.c > /dev/null 2>&1
then
DFLAGS="$DFLAGS -DZ_WANT_LPT"
echo "yes"
else
echo "no"
fi
fi
else
echo "no (ignored)"
fi
echo "SOURCES = \\"> make.source
for i in `ls z_*.c zexy.c`
do
echo " $i\\">> make.source
done
echo >> make.source
AC_OUTPUT(makefile)
rm -f conftest.*
More information about the Pd-cvs
mailing list