diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.in | 34 | ||||
-rw-r--r-- | examples/puredata/Makefile.am | 4 |
3 files changed, 23 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am index 8fe1752..efd2dfb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = src xtract examples/puredata @DOXYGEN@ +SUBDIRS = src xtract examples @DOXYGEN@ diff --git a/configure.in b/configure.in index 6735098..a9990dd 100644 --- a/configure.in +++ b/configure.in @@ -74,7 +74,7 @@ dnl ------------------------------------------ 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 ------------------------------------------ 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 @@ else 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) diff --git a/examples/puredata/Makefile.am b/examples/puredata/Makefile.am index 3666682..f3eb08e 100644 --- a/examples/puredata/Makefile.am +++ b/examples/puredata/Makefile.am @@ -1,5 +1,5 @@ -SUFFIXES = .pd_linux +SUFFIXES = .@PD_SUFFIX@ PDDIR = $(prefix)/lib/pd pddir = $(PDDIR) @@ -9,7 +9,7 @@ pdinstallrefdir = $(pddir)/doc/5.reference 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 |