aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure104
-rw-r--r--configure.ac19
-rw-r--r--libOSC/Makefile.in4
-rw-r--r--src/Makefile.in12
-rw-r--r--src/OSC-common.h35
-rw-r--r--src/dumpOSC.c10
6 files changed, 111 insertions, 73 deletions
diff --git a/configure b/configure
index c2d661e..d5e98d2 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.58 for OSCxpd 0.2.
+# Generated by GNU Autoconf 2.59 for OSCxpd 0.2.
#
# Report bugs to <jdl@xdv.org>.
#
@@ -896,40 +896,43 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-case "$ac_dir" in
-.) ac_abs_builddir=$ac_builddir;;
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
*)
- case $ac_builddir in
- .) ac_abs_builddir="$ac_dir";;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;;
- *) ac_abs_builddir="$ac_dir"/$ac_builddir;;
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
-case "$ac_dir" in
+case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
- .) ac_abs_top_builddir="$ac_dir";;
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
-case "$ac_dir" in
+case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
- .) ac_abs_srcdir="$ac_dir";;
+ .) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
-case "$ac_dir" in
+case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
- .) ac_abs_top_srcdir="$ac_dir";;
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
@@ -948,7 +951,7 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
- cd "$ac_popdir"
+ cd $ac_popdir
done
fi
@@ -956,7 +959,7 @@ test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
OSCxpd configure 0.2
-generated by GNU Autoconf 2.58
+generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@@ -970,7 +973,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by OSCxpd $as_me 0.2, which was
-generated by GNU Autoconf 2.58. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -4410,38 +4413,49 @@ else
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O2"
LDFLAGS="-Wl,-export_dynamic -shared"
pd_suffix=pd_linux
+ LIBS="-lc -lm"
;;
powerpc-*-linux*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
pd_suffix=pd_linux
+ LIBS="-lc -lm"
;;
*-*-linux*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
INCLUDES="$INCLUDES"
pd_suffix=pd_linux
+ LIBS="-L../../../pd/bin -lpd -lc -lm"
;;
sparc-sun-*)
echo "YOU HAVE A SPARC STATION, not setting any flags, not supported yet"
;;
*-*-cygwin*)
- CFLAGS="$CPFLAGS -mno-cygwin -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
+ CFLAGS="$CFLAGS -mno-cygwin -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
LDFLAGS="-Wl,-export_dynamic -shared"
INCLUDES="$INCLUDES -I../../../pd/bin"
- LIBOSC=libOSC.lib
pd_suffix=dll
+ LIBS="-lc -lm"
+ ;;
+ *-*-mingw*)
+ CFLAGS="$CFLAGS -mms-bitfields -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
+ LDFLAGS="-shared"
+ INCLUDES="$INCLUDES -I../../../pd/bin"
+ pd_suffix=dll
+ LIBS="-L../../../pd/bin -lpd -lm -lwsock32"
;;
*-*-darwin*)
- CFLAGS="$CPFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
- # LDFLAGS=" -bundle -bundle_loader ../../../pd/bin/pd -undefined suppress -flat_namespace"
+ CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
LDFLAGS=" -bundle -bundle_loader ../../../pd/bin/pd -flat_namespace "
pd_suffix=pd_darwin
+ LIBS="-lc -lm"
;;
*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
pd_suffix=pd_linux
+ LIBS="-lc -lm"
;;
esac
fi
@@ -4713,9 +4727,10 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_i=`echo "$ac_i" |
sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -4994,7 +5009,7 @@ _ASBOX
cat >&5 <<_CSEOF
This file was extended by OSCxpd $as_me 0.2, which was
-generated by GNU Autoconf 2.58. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5054,7 +5069,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
OSCxpd config.status 0.2
-configured by $0, generated by GNU Autoconf 2.58,
+configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -5387,40 +5402,43 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-case "$ac_dir" in
-.) ac_abs_builddir=$ac_builddir;;
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
*)
- case $ac_builddir in
- .) ac_abs_builddir="$ac_dir";;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;;
- *) ac_abs_builddir="$ac_dir"/$ac_builddir;;
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
-case "$ac_dir" in
+case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
- .) ac_abs_top_builddir="$ac_dir";;
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
-case "$ac_dir" in
+case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
- .) ac_abs_srcdir="$ac_dir";;
+ .) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
-case "$ac_dir" in
+case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
- .) ac_abs_top_srcdir="$ac_dir";;
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
diff --git a/configure.ac b/configure.ac
index cd8db47..92b9f3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,39 +82,50 @@ else
LDFLAGS="-Wl,-export_dynamic -shared"
dnl we could test for bad glibc here, but don't
pd_suffix=pd_linux
+ LIBS="-lc -lm"
;;
powerpc-*-linux*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
pd_suffix=pd_linux
+ LIBS="-lc -lm"
;;
*-*-linux*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
INCLUDES="$INCLUDES"
pd_suffix=pd_linux
+ LIBS="-L../../../pd/bin -lpd -lc -lm"
;;
sparc-sun-*)
echo "YOU HAVE A SPARC STATION, not setting any flags, not supported yet"
;;
*-*-cygwin*)
- CFLAGS="$CPFLAGS -mno-cygwin -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
+ CFLAGS="$CFLAGS -mno-cygwin -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
LDFLAGS="-Wl,-export_dynamic -shared"
INCLUDES="$INCLUDES -I../../../pd/bin"
- LIBOSC=libOSC.lib
pd_suffix=dll
+ LIBS="-lc -lm"
+ ;;
+ *-*-mingw*)
+ CFLAGS="$CFLAGS -mms-bitfields -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
+ LDFLAGS="-shared"
+ INCLUDES="$INCLUDES -I../../../pd/bin"
+ pd_suffix=dll
+ LIBS="-L../../../pd/bin -lpd -lm -lwsock32"
;;
*-*-darwin*)
- CFLAGS="$CPFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
- # LDFLAGS=" -bundle -bundle_loader ../../../pd/bin/pd -undefined suppress -flat_namespace"
+ CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
LDFLAGS=" -bundle -bundle_loader ../../../pd/bin/pd -flat_namespace "
pd_suffix=pd_darwin
+ LIBS="-lc -lm"
;;
*)
dnl assume unix
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
pd_suffix=pd_linux
+ LIBS="-lc -lm"
;;
esac
fi
diff --git a/libOSC/Makefile.in b/libOSC/Makefile.in
index d67ba88..7d09fcb 100644
--- a/libOSC/Makefile.in
+++ b/libOSC/Makefile.in
@@ -17,10 +17,10 @@ all: ${LIBOBJS}
rm -f $*.o
test_OSC: test_OSC.o ${LIB}
- cc -o test_OSC test_OSC.o ${LIB}
+ $(CC) -o test_OSC test_OSC.o ${LIB}
test_OSC_timeTag: test_OSC_timeTag.o OSC-timetag.o
- cc -o test_OSC_timeTag test_OSC_timeTag.o OSC-timetag.o
+ $(CC) -o test_OSC_timeTag test_OSC_timeTag.o OSC-timetag.o
clean:
diff --git a/src/Makefile.in b/src/Makefile.in
index 518f05b..02b0751 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -17,7 +17,7 @@
EXT=o
-LIBS = -lm -lc
+LIBS = @LIBS@
LIBOSC = ../libOSC/@LIBOSC@
CFLAGS = @CFLAGS@
@@ -35,19 +35,19 @@ EXTS=sendOSC.@pd_suffix@ dumpOSC.@pd_suffix@ OSCroute.@pd_suffix@ OSC.@pd_suffix
all: $(EXTS)
dumpOSC.@pd_suffix@: dumpOSC.o
- cc $(LDFLAGS) -o dumpOSC.@pd_suffix@ $? -lc -lm
+ $(CC) $(LDFLAGS) -o dumpOSC.@pd_suffix@ $? $(LIBS)
sendOSC.@pd_suffix@: sendOSC.o htmsocket.o OSC-system-dependent.o
- cc $(LDFLAGS) -o sendOSC.@pd_suffix@ $? -lc -lm $(LIBOSC)
+ $(CC) $(LDFLAGS) -o sendOSC.@pd_suffix@ $? $(LIBS) $(LIBOSC)
OSCroute.@pd_suffix@: OSCroute.o OSC-pattern-match.o OSC-system-dependent.o
- cc $(LDFLAGS) -o OSCroute.@pd_suffix@ $? -lc -lm
+ $(CC) $(LDFLAGS) -o OSCroute.@pd_suffix@ $? $(LIBS)
OSC.@pd_suffix@: OSC.o sendOSC.o dumpOSC.o OSCroute.o htmsocket.o OSC-pattern-match.o OSC-system-dependent.o
- cc $(LDFLAGS) -o OSC.@pd_suffix@ $? -lc -lm $(LIBOSC)
+ $(CC) $(LDFLAGS) -o OSC.@pd_suffix@ $? $(LIBS) $(LIBOSC)
$(TARGETS): %.o : %.c
- cc $(CFLAGS) $(INCLUDES) -c -o $*.o $*.c
+ $(CC) $(CFLAGS) $(INCLUDES) -c -o $*.o $*.c
# ----------------------------------------------------------
diff --git a/src/OSC-common.h b/src/OSC-common.h
index d457686..46c66a9 100644
--- a/src/OSC-common.h
+++ b/src/OSC-common.h
@@ -34,6 +34,9 @@ The OpenSound Control WWW page is
by Matt Wright, 3/13/98
*/
+#ifndef _OSC_COMMON_H
+#define _OSC_COMMON_H
+
/* Boolean type */
#ifndef TRUE
@@ -41,20 +44,20 @@ typedef int Boolean;
#define TRUE 1
#define FALSE 0
#endif
-
-
-#ifdef WIN32
- #include <stdio.h>
- #ifdef OSC_EXPORTS
- #define OSC_API __declspec(dllexport)
- #else
- #define OSC_API __declspec(dllimport)
- #endif
- #ifdef _DEBUG
- #define DEBUG
- #endif
-#endif
-
+
+
+#ifdef _WIN32
+ #include <stdio.h>
+ #ifdef OSC_EXPORTS
+ #define OSC_API __declspec(dllexport)
+ #else
+ #define OSC_API __declspec(dllimport)
+ #endif
+ #ifdef _DEBUG
+ #define DEBUG
+ #endif
+#endif
+
//#define int32_t t_int
/* Fixed byte width types */
@@ -71,3 +74,7 @@ void OSCProblem(char *s, ...);
/* Warning for user */
void OSCWarning(char *s, ...);
+
+
+#endif /* _OSC_COMMON_H */
+
diff --git a/src/dumpOSC.c b/src/dumpOSC.c
index 873a3a9..8d34896 100644
--- a/src/dumpOSC.c
+++ b/src/dumpOSC.c
@@ -80,10 +80,12 @@ The OSC webpage is http://cnmat.cnmat.berkeley.edu/OpenSoundControl
//void sys_addpollfn(int fd, t_fdpollfn fn, void *ptr);
-#if defined(__sgi) || defined(__linux) || defined(WIN32) || defined(__APPLE__)
+#if defined(__sgi) || defined(__linux) || defined(_WIN32) || defined(__APPLE__)
-#ifdef WIN32
+#ifdef _WIN32
+ #ifdef _MSC_VER
#include "OSC-common.h"
+ #endif /* _MSC_VER */
#include <winsock2.h>
#include <string.h>
#include <stdlib.h>
@@ -122,7 +124,7 @@ The OSC webpage is http://cnmat.cnmat.berkeley.edu/OpenSoundControl
#include <sys/schedctl.h>
#include <sys/lock.h>
#endif
-#endif
+#endif /* _WIN32 */
char *htm_error_string;
@@ -329,7 +331,7 @@ static void dumpOSC_free(t_dumpOSC *x)
}
}
-#ifdef WIN32
+#ifdef _MSC_VER
OSC_API void dumpOSC_setup(void)
#else
void dumpOSC_setup(void)