Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-25-2008, 10:21 PM
|
#1
|
Member
Registered: Mar 2007
Distribution: Fedora
Posts: 264
Rep:
|
autoconf
hello friends,
i am trying my hands on "autoconf" and i am facing a problem. autoconf is creating the configure file and configure is also working.
But i have several fortran compiler like gfortran;g95 and ifort. it is taking gfortran as fortran compiler.
i tried putting ifort before gfortran to see if that helps(idiotic move i guess) but no change in result.
this is the part of configure file:
#echo " Testing for a FORTRAN compiler"
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
for ac_prog in ifort g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifc efc pgf95 lf95 ftn
can any1 tell me how i override gfortran by ifort?
|
|
|
03-26-2008, 11:32 AM
|
#2
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Why not:
Code:
F77="ifort" ./configure
|
|
|
03-26-2008, 11:53 PM
|
#3
|
Member
Registered: Mar 2007
Distribution: Fedora
Posts: 264
Original Poster
Rep:
|
thats fine but what i am looking for is to pass ifort as f90 compiler as default
|
|
|
03-27-2008, 12:53 PM
|
#4
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Two things: - You want an f90 compiler, but have your configure tests for an f77 compiler. Change your macro from AC_PROG_F77 to AC_PROG_FC.
- You can specify the order in which compilers are checked in the macro itself. Of course the whole point of using autoconf is not to mandate what compiler to use, but you can also reduce the list if you chose. For example, you might have:
Code:
AC_PROG_FC([ifort gfortran g95 xlf95 f95 fort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90])
This gives ifort the first priority, followed by gfortran, etc.
|
|
|
All times are GMT -5. The time now is 12:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|