changeset 7:0a461b85bbb9

Fixed automake variable substitution issues
author Jamie Bullock <jamie@postlude.co.uk>
date Fri, 06 Oct 2006 07:57:56 +0000
parents 3977eb18153b
children 34c52ec0e66c
files Makefile.am configure.in examples/puredata/Makefile.am
diffstat 3 files changed, 23 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Thu Oct 05 17:02:33 2006 +0000
+++ b/Makefile.am	Fri Oct 06 07:57:56 2006 +0000
@@ -1,2 +1,2 @@
-SUBDIRS = src xtract examples/puredata @DOXYGEN@
+SUBDIRS = src xtract examples @DOXYGEN@
 
--- a/configure.in	Thu Oct 05 17:02:33 2006 +0000
+++ b/configure.in	Fri Oct 06 07:57:56 2006 +0000
@@ -74,7 +74,7 @@
 AC_ARG_WITH(pd_dir,
     [  --with-pd-dir=path   pd header path (default=/usr/local/include) ],
     [
-    CPPFLAGS="$CPPFLAGS -I$withval"
+    CFLAGS="$CFLAGS -I$withval"
     echo
     echo "pd dir is $withval"
     echo
@@ -97,9 +97,11 @@
 dnl ----  do some magic to gues the host opsys
 dnl ----  taken from libvorbis configure.in
 dnl ------------------------------------------
-AC_CANONICAL_HOST
+dnl AC_CANONICAL_HOST
 
-PD_LDFLAGS="$PD_LDFLAGS -L/usr/local/lib -ldl"
+dnl AC_SUBST(PD_CFLAGS,"$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1")
+dnl AC_SUBST(PD_LDFLAGS,"$PD_LDFLAGS -shared")
+dnl pd_ldflags="$PD_LDFLAGS -L/usr/local/lib -ldl"
 if test -z "$GCC"; then
         case $host in
         *-*-irix*)
@@ -120,38 +122,42 @@
 
         case $host in
         *86-*-linux*)
-                PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
+                PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
         PD_LDFLAGS="$PD_LDFLAGS -shared"
         dnl we could test for bad glibc here, but don't
-        pd_suffix=pd_linux
+        PD_SUFFIX=pd_linux
         ;;
         powerpc-*-linux*)
-                PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 "
+                PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 "
         PD_LDFLAGS="$PD_LDFLAGS -shared"
-        pd_suffix=pd_linux
+        PD_SUFFIX=pd_linux
         ;;
         *-*-linux*)
-                PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC"
+                PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC"
         PD_LDFLAGS="$PD_LDFLAGS -shared"
-        pd_suffix=pd_linux
+        PD_SUFFIX=pd_linux
         ;;
         sparc-sun-*)
         echo "YOU HAVE A SPARC STATION, not setting any flags, not supported yet"
         ;;
         *-*-darwin*)
-                PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
+                PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
         PD_LDFLAGS="$PD_LDFLAGS -bundle -undefined suppress -flat_namespace"
-        pd_suffix=pd_darwin
+        PD_SUFFIX=pd_darwin
 ;;
         *)
         dnl assume unix
-                PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
+                PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
         PD_LDFLAGS="$PD_LDFLAGS -shared"
-        pd_suffix=pd_linux
+        PD_SUFFIX=pd_linux
         ;;
         esac
 fi
 
+AC_SUBST(PD_CFLAGS)
+AC_SUBST(PD_LDFLAGS)
+AC_SUBST(PD_SUFFIX)
+		
 AC_CONFIG_FILES([doc/documentation.doxygen])
 
-AC_OUTPUT(Makefile src/Makefile xtract/Makefile doc/Makefile examples/puredata/Makefile)
+AC_OUTPUT(Makefile src/Makefile xtract/Makefile doc/Makefile examples/Makefile examples/puredata/Makefile)
--- a/examples/puredata/Makefile.am	Thu Oct 05 17:02:33 2006 +0000
+++ b/examples/puredata/Makefile.am	Fri Oct 06 07:57:56 2006 +0000
@@ -1,5 +1,5 @@
 
-SUFFIXES = .pd_linux
+SUFFIXES = .@PD_SUFFIX@
 PDDIR = $(prefix)/lib/pd
 pddir = $(PDDIR)
 
@@ -9,7 +9,7 @@
 pdinstallexpdir = $(pddir)/doc/xtract
 
 # Automake won't accept something ending in ".pd_linux" as a library
-pdinstall_PROGRAMS = xtract~.pd_linux
+pdinstall_PROGRAMS = xtract~.@PD_SUFFIX@
 
 if BUILD_PD_EXAMPLE
 xtract_pd_linux_SOURCES = xtract~.c