build nginx use autoconf

704 views Asked by At

recently I'm reading nginx source code, but I got confused how to build it's code by autoconf, I have try my best to write a Makefile.am, unfortunate, I'm failed to write a correct Makefile.am file, so I cann't get a configure file, does anybody know how to write a Makefile.am?

2

There are 2 answers

1
Mike Kinghan On

I know how to write a Makefile.am, but you have no need to.

As you know, the nginx source package is a GNU autotools package.

You don't do the autotooling. The people who write nginx do that. When you download the source package, the configure.ac, the Makefile.am(s) and other autotools files are already there along with all the source code.

To build the package, all you have to do is run the configure script to generate correct makefiles for your system, then run make. (This is why the build system is called autotools.)

Source packages are distributed from http://nginx.org/download/. Assuming you want nginx 1.10.2 (the stable release at this time), you simply do this in a suitable working directory:

$ wget http://nginx.org/download/nginx-1.10.2.tar.gz
$ tar zxf nginx-1.10.2.tar.gz
$ cd nginx-1.10.2
$ ./configure
$ make

Then it's built in ./nginx-1.10.2. If you then want to install nginx in your system, continue:

$ sudo make install

Building any autotooled source package is essential the same as this.

For full details and variations, do read NSTALLING NGINX OPEN SOURCE

0
AudioBubble On

I have write a email to nginx's author, he said configure file was written by hand