aboutsummaryrefslogtreecommitdiff
path: root/src/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure.ac')
-rw-r--r--src/configure.ac148
1 files changed, 86 insertions, 62 deletions
diff --git a/src/configure.ac b/src/configure.ac
index eef8d1f..6e4461c 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -34,7 +34,10 @@ 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])
AC_ARG_ENABLE(icc, [ --enable-icc enable ICC-support])
-
+if test `uname -s` = Darwin;
+then
+AC_ARG_ENABLE(bundle, [ --enable-bundleloader use bundle_loader (default: autodetect)])
+fi
if test $includedir
then
@@ -73,12 +76,71 @@ LD=${LD:-ld}
DFLAGS="-DZEXY_LIBRARY"
+
+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 $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 for machines are here now
+dnl OK, checks which machines are here now
dnl
if test `uname -s` = Linux;
then
- LFLAGS="-export_dynamic -shared"
+ LFLAGS="-export_dynamic -shared"
EXT=pd_linux
STRIPFLAGS="--strip-unneeded"
if test "$enable_icc" = "yes"; then
@@ -100,9 +162,27 @@ 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_bundleloader" = ""; then
+ if test "$PD_MAJORVERSION" -gt 0 || test "$PD_MINORVERSION" -ge 39; then
+ enable_bundleloader="yes"
+ else
+ enable_bundleloader="no"
+ fi
+ fi
+ if test "$enable_bundleloader" = "yes"; then
+dnl i hope "prefix" points to where we want it...
+dnl should it rather be @exec_prefix@ ???
+ LFLAGS="-bundle -bundle_loader @prefix@/bin/pd"
+ STRIPFLAGS=
+ else
+ LFLAGS="-bundle -undefined suppress -flat_namespace"
+ STRIPFLAGS=
+ fi
+
+
+
if test "$enable_lpt" = "yes"; then
AC_MSG_ERROR("lpt not supported on this platform");
fi
@@ -111,6 +191,7 @@ then
enable_lpt="no";
fi
fi
+
if test `uname | sed -e 's/^MINGW.*/NT/'` = NT;
then
LD=gcc
@@ -155,63 +236,6 @@ then
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 $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 check for LPT
AC_MSG_CHECKING("parallel-port")
if test "$enable_lpt" != "no"