LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Reply
  Search this Thread
Old 03-25-2008, 10:21 PM   #1
RudraB
Member
 
Registered: Mar 2007
Distribution: Fedora
Posts: 264

Rep: Reputation: 23
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?
 
Old 03-26-2008, 11:32 AM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Why not:
Code:
F77="ifort" ./configure
 
Old 03-26-2008, 11:53 PM   #3
RudraB
Member
 
Registered: Mar 2007
Distribution: Fedora
Posts: 264

Original Poster
Rep: Reputation: 23
thats fine but what i am looking for is to pass ifort as f90 compiler as default
 
Old 03-27-2008, 12:53 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Two things:
  1. 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.
  2. 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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
*** YOU'RE USING autoconf (GNU Autoconf) 2.60. KDE requires autoconf 2.52, 2.53 or 2. arubin Slackware 6 09-24-2008 03:31 AM
No autoconf? lectraplayer SUSE / openSUSE 9 01-24-2005 09:23 PM
autoconf 2.54 need HELP !! Baldrick65 Linux - Software 1 08-21-2003 07:56 AM
autoconf 2.52 or 2.53 caleb Conectiva 14 10-08-2002 03:53 PM
Autoconf jISV Linux - Software 2 05-30-2002 01:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration