In CLion, you can work with projects that require preconfiguration steps to prepare the actual Makefile. The scripts of GNU Autotools, Kbuild, and PERL MakeMaker are detected automatically and executed to get the Makefile and load the project.
Instructions below cover the case of GNU Autotools.
When you open a project folder, CLion recognizes it as an Autotools project in the following cases:
There is a configure.ac or configure.in file (but not both at the same time) under the project root.
There is a Makefile.in and/or Makefile.am.
The presence of an already generated Makefile or a configure script does not affect this.
Pre-configuration (GNU Autoconf)
If GNU Autoconf is installed on your system (autoreconf should be in the system
PATH), CLion will call it first.
By default, CLion uses the following commands to configure an Autotools project:
You can change this set of commands as needed (see below).
Control preconfigure parameters
If required, you can adjust the pre-configuration commands.
Make necessary changes in the Commands field:
For example, to run an additional pre-configuration script like
bootstrap, add the following command:./bootstrap <args>
Also notice the very first line in the default set of commands,
#!/bin/sh. It explicitly specifies the POSIX default interpreter /bin/sh. You can leave this command as is or change it to use another interpreter, for example
Change the toolchain
When executing Autotools scripts, CLion fetches the compilers from the toolchain specified in.
If you open the project for the first time, CLion will use the default toolchain.
Note that you can specify a remote toolchain here as well.