views:

61

answers:

3

I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon.

Even if I've never used it, I'm thinking about using autotools for it, to make the configuration and installation process easier (for the customer and for me, in the future).

Have you ever done (or thought) such a thing? Are there any drawbacks? Does it make a bit of sense?

+2  A: 

Autotools is used mostly when you are trying to compile your programs for multiple target platforms. This applies for C code in general and checks stuff like available libs, size of data types, libc functions etc. So unless your program is written in C and you have a need for supporting all kinds of Unix flavors, dont bother with autotools.

If you are trying to build some kind of installation program for Linux, I suggest you look into rpmbuild (for redhat distros). Rpmbuild is easy to use if all you are doing is packaging files for easier distribution. A good tutorial is available here. One great aspect of rpmbuild is that you can specify requirements on the target system, for example: apache, mysql and even specific php-modules that you need.

Martin Wickman
Yep, that's the alternative. I'm just trying to understand what is the best in my case, since I've no experience in either autotools or rpm/deb packaging. Many thanks for your answer.
Roberto Aloi
I've added some stuff above about this, but mainly dont use autotools unless you are compiling C apps for all kinds of Unix distros. In a personal note, I find autotools to be a complex mess which just makes it harder to compile stuff. I usually stick to plain old `make`.
Martin Wickman
A: 

simple idea

I may be stating obvious, but wouldn't it be easier for the sake of it, just to use

phpinfo();

?

From it you may mostly read everything - server version, PHP version, MySQL version and running PHP extension, compare it against what you need and advice to your client or their hoster that "I need this and that installed".

Adam Kiss
+1  A: 

For configuration and deployment, you can have a look at ant.

In my previous employment, we were using ant for deployment/configuration of a mix of perl, php, xml, xsl, unit test , Apache config ...

You have a build.properties file where you can put some default values and the customer will jsut have to create a local.properties where its values will overwrite the one from build.properties.

Also if you need to launch some scripts that are parts of the setup, you can also do that with ant.

ccheneson