From: Rafael L. <lab...@ps...> - 2003-03-15 00:28:54
|
* Rafael Laboissiere <lab...@ps...> [2003-03-14 22:48]: > * Joao Cardoso <jc...@fe...> [2003-03-14 19:58]: > > > Please check in sysloc.in for mieee-fp and correct it so it becomes "The > > Right Way To Do It" (TM - Rafael :) > > I am sorry, but in this case I do not now the Right Way (TM). Even in the > GNU Autoconf Macro Archive (http://www.gnu.org/software/ac-archive/) there > seems to be nothing regarding the cross-platform setting of the ieee > compilation flag. I searched a little bit further and found the excerpt below in the configure.in file of the GSL project (http://www.gnu.org/software/gsl/). This autoconf code is doing pretty much the same thing as your code in sysloc.in, besides an compilation exercise to check if the flags are really accepted in the alpha architecture. The fact that the code below only acts on CFLAGS for the alpha architecture is a good indication that your code in sysloc.in should work for all the other architectures, since they do not seem to need special treatment regarding the ieee flag. -- Rafael AC_MSG_CHECKING([for IEEE-conformance compiler flags]) save_cflags="$CFLAGS" case "$host" in alpha*-*-*) if test X"$GCC"= Xyes ; then ieee_alpha_options='-mieee' CFLAGS="$ieee_alpha_options $CFLAGS" else # This assumes Compaq's C compiler, which is probably # a pretty bad assumption. Improvements welcome. ieee_alpha_options='-ieee' CFLAGS="$ieee_alpha_options $CFLAGS" fi # # now see if the option we think should be accepted actually is # AC_TRY_COMPILE( ,[ int foo; ],[ AC_MSG_RESULT([$ieee_alpha_options]) dnl dnl after the check is over, CFLAGS will become save_cflags, dnl which has just acquired the additional flag. dnl save_cflags="$CFLAGS" ],[ AC_MSG_RESULT([unknown!]) AC_MSG_WARN( [I don't know how to enable full IEEE mode with your compiler] ) ] ) dnl here ends our AC_TRY_COMPILE ;; *) AC_MSG_RESULT([none]) ;; esac # Now restore our (possibly augmented) CFLAGS. CFLAGS="$save_cflags" |