-1

I am using the ./configure command to install FFTW.

The ./configure --help gives a list of options. How do I decide what options to use after ./configure?

I know the explanation for each is given in ./configure --help but is there any easy explanation for all options and when to use them?

Zanna
  • 70,465
  • @guiverc They mean the ./configure file inside the tarball, which is a precursor step to running make and sudo checkinstall – Thomas Ward May 17 '18 at 16:52

1 Answers1

4

In the case of FFTW, the directory in the tar.gz file holds a file “INSTALL” which contains installation information, including options:

You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example:

 ./configure CC=c99 CFLAGS=-g LIBS=-lposix

The document goes on and on about options and environment variables relevant for the configure script. If you need it, read the whole thing and you’ll be in the know. Note that configure is not a command, but rather a script which prepares the compiling. Because of that, every package usually has its own configure script that comes with it. As the examples in the “INSTALL” file of this specific package show, this configure script can take e.g. gcc and g++ options. Read their help files to learn about them.

However, if you just want to install the package and don’t know of options like that, the easiest way to do that is (requiring auto-apt and checkinstall1):

  1. cd into the extracted directory named e.g. “fftw-3.3.7”
  2. Run the package’s configure script and automatically install missing dependencies:

    auto-apt run ./configure
    

    The script reads environment variables to learn about the system it’s started on and automatically configures the makefile accordingly, it’ll suit your system without you specifying any options.

  3. Run the make command to compile the source:

    make
    
  4. Run checkinstall with root permissions to install the package:

    sudo checkinstall
    

1: sudo apt install auto-apt checkinstall to install both of them. auto-apt takes care of missing dependencies the package’s configure script reports, checkinstall creates a .deb package and installs it via the package manager so that you can easily remove the package later.

dessert
  • 39,982