From b7594213dc071c81e0e5013f3ec8ef17f9023dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 28 Sep 2011 14:02:02 +0000 Subject: autotools svn path=/trunk/externals/zexy/; revision=15373 --- src/Make.config.in | 31 ---- src/Makefile | 140 ------------------ src/Makefile.am | 212 +++++++++++++++++++++++++++ src/bootstrap.sh | 4 +- src/configure | 10 ++ src/configure.ac | 419 ----------------------------------------------------- src/zexy.h | 13 +- src/zexyconf.h | 32 ++++ src/zexyconf.h.in | 20 --- 9 files changed, 266 insertions(+), 615 deletions(-) delete mode 100644 src/Make.config.in delete mode 100644 src/Makefile create mode 100644 src/Makefile.am create mode 100755 src/configure delete mode 100644 src/configure.ac create mode 100644 src/zexyconf.h delete mode 100644 src/zexyconf.h.in (limited to 'src') diff --git a/src/Make.config.in b/src/Make.config.in deleted file mode 100644 index 0664f89..0000000 --- a/src/Make.config.in +++ /dev/null @@ -1,31 +0,0 @@ -LIBNAME =@LIBNAME@ -TARNAME = $(LIBNAME)-@LIBRARY_VERSION@.tgz - -# when build as a library this holds a pre-processor define -# (e.g. "-DZEXY_LIBRARY") -# when build as single externals this is empty -BUILDLIBRARY =@BUILDLIBRARY@ - -PREFIX =@prefix@@PDLIBDIR@ - -INSTALL_BIN=$(DESTDIR)$(PREFIX)/lib/pd/extra/$(LIBNAME) -INSTALL_DOC=$(DESTDIR)$(PREFIX)/lib/pd/@REFERENCEPATH@$(LIBNAME) - -EXT = @EXT@ -DEFS = @DEFS@ -IFLAGS = -I. @INCLUDES@ - -CC = @CC@ -LD = @LD@ -STRIP = @STRIP@ -STRIPFLAGS= @STRIPFLAGS@ - -LFLAGS = @LFLAGS@ - -Z_CFLAGS = $(IFLAGS) $(DEFS) $(BUILDLIBRARY) -DPD $(WFLAGS) @CFLAGS@ $(CFLAGS) -LIBS = @LIBS@ -MAKEDEP_FLAGS = @MAKEDEP_FLAGS@ - -CONFIGUREFLAGS = @CONFIGUREFLAGS@ - -Z_CPPFLAGS = $(IFLAGS) $(DEFS) $(BUILDLIBRARY) -DPD $(WFLAGS) @CPPFLAGS@ $(CPPFLAGS) diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index e778906..0000000 --- a/src/Makefile +++ /dev/null @@ -1,140 +0,0 @@ -default: all - -.PHONEY: default all everything dist \ - clean realclean distclean \ - install install-bin install-doc install-abs \ - tests - - -TESTDIR=../tests - -HELPERSOURCES=z_zexy.c zexy.c winNT_portio.c - -OBJECTSOURCES=$(sort $(filter-out $(HELPERSOURCES), $(filter %.c, $(wildcard *.c)))) - -SOURCES=$(OBJECTSOURCES) $(HELPERSOURCES) - -zexyconf.h: zexyconf.h.in configure - ./configure $(CONFIGUREFLAGS) - -configure: configure.ac aclocal.m4 - autoconf - -aclocal.m4: acinclude.m4 - aclocal - --include $(SOURCES:.c=.d) - -Make.config: Make.config.in configure - ./configure $(CONFIGUREFLAGS) - -z_zexy.c z_zexy.h: - ./makesource.sh - --include Make.config - -## 2nd only generate depend-files when we have Make.config included -## and thus MAKEDEP_FLAGS defined -ifdef MAKEDEP_FLAGS -## dependencies: as proposed by the GNU-make documentation -## see http://www.gnu.org/software/make/manual/html_node/make_47.html#SEC51 -%.d: %.c - @set -e; rm -f $@; \ - $(CPP) $(MAKEDEP_FLAGS) $(Z_CPPFLAGS) $< > $@.$$$$; \ - sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ - rm -f $@.$$$$ -endif - -.SUFFIXES: .$(EXT) - -TARGETS = $(SOURCES:.c=.o) - -OBJECTS = $(OBJECTSOURCES:.c=.$(EXT)) - -## if $(BUILDLIBRARY) is defined, we build everything as a single library -## else we build separate externals -ifneq "$(BUILDLIBRARY)" "" -all: $(LIBNAME) - cp $(LIBNAME).$(EXT) .. -else -all: $(OBJECTS) -endif - -$(OBJECTS): %.$(EXT) : %.o - $(LD) $(LFLAGS) $(ARCH_FLAG) -o $@ $*.o $(LIBS) - $(STRIP) $(STRIPFLAGS) $@ - -$(LIBNAME): $(TARGETS) z_zexy.c z_zexy.h - $(LD) $(LFLAGS) $(ARCH_FLAG) -o $@.$(EXT) *.o $(LIBS) - $(STRIP) $(STRIPFLAGS) $@.$(EXT) - -$(TARGETS): %.o : %.c - $(CC) $(Z_CFLAGS) $(ARCH_FLAG) -c -o $@ $*.c - -externals: $(OBJECTS) - -clean: - -rm -f *.$(EXT) *.o - -realclean: clean alias-clean - -rm -f *~ _* config.* - -rm -f *.d *.d.* - -distclean: realclean - -rm -f Make.config zexyconf.h ../*.$(EXT) - -rm -f zexy.exp zexy.lib zexy.ncb \ - zexy.opt zexy.plg - -rm -rf autom4te.cache/ - -tests: all - make -C $(TESTDIR) - -alias: alias-bin alias-abs - -alias-bin: all - ./makealias.sh ../src/alias ../src ../reference - -alias-abs: - ./makealias.sh ../abs/alias ../abs - -alias-clean: alias-clean-bin alias-clean-abs - -alias-clean-bin: - ./makealias.sh -clean ../src/alias ../src ../reference - -alias-clean-abs: - ./makealias.sh -clean ../abs/alias ../abs - -install: all alias install-abs install-bin install-doc - -install-bin: - -install -d $(INSTALL_BIN) - -install -m 644 *.$(EXT) $(INSTALL_BIN) - -install-doc: - -install -d $(INSTALL_DOC) - -install -m 644 ../reference/*.pd $(INSTALL_DOC) - -install-abs: - -install -d $(INSTALL_BIN) - -install -m 644 ../abs/*.pd $(INSTALL_BIN) - - -uninstall-bin: - -install -d $(INSTALL_BIN) - -install -m 644 $(LIBNAME).$(EXT) $(INSTALL_BIN) - -uninstall-doc: - -install -d $(INSTALL_DOC) - -install -m 644 ../reference/*.pd $(INSTALL_DOC) - -uninstall-abs: - -install -d $(INSTALL_BIN) - -install -m 644 ../abs/*.pd $(INSTALL_BIN) - - -dist: all realclean - (cd ../..;tar czvf $(TARNAME) $(LIBNAME)) - -everything: clean all install distclean - diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..08cc5e5 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,212 @@ +AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 + +pkglib_LTLIBRARIES= + +AM_CFLAGS = +AM_LDFLAGS= -module -avoid-version -shared -shrext .@EXTENSION@ + +# RTE +AM_CFLAGS += +AM_LDFLAGS+= + + +if LIBRARY +pkglib_LTLIBRARIES+=zexy.la +else +pkglib_LTLIBRARIES+= \ + 0x260x260x7e.la \ + 0x2e.la \ + 0x3c0x7e.la \ + 0x3d0x3d0x7e.la \ + 0x3e0x7e.la \ + 0x7c0x7c0x7e.la \ + a2l.la \ + abs~.la \ + absgn~.la \ + atoi.la \ + avg~.la \ + blockmirror~.la \ + blockshuffle~.la \ + blockswap~.la \ + date.la \ + demultiplex~.la \ + demultiplex.la \ + dfreq~.la \ + dirac~.la \ + drip.la \ + envrms~.la \ + fifop.la \ + freadln.la \ + fwriteln.la \ + glue.la \ + index.la \ + length.la \ + lifop.la \ + limiter~.la \ + list2int.la \ + list2lists.la \ + list2symbol.la \ + lister.la \ + listfind.la \ + liststorage.la \ + lpt.la \ + makesymbol.la \ + matchbox.la \ + mavg.la \ + minmax.la \ + msgfile.la \ + multiline~.la \ + multiplex~.la \ + multiplex.la \ + multireceive.la \ + niagara.la \ + noish~.la \ + noisi~.la \ + operating_system.la \ + pack~.la \ + pack.la \ + packel.la \ + pdf~.la \ + prime.la \ + quantize~.la \ + rawprint.la \ + regex.la \ + relay.la \ + repack.la \ + repeat.la \ + route~.la \ + sfplay.la \ + sfrecord.la \ + sgn~.la \ + sigzero~.la \ + sleepgrain.la \ + sort.la \ + step~.la \ + strcmp.la \ + sum.la \ + swap~.la \ + symbol2list.la \ + tabdump.la \ + tabminmax.la \ + tabread4~~.la \ + tabset.la \ + tavg~.la \ + time.la \ + unpack~.la \ + unpack.la \ + urn.la \ + wrap.la \ + z~.la +endif + +zexy_la_CPPFLAGS=-DZEXY_LIBRARY + + +0x260x260x7e_la_SOURCES = 0x260x260x7e.c +0x2e_la_SOURCES = 0x2e.c +0x3c0x7e_la_SOURCES = 0x3c0x7e.c +0x3d0x3d0x7e_la_SOURCES = 0x3d0x3d0x7e.c +0x3e0x7e_la_SOURCES = 0x3e0x7e.c +0x7c0x7c0x7e_la_SOURCES = 0x7c0x7c0x7e.c +a2l_la_SOURCES = a2l.c +abs__la_SOURCES = abs~.c +absgn__la_SOURCES = absgn~.c +atoi_la_SOURCES = atoi.c +avg__la_SOURCES = avg~.c +blockmirror__la_SOURCES = blockmirror~.c +blockshuffle__la_SOURCES= blockshuffle~.c +blockswap__la_SOURCES = blockswap~.c +date_la_SOURCES = date.c +demultiplex__la_SOURCES = demultiplex~.c +demultiplex_la_SOURCES = demultiplex.c +dfreq__la_SOURCES = dfreq~.c +dirac__la_SOURCES = dirac~.c +drip_la_SOURCES = drip.c +envrms__la_SOURCES = envrms~.c +fifop_la_SOURCES = fifop.c +freadln_la_SOURCES = freadln.c +fwriteln_la_SOURCES = fwriteln.c +glue_la_SOURCES = glue.c +index_la_SOURCES = index.c +length_la_SOURCES = length.c +lifop_la_SOURCES = lifop.c +limiter__la_SOURCES = limiter~.c +list2int_la_SOURCES = list2int.c +list2lists_la_SOURCES = list2lists.c +list2symbol_la_SOURCES = list2symbol.c +lister_la_SOURCES = lister.c +listfind_la_SOURCES = listfind.c +liststorage_la_SOURCES = liststorage.c +if LPT +lpt_la_SOURCES = lpt.c +if WINDOWS +lpt_la_SOURCES += winNT_portio.c +endif +endif +makesymbol_la_SOURCES = makesymbol.c +matchbox_la_SOURCES = matchbox.c +mavg_la_SOURCES = mavg.c +minmax_la_SOURCES = minmax.c +msgfile_la_SOURCES = msgfile.c +multiline__la_SOURCES = multiline~.c +multiplex__la_SOURCES = multiplex~.c +multiplex_la_SOURCES = multiplex.c +multireceive_la_SOURCES = multireceive.c +niagara_la_SOURCES = niagara.c +noish__la_SOURCES = noish~.c +noisi__la_SOURCES = noisi~.c +operating_system_la_SOURCES = operating_system.c +pack__la_SOURCES = pack~.c +pack_la_SOURCES = pack.c +packel_la_SOURCES = packel.c +pdf__la_SOURCES = pdf~.c +prime_la_SOURCES = prime.c +quantize__la_SOURCES = quantize~.c +rawprint_la_SOURCES = rawprint.c +regex_la_SOURCES = regex.c +relay_la_SOURCES = relay.c +repack_la_SOURCES = repack.c +repeat_la_SOURCES = repeat.c +route__la_SOURCES = route~.c +sfplay_la_SOURCES = sfplay.c +sfrecord_la_SOURCES = sfrecord.c +sgn__la_SOURCES = sgn~.c +sigzero__la_SOURCES = sigzero~.c +sleepgrain_la_SOURCES = sleepgrain.c +sort_la_SOURCES = sort.c +step__la_SOURCES = step~.c +strcmp_la_SOURCES = strcmp.c +sum_la_SOURCES = sum.c +swap__la_SOURCES = swap~.c +symbol2list_la_SOURCES = symbol2list.c +tabdump_la_SOURCES = tabdump.c +tabminmax_la_SOURCES = tabminmax.c +tabread4___la_SOURCES = tabread4~~.c +tabset_la_SOURCES = tabset.c +tavg__la_SOURCES = tavg~.c +time_la_SOURCES = time.c +unpack__la_SOURCES = unpack~.c +unpack_la_SOURCES = unpack.c +urn_la_SOURCES = urn.c +wrap_la_SOURCES = wrap.c +z__la_SOURCES = z~.c + +zexy_la_SOURCES = zexy.c z_zexy.c \ + zexy.h zexySIMD.h z_zexy.h zexyconf.h \ + 0x260x260x7e.c 0x2e.c 0x3c0x7e.c 0x3d0x3d0x7e.c 0x3e0x7e.c 0x7c0x7c0x7e.c \ + a2l.c abs~.c absgn~.c atoi.c avg~.c \ + blockmirror~.c blockshuffle~.c blockswap~.c \ + date.c demultiplex~.c demultiplex.c dfreq~.c dirac~.c drip.c envrms~.c \ + fifop.c freadln.c fwriteln.c glue.c index.c length.c lifop.c limiter~.c \ + list2int.c list2lists.c list2symbol.c lister.c listfind.c liststorage.c lpt.c \ + makesymbol.c matchbox.c mavg.c minmax.c msgfile.c multiline~.c multiplex~.c \ + multiplex.c multireceive.c niagara.c noish~.c noisi~.c operating_system.c pack~.c \ + pack.c packel.c pdf~.c prime.c quantize~.c rawprint.c regex.c relay.c repack.c \ + repeat.c route~.c sfplay.c sfrecord.c sgn~.c sigzero~.c sleepgrain.c sort.c \ + step~.c strcmp.c sum.c swap~.c symbol2list.c tabdump.c tabminmax.c tabread4~~.c \ + tabset.c tavg~.c time.c unpack~.c unpack.c urn.c wrap.c z~.c +if WINDOWS +zexy_la_SOURCES += winNT_portio.c +endif + diff --git a/src/bootstrap.sh b/src/bootstrap.sh index 66fdf74..06878ba 100755 --- a/src/bootstrap.sh +++ b/src/bootstrap.sh @@ -1,6 +1,4 @@ #!/bin/sh - -aclocal && \ -autoconf && \ +cd .. && ./autogen.sh echo "now run './configure' for help on args run './configure --help'" diff --git a/src/configure b/src/configure new file mode 100755 index 0000000..5fe2052 --- /dev/null +++ b/src/configure @@ -0,0 +1,10 @@ +#!/bin/sh + +TOPDIR=.. + +echo "dummy configure... starting at top: ${TOPDIR}/" + +cd ${TOPDIR}/ + + +./configure $@ diff --git a/src/configure.ac b/src/configure.ac deleted file mode 100644 index f015216..0000000 --- a/src/configure.ac +++ /dev/null @@ -1,419 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT([zexy.h]) -AC_CONFIG_HEADER([zexyconf.h]) - -LIBNAME=zexy - -ARCH=$(uname -m) -KERN=$(uname -s) - - -dnl Checks for programs. -AC_PROG_CC - -AC_SUBST(STK) -AC_SUBST(CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(DEFS) -AC_SUBST(LFLAGS) -AC_SUBST(EXT) -AC_SUBST(LD) -AC_SUBST(STRIP) -AC_SUBST(STRIPFLAGS) -AC_SUBST(LIBRARY_VERSION) -AC_SUBST(BUILDLIBRARY) -AC_SUBST(REFERENCEPATH) -AC_SUBST(PDLIBDIR) -AC_SUBST(INCLUDES) -AC_SUBST(SOURCES) -AC_SUBST(LIBNAME) -AC_SUBST(CONFIGUREFLAGS) - -## store the flags passed to us -## is there no way to get the flags without quotes? -#CONFIGUREFLAGS=${ac_configure_args} -## and is this solution portable? time will show.... -CONFIGUREFLAGS=$(echo ${ac_configure_args} | sed "s/'//g") - -AC_ARG_WITH(pdversion,[ --with-pdversion= enforce a certain pd-version (e.g. 0.37)]) -AC_ARG_WITH(version, [ --with-version= enforce a certain zexy-version (e.g. 2.0)]) -AC_ARG_WITH(extension,[ --with-extension= enforce a certain extension for the dynamic library (e.g. dll)]) -AC_ARG_WITH(pd, [ --with-pd= where to look for pd-headers and and -libs]) -AC_ARG_ENABLE(PIC, [ --disable-PIC disable compilation with PIC-flag]) -AC_ARG_ENABLE(lpt, [ --enable-lpt enable parallelport-support]) -AC_ARG_ENABLE(library,[ --disable-library split the library into single externals]) - -if test "x" = "x${enable_PIC}" ; then - enable_PIC="${with_PIC}" -fi - -if test "x" = "x${enable_lpt}" ; then - enable_lpt="${with_lpt}" -fi - -if test "xno" != "x${enable_library}" ; then -dnl LATER: find a more generic way to generate the .._LIBRARY define - BUILDLIBRARY="-DZEXY_LIBRARY" -fi - -if test $(uname | sed -e 's/^MINGW.*/NT/') = NT ; -then - LD=${CC} - EXT=dll -fi - -if test "x$with_pd" != "x"; then - if test -d "${with_pd}"; then - PDPATH=${with_pd} - fi - - if test -d "${PDPATH}/src"; then - AC_MSG_RESULT([adding ${PDPATH}/src to INCLUDES]) - INCLUDES="-I${PDPATH}/src ${INCLUDES}" - - AC_MSG_RESULT([adding ${PDPATH}/src to LDFLAGS]) - LDFLAGS="-L${PDPATH}/src ${LDFLAGS}" - else - if test -d "${PDPATH}"; then - AC_MSG_RESULT([adding ${PDPATH} to INCLUDES]) - INCLUDES="-I${PDPATH} ${INCLUDES}" - fi - fi - if test -d "${PDPATH}/bin"; then - AC_MSG_RESULT([adding ${PDPATH}/bin to LDFLAGS]) - LDFLAGS="-L${PDPATH}/bin ${LDFLAGS}" - else - if test -d "${PDPATH}"; then - AC_MSG_RESULT([adding ${PDPATH} to LDFLAGS]) - LDFLAGS="-L${PDPATH} ${LDFLAGS}" - fi - 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 LDFLAGS="-L$id $LDFLAGS"; fi - done -fi - - -CFLAGS="${INCLUDES} ${CFLAGS}" -CPPFLAGS="${INCLUDES} ${CPPFLAGS}" -INCLUDES="" - -dnl Checks for libraries. -dnl Replace `main' with a function in -lc: -AC_CHECK_LIB(c, main) -AC_CHECK_LIB(crtdll, fclose) - -AC_CHECK_LIB(coldname, lseek) -AC_CHECK_LIB(kernel32, main) -AC_CHECK_LIB(user32, main) -AC_CHECK_LIB(gdi32, 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) - -AC_CHECK_LIB(pd, nullfn) - -AC_CHECK_LIB(regex, regcomp) - - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(stdlib.h stdio.h string.h math.h time.h sys/time.h regex.h alloca.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_TIME - -### make-depend flags -if test "x$ac_cv_c_compiler_gnu" = "xyes"; then - AC_SUBST(MAKEDEP_FLAGS, "-MM") -else - AC_SUBST(MAKEDEP_FLAGS, "-M") -fi - - -dnl Checks for library functions. -AC_FUNC_MMAP -AC_CHECK_FUNCS(select socket strerror) - -AC_CHECK_FAT(ARCH_FLAG) -AC_SUBST(ARCH_FLAG) - -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_CHECK_CFLAGS([-mms-bitfields]) - -if test "x$enable_PIC" != "xno"; then - AC_CHECK_CFLAGS([-fPIC]) -fi - -AC_CHECK_SIMD - -dnl if we don't have $LD set, we set it to $(CC) -dnl LD=${LD:=$CC} -if test "x$LD" = "x" -then - if test "x$host" != "x" - then - LD=${host}-ld - if $(which ${LD} > /dev/null) - then - : - else - LD="" - fi - fi -fi -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} - - -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 - if test "x$cross_compiling" = "xno" - then - -cat > conftest.c << EOF -#include -#include "m_pd.h" -int main(){ - printf("%d.%d\n", PD_MAJOR_VERSION, PD_MINOR_VERSION); - return 0; -} -EOF - if $CC $CFLAGS -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 - -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/ - echo "yes" -else - REFERENCEPATH=doc/5.reference/ - echo "no" -fi - -dnl check for zexy-version (but why...) -AC_MSG_CHECKING("zexy-version") - -if test "$with_version" != "" -then - echo -n "($with_version)...forced " - LIBRARY_VERSION="$with_version" -else - if test "x$cross_compiling" = "xno" - then -cat > conftest.c << EOF -#include -#include "zexy.h" -int main(){ - printf("%s\n", VERSION); - return 0; -} -EOF - - if $CC $CFLAGS $LDFLAGS -o conftest.o conftest.c > /dev/null 2>&1 - then - LIBRARY_VERSION=$(./conftest.o) - echo "$LIBRARY_VERSION" - else - LIBRARY_VERSION="X" - echo "(unknown)" - fi - else - LIBRARY_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 x${KERN} = xLinux; -then - 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 x${KERN} = xDarwin; -then - LD=${CC} - EXT=pd_darwin - STRIP="echo faking strip" - 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 - -# linux -AC_CHECK_LDFLAGS([-shared -Wl,--export-dynamic]) - -#osx -AC_CHECK_LDFLAGS([-bundle -mmacosx-version-min=10.3 -undefined dynamic_lookup], - , - AC_CHECK_LDFLAGS([-dynamiclib -mmacosx-version-min=10.3 -undefined dynamic_lookup], - , - AC_CHECK_LDFLAGS([-bundle -undefined suppress -flat_namespace]) - ) - ) - - - - -if test x${KERN} = xIRIX64; then - LDFLAGS="-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 DEFS+="-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 x${KERN} = xIRIX32; -then - LDFLAGS="-o32 -DUNIX -DIRIX -O2 - -shared -rdata_shared" - EXT=pd_irix5 - dnl DEFS+="-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 - - -if test "x$with_extension" != "x" -then - EXT=$with_extension -fi - -AC_CHECK_HEADERS(linux/ppdev.h, [ have_ppdev="yes" ], [ have_ppdev="no" ]) - -dnl check for LPT -AC_MSG_CHECKING("parallel-port") -if test "$enable_lpt" != "no" -then - if test "$enable_lpt" = "yes" - then - AC_DEFINE([Z_WANT_LPT]) - echo "yes (forced)" - else - -cat > conftest.c << EOF -# include -int main(){ - ioperm(0x3bc, 8, 1); - outb(0, 0x3bc); - ioperm(0x3bc, 8, 0); - return 0; -} -EOF - - if $CC $CFLAGS -o conftest.o conftest.c > /dev/null 2>&1 - then - AC_DEFINE([Z_WANT_LPT]) - if test "x$have_ppdev" = "xyes" - then - echo "yes (with device-support)" - else - echo "yes" - fi - else - echo "no" - fi - fi -else - echo "no (ignored)" -fi - - -AC_CHECK_HEADERS(m_pd.h, , - AC_ERROR([m_pd.h is desperately needed! - install pd and/or use - "--with-pd=" or - "--includedir="])) - -LFLAGS=${LDFLAGS} -AC_OUTPUT(Make.config) - -## hmm, some dependencies seem to be wrong, resulting in running configure everytime if we don't touch zexyconf.h here -touch zexyconf.h - -#rm -f conftest.* diff --git a/src/zexy.h b/src/zexy.h index 979619a..2cd6ff3 100644 --- a/src/zexy.h +++ b/src/zexy.h @@ -45,12 +45,12 @@ * usually this is done in Make.config by configure */ #ifdef HAVE_CONFIG_H +# include "config.h" +#else # include "zexyconf.h" #endif /* HAVE_CONFIG_H */ -#include "m_pd.h" -#define VERSION "2.2.4" /* these pragmas are only used for MSVC, not MinGW or Cygwin */ #ifdef _MSC_VER @@ -60,6 +60,15 @@ # pragma warning( disable : 4996) /* deprecated functions */ #endif +#include "m_pd.h" + + + + +#ifndef VERSION +# define VERSION "(unknown version)" +#endif + #ifndef HEARTSYMBOL # define HEARTSYMBOL 64 #endif diff --git a/src/zexyconf.h b/src/zexyconf.h new file mode 100644 index 0000000..2fca57b --- /dev/null +++ b/src/zexyconf.h @@ -0,0 +1,32 @@ +#ifndef _ZEXYCONF_H_ +#define _ZEXYCONF_H_ +/* zexyconf.h: configuration for zexy: + * this is only included if no config.h is created + * adapt this to your own needs + */ + +/* Define if you have the header file. */ +/* +#undef HAVE_REGEX_H +*/ + +/* Define if you have the header file. */ +/* +#undef HAVE_ALLOCA_H +*/ + +/* define if you want parallelport-support (direct access to the port address) */ +/* +#undef Z_WANT_LPT +*/ + +/* define if you have the header file. + * (for parport _device_ support) + * you need Z_WANT_LPT for this to have an effect ! + */ +/* +#undef HAVE_LINUX_PPDEV_H +*/ + +#endif /* _ZEXYCONF_H_ */ + diff --git a/src/zexyconf.h.in b/src/zexyconf.h.in deleted file mode 100644 index 160668c..0000000 --- a/src/zexyconf.h.in +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _ZEXYCONF_H_ -#define _ZEXYCONF_H_ - -/* Define if you have the header file. */ -#undef HAVE_REGEX_H - -/* Define if you have the header file. */ -#undef HAVE_ALLOCA_H - -/* define if you want parallelport-support (direct access to the port address) */ -#undef Z_WANT_LPT - -/* define if you have the header file. - * (for parport _device_ support) - * you need Z_WANT_LPT for this to have an effect ! - */ -#undef HAVE_LINUX_PPDEV_H - -#endif /* _ZEXYCONF_H_ */ - -- cgit v1.2.1