This may sound like a very generic question but here it goes.
I have a requirement to create a configure script for my application, the result of this configure would be a generated makefile
(basic configure
, make
, make install
). My question is, where do I start in building this? Is there an example I can follow?
To produce a configure script for a software package, create a file called `configure.ac' that contains invocations of the Autoconf macros that test the system features your package needs or can use. Autoconf macros already exist to check for many features; see Existing Tests, for their descriptions.
The configure Bourne shell script is found at the top level of the VMD working directory. This script has three purposes: To adapt the Makefile to use the proper libraries and compiler options for the type of operating system being used.
A configure script is an executable script designed to aid in developing a program to be run on a wide number of different computers. It matches the libraries on the user's computer, with those required by the program before compiling it from its source code.
Creating a Makefile.in. To create all the Makefile.in s for a package, run the automake program in the top level directory, with no arguments. automake will automatically find each appropriate Makefile.am (by scanning configure.in ; see configure) and generate the corresponding Makefile.in .
To create the standard "configure" script you need GNU autoconf. You may need GNU automake and libtool too.
There are tons of documentation and howtos. Google for something like "autoconf automake howto". The good documentation is in the official manual pages:
Autoconf will create your configure script starting from the "configure.ac" file. The "Makefile.am" file will instruct automake on how to create your makefile by the configure string. Libtool is needed to simplify libraries handling around your code.
You can start creating a configure.ac file by hand or you may use the "autoscan" helper that may help you to create something semi-automatic for you.
Then, when you are ready, this one will do the magic:
autoreconf -i
there is build flow in linux and there is a very good tutorial
https://thoughtbot.com/blog/the-magic-behind-configure-make-make-install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With