comparison configure.in @ 3107:a8dcfbf87ea3

[project @ 1997-11-19 22:34:59 by jwe]
author jwe
date Wed, 19 Nov 1997 22:35:03 +0000
parents f936c7f5074f
children bb7ffd516332
comparison
equal deleted inserted replaced
3106:21208b797332 3107:a8dcfbf87ea3
19 ### You should have received a copy of the GNU General Public License 19 ### You should have received a copy of the GNU General Public License
20 ### along with Octave; see the file COPYING. If not, write to the Free 20 ### along with Octave; see the file COPYING. If not, write to the Free
21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 ### 02111-1307, USA. 22 ### 02111-1307, USA.
23 23
24 AC_REVISION($Revision: 1.286 $) 24 AC_REVISION($Revision: 1.287 $)
25 AC_PREREQ(2.9) 25 AC_PREREQ(2.9)
26 AC_INIT(src/octave.cc) 26 AC_INIT(src/octave.cc)
27 AC_CONFIG_HEADER(config.h) 27 AC_CONFIG_HEADER(config.h)
28 28
29 AC_DEFINE(OCTAVE_SOURCE, 1) 29 AC_DEFINE(OCTAVE_SOURCE, 1)
181 181
182 ### Do special things for g++. 182 ### Do special things for g++.
183 183
184 ADD_CXX_WALL=false 184 ADD_CXX_WALL=false
185 NO_IMPLICIT_TEMPLATES= 185 NO_IMPLICIT_TEMPLATES=
186
186 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ 187 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \
187 sed -e 's/^.*g.. version *//' -e 's/cygnus-//'` 188 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'`
189
188 case "$gxx_version" in 190 case "$gxx_version" in
189 changequote(,)dnl 191 changequote(,)dnl
190 2.[6789].* | 2.[123456789][0123456789].*) 192 1.* | 2.[0123456].* | 2.7.[01]*)
193 changequote([,])dnl
194 AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave])
195 ;;
196 2.7.[23456789]* | 2.7.[123456789][0123456789]*)
197 if test -z "$EXTERN_CXXFLAGS"; then
198 ADD_CXX_WALL=true
199 fi
200 NO_IMPLICIT_TEMPLATES="-fno-implicit-templates"
201 AC_MSG_RESULT([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES])
202 ;;
203 changequote(,)dnl
204 2.[89].* | 2.[123456789][0123456789].*)
191 changequote([,])dnl 205 changequote([,])dnl
192 if test -z "$EXTERN_CXXFLAGS"; then 206 if test -z "$EXTERN_CXXFLAGS"; then
193 ADD_CXX_WALL=true 207 ADD_CXX_WALL=true
194 fi 208 fi
195 NO_IMPLICIT_TEMPLATES="-fno-implicit-templates" 209 NO_IMPLICIT_TEMPLATES="-fno-implicit-templates"
196 AC_MSG_RESULT([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES]) 210 AC_MSG_RESULT([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES])
197 ;; 211 ;;
198 changequote(,)dnl
199 1.* | 2.[012345].*)
200 changequote([,])dnl
201 AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave])
202 ;;
203 *) 212 *)
204 warn_gxx_only="Octave has only been tested with g++, and I can't find it" 213 warn_gxx_only="Octave has only been tested with g++, and I can't find it"
205 AC_MSG_WARN($warn_gxx_only) 214 AC_MSG_WARN($warn_gxx_only)
206 ;; 215 ;;
207 esac 216 esac
208 217
209 HOST_CXXFLAGS=
210 case "$gxx_version" in
211 2.6.*)
212 case "$canonical_host_type" in
213 rs6000-ibm-aix* | powerpc-ibm-aix*)
214 HOST_CXXFLAGS="-Wa,-u"
215 AC_MSG_RESULT([defining HOST_CXXFLAGS to be $HOST_CXXFLAGS])
216 ;;
217 esac
218 ;;
219 esac
220
221 CXX_VERSION= 218 CXX_VERSION=
222 if test -n "$gxx_version"; then 219 if test -n "$gxx_version"; then
223 CXX_VERSION="$gxx_version" 220 CXX_VERSION="$gxx_version"
224 fi 221 fi
225 AC_SUBST(CXX_VERSION) 222 AC_SUBST(CXX_VERSION)
226 223
227 AC_SUBST(HOST_CXXFLAGS) 224 AC_SUBST(HOST_CXXFLAGS)
228 AC_SUBST(NO_IMPLICIT_TEMPLATES) 225 AC_SUBST(NO_IMPLICIT_TEMPLATES)
229 226
227 OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL
228
230 ### See which C compiler to use (we expect to find gcc). 229 ### See which C compiler to use (we expect to find gcc).
231 230
232 EXTERN_CFLAGS="$CFLAGS" 231 EXTERN_CFLAGS="$CFLAGS"
233 232
234 AC_PROG_CC 233 AC_PROG_CC
237 236
238 ### Do special things for gcc. 237 ### Do special things for gcc.
239 238
240 ADD_CC_WALL=false 239 ADD_CC_WALL=false
241 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ 240 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \
242 sed -e 's/^.*g.. version *//' -e 's/cygnus-//'` 241 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'`
243 case "$gcc_version" in 242 case "$gcc_version" in
244 2.*) 243 2.*)
245 if test -z "$EXTERN_CFLAGS"; then 244 if test -z "$EXTERN_CFLAGS"; then
246 ADD_CC_WALL=true 245 ADD_CC_WALL=true
247 fi 246 fi