aboutsummaryrefslogtreecommitdiff
path: root/sprinkler/configure.ac
diff options
context:
space:
mode:
authorBryan Jurish <mukau@users.sourceforge.net>2009-01-17 22:26:44 +0000
committerBryan Jurish <mukau@users.sourceforge.net>2009-01-17 22:26:44 +0000
commit727aa110af0cbb9e2585a0147616d7956a401dd4 (patch)
treeeb774f0871c69858cdb5d37cd2e9e419ff037bf8 /sprinkler/configure.ac
parent2787f508f244b5fcbca0b38c3ca755d555b723bf (diff)
+ added autotools-generated files to sprinkler/
svn path=/trunk/externals/moocow/; revision=10572
Diffstat (limited to 'sprinkler/configure.ac')
-rw-r--r--sprinkler/configure.ac240
1 files changed, 240 insertions, 0 deletions
diff --git a/sprinkler/configure.ac b/sprinkler/configure.ac
new file mode 100644
index 0000000..d7b8564
--- /dev/null
+++ b/sprinkler/configure.ac
@@ -0,0 +1,240 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl -- adapted from 'configure.in' in ggee distribution by Guenter Geiger
+AC_PREREQ(2.5)
+
+dnl Some handy macros
+define([THE_PACKAGE_NAME], [sprinkler])
+define([THE_PACKAGE_VERSION], [0.06])
+define([THE_PACKAGE_AUTHOR], [moocow@ling.uni-potsdam.de])
+
+AC_INIT(THE_PACKAGE_NAME, THE_PACKAGE_VERSION, THE_PACKAGE_AUTHOR)
+
+dnl
+dnl source & aux
+dnl
+AC_CONFIG_AUX_DIR(config)
+
+
+dnl
+dnl save user's CFLAGS,CPPFLAGS
+dnl
+UCPPFLAGS="$CPPFLAGS"
+UCFLAGS="$CFLAGS"
+
+dnl
+dnl use automake
+dnl
+AM_INIT_AUTOMAKE(THE_PACKAGE_NAME, THE_PACKAGE_VERSION)
+
+dnl
+dnl use autoheader
+dnl
+dnl AM_CONFIG_HEADER(config.h)
+
+dnl
+dnl Programs, prefix
+dnl
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PREFIX_DEFAULT(/usr/local)
+
+dnl
+dnl Substitutions
+dnl
+AC_SUBST(AFLAGS)
+AC_SUBST(DFLAGS)
+AC_SUBST(IFLAGS)
+AC_SUBST(LFLAGS)
+AC_SUBST(OFLAGS)
+AC_SUBST(WFLAGS)
+AC_SUBST(LD)
+
+AC_SUBST(PDEXT)
+
+dnl version stuff (automatically exported?)
+AC_SUBST(PACKAGE_VERSION)
+AC_SUBST(PACKAGE_NAME)
+AC_SUBST(BUGREPORT)
+
+dnl other flags
+dnl AC_ISC_POSIX
+
+##--------------------------------------------------------------
+## Pd external objects
+AC_MSG_CHECKING([how to hack automake EXEEXT conventions])
+case "${am__api_version}" in
+ 1.[[0-4]]*)
+ AC_MSG_RESULT([automake v${am__api_version}: on install])
+ buildext=""
+ ;;
+ *)
+ AC_MSG_RESULT([automake v${am__api_version}: on build])
+ buildext="\$(EXEEXT)"
+ ;;
+esac
+PD_OBJECT_EXTERNALS="sprinkler${buildext}"
+AC_SUBST(PD_OBJECT_EXTERNALS)
+
+
+##--------------------------------------------------------------
+## Pd directories
+AC_ARG_WITH(pd-dir,
+ AC_HELP_STRING([--with-pd-dir=DIR], [PD base directory (default=PREFIX/pd)]),
+ [pddir="$withval"],
+ [pddir="\${prefix}/pd"])
+pddocdir="${pddir}/doc/5.reference"
+AC_SUBST(pddir)
+AC_SUBST(pddocdir)
+
+
+AC_ARG_WITH(pd-include,
+ AC_HELP_STRING([--with-pd-include=DIR], [PD include directory (default=NONE)]),
+ [pdincludedir="$withval"],
+ [pdincludedir=""])
+if test -n "$pdincludedir" ; then
+ IFLAGS="$IFLAGS -I$pdincludedir"
+fi
+AC_SUBST(pdincludedir)
+
+AC_ARG_WITH(pd-extdir,
+ AC_HELP_STRING([--with-pd-extdir=DIR], [Directory for PD externals (default=PDDIR/externs)]),
+ [pdexternsdir="$withval"],
+ [pdexternsdir="$pddir/externs"])
+AC_SUBST(pdexternsdir)
+
+dnl
+dnl Check for m_pd.h
+dnl
+CPPFLAGS="$CPPFLAGS $IFLAGS"
+AC_CHECK_HEADER(m_pd.h,[],
+ AC_MSG_WARN([-----------------------------------------------------------------])
+ AC_MSG_WARN([could not find PD header file 'm_pd.h' -- things might get ugly.])
+ AC_MSG_WARN([-----------------------------------------------------------------]),
+ [/* nonempty includes: compile only */])
+
+##--------------------------------------------------------------
+## local config
+
+dnl
+dnl build backwards-compatible non-max 'forward'?
+dnl
+AC_MSG_CHECKING([whether to allow non-MAX "forward" alias])
+AC_ARG_ENABLE([forward],
+ AC_HELP_STRING(
+ [--enable-forward],
+ [allow backwards-compatible non-MAX "forward" alias (default=no)]))
+
+if test "$enable_forward" = "yes" ; then
+ AC_MSG_RESULT(yes)
+ NON_MAX_FORWARD="yes"
+ DFLAGS="$DFLAGS -DNON_MAX_FORWARD"
+ SPRINKLER_COMPAT_TEXT=["(with MAX-incompatible [forward] alias)"]
+ SPRINKLER_ALIAS_1="#X obj 102 407 forward;"
+ SPRINKLER_ALIAS_2="#X obj 102 432 fw;"
+else
+ AC_MSG_RESULT(no)
+ NON_MAX_FORWARD="no"
+ SPRINKLER_COMPAT_TEXT=["(formerly MAX-incompatible \[forward\])"]
+ SPRINKLER_ALIAS_1="#X text 102 407 none;"
+ SPRINKLER_ALIAS_2="#X text 102 432 (disabled);"
+fi
+AC_SUBST(NON_MAX_FORWARD)
+AC_SUBST(SPRINKLER_COMPAT_TEXT)
+AC_SUBST(SPRINKLER_ALIAS_1)
+AC_SUBST(SPRINKLER_ALIAS_2)
+
+dnl
+dnl use pd_forwardmess() for everything?
+dnl
+AC_MSG_CHECKING([whether to use pd_forwardmess() for all messages])
+AC_ARG_ENABLE([all-forwardmess],
+ AC_HELP_STRING(
+ [--enable-all-forwardmess],
+ [use pd_forwardmess() for all messages (default=no)]))
+
+if test "$enable_all_forwardmess" = "yes" ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ALL_FORWARDMESS, 1, [Define this to use pd_forwardmess() for all messages])
+else
+ AC_MSG_RESULT(no)
+fi
+
+
+##--------------------------------------------------------------
+## debug?
+AC_MSG_CHECKING([whether we are building a debug version])
+AC_ARG_ENABLE([debug],
+ AC_HELP_STRING([--enable-debug],[build debug version (default=no)]))
+if test "$enable_debug" = "yes" ; then
+ AC_MSG_RESULT(yes)
+ DEBUG="yes"
+ AC_DEFINE(SPRINKLER_DEBUG,1,
+ [Define this to include debugging code for the 'readdir' external.])
+else
+ AC_MSG_RESULT(no)
+ DEBUG="no"
+fi
+AC_SUBST(DEBUG)
+
+
+##--------------------------------------------------------------
+## machine-dependent variables
+##
+LD=ld
+if test `uname -s` = Linux;
+then
+ LFLAGS="-export_dynamic -shared"
+ if test "$DEBUG" = "no"; then
+ #OFLAGS="-O6 -funroll-loops -fomit-frame-pointer -finline-limit-10000000"
+ OFLAGS="-O3 -funroll-loops -fomit-frame-pointer -pipe"
+ else
+ OFLAGS="-g"
+ fi
+ PDEXT=pd_linux
+fi
+
+if test `uname -m` = alpha;
+then
+ AFLAGS="-mieee -mcpu=ev56";
+ OFLAGS="$CFLAGS"
+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"
+ OFLAGS="$CFLAGS"
+ PDEXT=pd_irix6
+fi
+
+if test `uname -s` = IRIX32;
+then
+ LFLAGS="-o32 -DUNIX -DIRIX -O2 -shared -rdata_shared"
+ OFLAGS="$CFLAGS"
+ PDEXT=pd_irix5
+fi
+
+dnl
+dnl Flags for MacOSX, borrowed from pd-0.35-test16
+dnl
+if test `uname -s` = Darwin;
+then
+ LD=cc
+ LFLAGS="-bundle -undefined suppress -flat_namespace"
+ PDEXT=pd_darwin
+ DFLAGS="$DFLAGS -DMACOSX"
+
+ if test "$DEBUG" = "no"; then
+ OFLAGS="-O2"
+ else
+ OFLAGS="-g"
+ fi
+fi
+
+
+##-- restore user's CFLAGS
+CFLAGS="$UCFLAGS"
+CPPFLAGS="$UCPPFLAGS"
+
+AC_OUTPUT(config/Makefile sprinkler-help.pd Makefile)