aboutsummaryrefslogtreecommitdiff
path: root/common/m4/ax_pd_external.m4
diff options
context:
space:
mode:
Diffstat (limited to 'common/m4/ax_pd_external.m4')
-rw-r--r--common/m4/ax_pd_external.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/common/m4/ax_pd_external.m4 b/common/m4/ax_pd_external.m4
index 8afa7b0..1799cc7 100644
--- a/common/m4/ax_pd_external.m4
+++ b/common/m4/ax_pd_external.m4
@@ -48,6 +48,7 @@
# PDEXT_DFLAGS : preprocessor flags, appended to CPPFLAGS
# PDEXT_WFLAGS : compiler warning flags, appended to CFLAGS (gcc only)
# PDEXT : platform-specific external extension (without leading ".")
+# LIBS : additional libs required for building pd externals (win32 only)
#
# EXEEXT hacks:
# AC_SUBST(pd_buildext)
@@ -330,6 +331,26 @@ AC_DEFUN([AX_PD_EXTERNAL],
PDEXT=pd_irix5
fi
+ ##-- win32 via minGW/MSYS
+ ## + courtesy of pd-extended build system, SVN externals/Makefile
+ if test "$uname_s" = "MINGW32_NT-5.1";
+ then
+ PDEXT_DFLAGS="\
+ -D'O_NONBLOCK=1' -D'srand48(n)=srand((n))' \
+ -D'drand48()=((double)rand()/RAND_MAX)' -D'bzero(p,n)=memset(p,0,n)' \
+ "
+ PDEXT_LFLAGS="-shared -L'${pddir}/bin' -L'${pddir}/obj'"
+ PDEXT_CFLAGS="-mms-bitfields -DMSW -DNT"
+ LIBS="$LIBS -lpd -lwsock32 -lpthreadGC2 -lkernel32 -luser32 -lgdi32 -lregex"
+ if test "$ENABLE_DEBUG" = "no" -a -z "$UCFLAGS"; then
+ ##-- only set OFLAGS if user CFLAGS are empty
+ PDEXT_OFLAGS="-O2"
+ elif test "$ENABLE_DEBUG" = "yes"; then
+ PDEXT_OFLAGS="-g"
+ fi
+ PDEXT=dll
+ fi
+
##----------- report pd extension
AC_MSG_NOTICE([will use pd extension ".$PDEXT" for pd externals])