comparison configure.in @ 7:0a461b85bbb9

Fixed automake variable substitution issues
author Jamie Bullock <jamie@postlude.co.uk>
date Fri, 06 Oct 2006 07:57:56 +0000
parents 46efa5536d04
children 90b3a3a25d99
comparison
equal deleted inserted replaced
6:3977eb18153b 7:0a461b85bbb9
72 dnl ---- usually /usr/local/include 72 dnl ---- usually /usr/local/include
73 dnl ------------------------------------------ 73 dnl ------------------------------------------
74 AC_ARG_WITH(pd_dir, 74 AC_ARG_WITH(pd_dir,
75 [ --with-pd-dir=path pd header path (default=/usr/local/include) ], 75 [ --with-pd-dir=path pd header path (default=/usr/local/include) ],
76 [ 76 [
77 CPPFLAGS="$CPPFLAGS -I$withval" 77 CFLAGS="$CFLAGS -I$withval"
78 echo 78 echo
79 echo "pd dir is $withval" 79 echo "pd dir is $withval"
80 echo 80 echo
81 ]) 81 ])
82 82
95 95
96 dnl ------------------------------------------ 96 dnl ------------------------------------------
97 dnl ---- do some magic to gues the host opsys 97 dnl ---- do some magic to gues the host opsys
98 dnl ---- taken from libvorbis configure.in 98 dnl ---- taken from libvorbis configure.in
99 dnl ------------------------------------------ 99 dnl ------------------------------------------
100 AC_CANONICAL_HOST 100 dnl AC_CANONICAL_HOST
101 101
102 PD_LDFLAGS="$PD_LDFLAGS -L/usr/local/lib -ldl" 102 dnl AC_SUBST(PD_CFLAGS,"$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1")
103 dnl AC_SUBST(PD_LDFLAGS,"$PD_LDFLAGS -shared")
104 dnl pd_ldflags="$PD_LDFLAGS -L/usr/local/lib -ldl"
103 if test -z "$GCC"; then 105 if test -z "$GCC"; then
104 case $host in 106 case $host in
105 *-*-irix*) 107 *-*-irix*)
106 dnl If we're on IRIX, we wanna use cc even if gcc 108 dnl If we're on IRIX, we wanna use cc even if gcc
107 dnl is there (unless the user has overriden us)... 109 dnl is there (unless the user has overriden us)...
118 esac 120 esac
119 else 121 else
120 122
121 case $host in 123 case $host in
122 *86-*-linux*) 124 *86-*-linux*)
123 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1" 125 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
124 PD_LDFLAGS="$PD_LDFLAGS -shared" 126 PD_LDFLAGS="$PD_LDFLAGS -shared"
125 dnl we could test for bad glibc here, but don't 127 dnl we could test for bad glibc here, but don't
126 pd_suffix=pd_linux 128 PD_SUFFIX=pd_linux
127 ;; 129 ;;
128 powerpc-*-linux*) 130 powerpc-*-linux*)
129 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 " 131 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 "
130 PD_LDFLAGS="$PD_LDFLAGS -shared" 132 PD_LDFLAGS="$PD_LDFLAGS -shared"
131 pd_suffix=pd_linux 133 PD_SUFFIX=pd_linux
132 ;; 134 ;;
133 *-*-linux*) 135 *-*-linux*)
134 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC" 136 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC"
135 PD_LDFLAGS="$PD_LDFLAGS -shared" 137 PD_LDFLAGS="$PD_LDFLAGS -shared"
136 pd_suffix=pd_linux 138 PD_SUFFIX=pd_linux
137 ;; 139 ;;
138 sparc-sun-*) 140 sparc-sun-*)
139 echo "YOU HAVE A SPARC STATION, not setting any flags, not supported yet" 141 echo "YOU HAVE A SPARC STATION, not setting any flags, not supported yet"
140 ;; 142 ;;
141 *-*-darwin*) 143 *-*-darwin*)
142 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 " 144 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
143 PD_LDFLAGS="$PD_LDFLAGS -bundle -undefined suppress -flat_namespace" 145 PD_LDFLAGS="$PD_LDFLAGS -bundle -undefined suppress -flat_namespace"
144 pd_suffix=pd_darwin 146 PD_SUFFIX=pd_darwin
145 ;; 147 ;;
146 *) 148 *)
147 dnl assume unix 149 dnl assume unix
148 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1" 150 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
149 PD_LDFLAGS="$PD_LDFLAGS -shared" 151 PD_LDFLAGS="$PD_LDFLAGS -shared"
150 pd_suffix=pd_linux 152 PD_SUFFIX=pd_linux
151 ;; 153 ;;
152 esac 154 esac
153 fi 155 fi
154 156
157 AC_SUBST(PD_CFLAGS)
158 AC_SUBST(PD_LDFLAGS)
159 AC_SUBST(PD_SUFFIX)
160
155 AC_CONFIG_FILES([doc/documentation.doxygen]) 161 AC_CONFIG_FILES([doc/documentation.doxygen])
156 162
157 AC_OUTPUT(Makefile src/Makefile xtract/Makefile doc/Makefile examples/puredata/Makefile) 163 AC_OUTPUT(Makefile src/Makefile xtract/Makefile doc/Makefile examples/Makefile examples/puredata/Makefile)