[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Autoconf's main purpose is config.h generation that *just* has
From: |
cs |
Subject: |
Re: Autoconf's main purpose is config.h generation that *just* has |
Date: |
Thu, 17 Apr 2003 11:36:01 -0700 (MST) |
Thanks. It really helped.
CS
_______________________________________
Dr. Christian Seberino
Gnumatica Scientific Software
8665 Lake Murray Blvd. #3
San Diego, CA 92119-2843
U.S.A.
Phone: (619) 393-9047
Email: address@hidden
WWW : www.gnumatica.com
_______________________________________
-------- Original Message --------
Subject: Re: Autoconf's main purpose is config.h generation that *just*
has From: Ronald Landheer-Cieslak <address@hidden>
Date: Thu, April 17, 2003 12:59 am
To: address@hidden
The *result* of the autoconf-generated configure script is "just a
bunch of defines".
The configure.{ac|in} file is used to generate a shell-script that
will be used to scan the system for its abilities - at least, the
ones you ask to have checked. (That's where the "arbitrary shell
code" is run). You could effectively put shell code in the
configure.{ac|in} file and thus have it run at configure time.
Anyways, the configure script uses a Makefile.in file (which might
also contain shell code to be run at compile-time) to generate a
Makefile, and may generate a config.h file if you ask it to do so. It
will also make sure that the results of what it found are available
in the form of defines at compile-time, so you can do the
#if HAVE_PRINTF
printf("Hello, world!\n");
#endif
thing.
HTH
rlc
On Wed, 16 Apr 2003 address@hidden wrote:
> I've spent a lot of time reading Autotools docs
> and just wanted to verify something before I get
> lost in the info overload.....
>
> In general,
> the way to write portable and _flexible_ C code is to have
> preprocessor directives like:
>
> #ifdef STDIO_H_IS_AVAILABLE
> printf("Hello world.n");
> #endif
>
> .... and the way those variables
> get defined is to include config.h which is built by configure
> script which is built by Autoconf right?
>
> In a nutshell, one should not be intimidated by Autoconf
> because it does not do anything more profound or deep
> than just make a bunch of #define's right???
>
> ...
>
> (The reason this was not obvious is because I read that
> one can run arbitrary shell code with Autoconf/configure
> system. This implies Autoconf can do more than I thought
> and so I got confused.)
>
> **What else would you use
> Autoconf for other than making a list of #defines*?
>
> Thanks,
>
> Chris
>
>
>
>