From a9bbb24b849411a117ef4877d4a794985dad99df Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 20 Apr 2007 05:52:10 +0000 Subject: ported autoconf system to work for Mac OS X also svn path=/trunk/externals/gem2pdp/; revision=7590 --- configure.ac | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1a09c84..42f021a 100644 --- a/configure.ac +++ b/configure.ac @@ -90,8 +90,42 @@ else exit -1 fi + +AC_CANONICAL_HOST +case "$host" in + *-linux*) + EXTENSION=pd_linux + LDFLAGS="$LDFLAGS -export_dynamic -shared" + ;; + *-mingw*) + CFLAGS="$CFLAGS -mms-bitfields" + EXTENSION=dll + LDFLAGS="$LDFLAGS -shared" + ;; + *-darwin* | *-macos10*) + EXTENSION=pd_darwin + LDFLAGS="$LDFLAGS -bundle -undefined dynamic_lookup" + # Check for DarwinPorts and/or Fink on Mac OS X/Darwin + if test -d /sw ; then + # Fink + PATH="/sw/bin:/sw/sbin:$PATH" + INCLUDES="$INCLUDES -I/sw/include" + LIBS="$LIBS -L/sw/lib" + elif test -d /opt/local ; then + # DarwinPorts + PATH="/opt/local/bin:/opt/local/sbin:$PATH" + INCLUDES="$INCLUDES -I/opt/local/include" + LIBS="$LIBS -L/opt/local/lib" + fi + ;; +esac + +AC_SUBST(CFLAGS) +AC_SUBST(EXTENSION) +AC_SUBST(INCLUDES) +AC_SUBST(LDFLAGS) + LIBS="$LIBS -lm" -CFLAGS="$CFLAGS -Wall" AC_CONFIG_FILES([ Makefile -- cgit v1.2.1