Journal Dave2 Wickham's Journal: Do YOU know autoconf? 5
Well, do you know autoconf? I sure as hell don't, but my hacked together configure scripts for bloat (CVS )...well...suck
Well, do you know autoconf? I sure as hell don't, but my hacked together configure scripts for bloat (CVS )...well...suck
1 Mole = 25 Cagey Bees
Autoconf is for C...for the most part (Score:1)
I noticed that bloat claims to be a perl script. I've only ever seen autoconf used for Compiled programs (C/C++) and was wondering what you would use it for in Perl.
Also, I think CPAN has a comparable configuration process to autoconf that may be a little more PERL friendly.
Re:Autoconf is for C...for the most part (Score:2)
I don't think you want autoconf (Score:2)
From the Autoconf info page:
Autoconf's output is the "configure" script which then creates the given files. Most of the configuration steps in an autoconf file involve locating libraries and determining if a given header file contains a given symbol (usually be running the compiler).What you're doing is trying to find the location of the various decompression utilities (as well as cat and sed, used to insert the utilities into the bloat script).
I personally would not try and pre-detect the scripts and wait until bloat is run to locate only the needed decompression script and then complain to the user that the required decompression software is not available. I'd also consider looking into using the file command to determine the compression type. Usually, a simple:
if (system "gunzip --version") {
# gunzip is present
} else {
# gunzip is missing
}
allows you to determine if the command is available. I'd suggest this way for two reasons: one, it removes the need for a configure step, and two, it prevents the user from getting scared when they find that they're missing uncompress and ar. It would allow a user to incrementally install decompression software as they discover a file using a compression technique that heretofore was unknown to them. (Mmm - stupid political-correctness shoehorned onto English - I loves me plural disagreements just to avoid assigning a gender to the user. Moving along...)
Anyway, I don't think autoconf is useful for what you want to do - it's designed around C/C++ projects. You might be able to shoehorn it into another compiled language, but since its major output is config.h and a set of Makefiles, I'd suggest that it isn't what you want.
(That and Autoconf is truly a pain to use. Just wait until you throw Automake into the process and you can get headaches for weeks! Plus, if you ever are in a really masochistic mood, you can look at the code they output.)
Re:I don't think you want autoconf (Score:2)
I think I will assume that the PATH variable is correctly set (as you suggested), and if it isn't, well I may try one of the "standard" locations, and if it isn't there, give the user info on where to get the util.
I did - I've been mentally scarred for life
Anyway, I think I'll finish my coursework before I do any more work on bloat... I'm really lagging behind, I hate coursework