aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Make.config.in4
-rw-r--r--src/Makefile.nt1
-rw-r--r--src/acinclude.m452
-rwxr-xr-xsrc/bootstrap.sh6
-rw-r--r--src/configure.ac54
5 files changed, 63 insertions, 54 deletions
diff --git a/src/Make.config.in b/src/Make.config.in
index 33b2ad3..3721428 100644
--- a/src/Make.config.in
+++ b/src/Make.config.in
@@ -12,7 +12,7 @@ INSTALL_BIN=$(DESTDIR)$(PREFIX)/lib/pd/extra/$(LIBNAME)
INSTALL_DOC=$(DESTDIR)$(PREFIX)/lib/pd/@REFERENCEPATH@$(LIBNAME)
EXT = @EXT@
-DEFS = @DFLAGS@ @DEFS@
+DEFS = @DEFS@
IFLAGS = -I. @INCLUDES@
CC = @CC@
@@ -20,9 +20,7 @@ LD = @LD@
STRIP = @STRIP@
STRIPFLAGS= @STRIPFLAGS@
-AFLAGS =
LFLAGS = @LFLAGS@
-WFLAGS =
Z_CFLAGS = $(IFLAGS) $(DEFS) $(BUILDLIBRARY) -DPD $(WFLAGS) @CFLAGS@ $(CFLAGS)
LIBS = @LIBS@
diff --git a/src/Makefile.nt b/src/Makefile.nt
index c92727b..52bdb98 100644
--- a/src/Makefile.nt
+++ b/src/Makefile.nt
@@ -14,7 +14,6 @@ LD=link
DEFS=/D__WIN32__ /DPD /DZEXY_LIBRARY
IFLAGS=/I. /I$(PREFIX)\src
-AFLAGS=
WFLAGS=/W3 /WX /nologo
## for LinePrinter-support: (if you don't want it, comment it out)
diff --git a/src/acinclude.m4 b/src/acinclude.m4
index 772fecf..30a5080 100644
--- a/src/acinclude.m4
+++ b/src/acinclude.m4
@@ -93,3 +93,55 @@ AC_DEFUN([AC_CHECK_LDFLAGS],
fi
])# AC_CHECK_LDFLAGS
+
+AC_DEFUN([AC_CHECK_FAT],
+[
+AC_ARG_ENABLE(fat-binary,
+ [ --enable-fat-binary=ARCHS
+ build an Apple Multi Architecture Binary (MAB);
+ ARCHS is a comma-delimited list of architectures for
+ which to build; if ARCHS is omitted, then the package
+ will be built for all architectures supported by the
+ platform (e.g. "ppc,i386" for MacOS/X and Darwin;
+ if this option is disabled or omitted entirely, then
+ the package will be built only for the target
+ platform],
+ [fat_binary=$enableval], [fat_binary=no])
+if test "$fat_binary" != no; then
+ AC_MSG_CHECKING([target architectures])
+
+ # Respect TARGET_ARCHS setting from environment if available.
+ if test -z "$TARGET_ARCHS"; then
+ # Respect ARCH given to --enable-fat-binary if present.
+ if test "$fat_binary" != yes; then
+ TARGET_ARCHS=`echo "$fat_binary" | tr ',' ' '`
+ else
+ # Choose a default set of architectures based upon platform.
+ TARGET_ARCHS="ppc i386"
+ fi
+ fi
+ AC_MSG_RESULT([$TARGET_ARCHS])
+
+ define([Name],[translit([$1],[./-], [___])])
+ # /usr/lib/arch_tool -archify_list $TARGET_ARCHS
+ []Name=""
+ for archs in $TARGET_ARCHS
+ do
+ []Name="$[]Name -arch $archs"
+ done
+
+ if test "x$[]Name" != "x"; then
+ tmp_arch_cflags="$CFLAGS"
+ AC_CHECK_CFLAGS($[]Name,,[]Name="")
+ CFLAGS="$tmp_arch_cflags"
+ fi
+
+ if test "x$[]Name" != "x"; then
+ tmp_arch_ldflags="$LDFLAGS"
+ AC_CHECK_LDFLAGS($[]Name,,[]Name="")
+ LDFLAGS="$tmp_arch_ldflags"
+ fi
+
+ undefine([Name])
+fi
+])# AC_CHECK_FAT
diff --git a/src/bootstrap.sh b/src/bootstrap.sh
new file mode 100755
index 0000000..66fdf74
--- /dev/null
+++ b/src/bootstrap.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+aclocal && \
+autoconf && \
+echo "now run './configure'
+for help on args run './configure --help'"
diff --git a/src/configure.ac b/src/configure.ac
index 1c284d4..b8aa813 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -14,7 +14,6 @@ AC_PROG_CC
AC_SUBST(STK)
AC_SUBST(CFLAGS)
AC_SUBST(DEFS)
-AC_SUBST(DFLAGS)
AC_SUBST(LFLAGS)
AC_SUBST(EXT)
AC_SUBST(LD)
@@ -137,53 +136,7 @@ dnl Checks for library functions.
AC_FUNC_MMAP
AC_CHECK_FUNCS(select socket strerror)
-
-dnl checks for fat-binary
-AC_ARG_ENABLE(fat-binary,
- [ --enable-fat-binary=ARCHS
- build an Apple Multi Architecture Binary (MAB);
- ARCHS is a comma-delimited list of architectures for
- which to build; if ARCHS is omitted, then the package
- will be built for all architectures supported by the
- platform (e.g. "ppc,i386" for MacOS/X and Darwin;
- if this option is disabled or omitted entirely, then
- the package will be built only for the target
- platform],
- [fat_binary=$enableval], [fat_binary=no])
-if test "$fat_binary" != no; then
- AC_MSG_CHECKING([target architectures])
-
- # Respect TARGET_ARCHS setting from environment if available.
- if test -z "$TARGET_ARCHS"; then
- # Respect ARCH given to --enable-fat-binary if present.
- if test "$fat_binary" != yes; then
- TARGET_ARCHS=`echo "$fat_binary" | tr ',' ' '`
- else
- # Choose a default set of architectures based upon platform.
- TARGET_ARCHS="ppc i386"
- fi
- fi
- AC_MSG_RESULT([$TARGET_ARCHS])
-
- # /usr/lib/arch_tool -archify_list $TARGET_ARCHS
- ARCH_FLAG=
- for archs in $TARGET_ARCHS
- do
- ARCH_FLAG="$ARCH_FLAG -arch $archs"
- done
-
- if test "x$ARCH_FLAG" != "x"; then
- tmp_arch_cflags="$CFLAGS"
- AC_CHECK_CFLAGS([$ARCH_FLAG],,ARCH_FLAG="")
- CFLAGS="$tmp_arch_cflags"
- fi
-
- if test "x$ARCH_FLAG" != "x"; then
- tmp_arch_ldflags="$LDFLAGS"
- AC_CHECK_LDFLAGS([$ARCH_FLAG],,ARCH_FLAG="")
- LDFLAGS="$tmp_arch_ldflags"
- fi
-fi
+AC_CHECK_FAT(ARCH_FLAG)
AC_SUBST(ARCH_FLAG)
dnl check for "-mms-bitfields" cflag
@@ -355,7 +308,7 @@ if test x${KERN} = xIRIX64; then
-OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
-shared -rdata_shared"
EXT=pd_irix6
- dnl DFLAGS="-DUNIX -DIRIX6"
+ dnl DEFS+="-DUNIX -DIRIX6"
STRIPFLAGS="--strip-unneeded"
if test "$enable_lpt" = "yes"; then
AC_MSG_ERROR("lpt not supported on this platform");
@@ -371,7 +324,7 @@ then
LDFLAGS="-o32 -DUNIX -DIRIX -O2
-shared -rdata_shared"
EXT=pd_irix5
- dnl DFLAGS="-DUNIX -DIRIX5"
+ dnl DEFS+="-DUNIX -DIRIX5"
STRIPFLAGS="--strip-unneeded"
if test "$enable_lpt" = "yes"; then
AC_MSG_ERROR("lpt not supported on this platform");
@@ -437,6 +390,7 @@ AC_CHECK_HEADERS(m_pd.h, ,
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.*