This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Solution for: RE: ./configure in any package fails to create Makefile


The process is below, the solution is right here:

The problem is that config.status will use an environment variable to
choose which files to create instead of it's own list (if it exists).

The trouble was I had cleared this variable with:


but to the shell, an empty string is still an existing variable, so when
config.status sets the file list as:


it gets set to blank instead of "file

What I SHOULD have said before ./configure was:


which removes the variable from existence rather than setting it to blank.

Now ./configure creates the Makefiles which run successfully - Praise the
Good Lord!!

Now THAT was a hard lesson to learn...

autoconf really should include warnings when a 'feature' like this is
used -  it would probably be used intentionally less often than it
silently breaks your install.

For the curious, here are some of the steps I went through:

* unset a bunch of wierc environment variables set by some crazy windows
installer and/or sysadmin, including but not limited to:

LANG (which was enu)
CONFIG_FILES (for oracle.ini - not even installed)

* tar unzip the source tree
* in the main dir, run ./configure as normal
* ./configure creates and runs ./config.status, which creates the
required header files but not the Makefiles
* I can create the base Makefile with ./config.status --file=Makefile
* ergo, I can recursively make all the Makefiles:

for f in `find . -name`; do ./config.status --file=`dirname
$f`/Makefile; done

make then runs, but has linking errors - probably because the LIBDIR's
etc. set by ./configure are no longer in the environment.

so I tried the --recheck option to config.status which loads data from
the config.cache and (frustratingly despite the --no-recursion option)
re-runs ./configure multiple times - roughly e to the power of the
number of Makefiles (how many times do I have to tell you I'M NOT USING

But since it is ./configure that finally spawns ./config.status, my
command line options are ignored and the Makefiles are not created.

Next I hacked ./configure. Near the end, before the if block that
actually runs config.status (look for $SHELL $CONFIG_STATUS), I added:


for mfin in `find . -name`
  mf=`dirname $mfin`/Makefile
  ac_config_status_args="$ac_config_status_args --file=$mf"

and deleted the line that clears the args var inside the if block (look
for the line:


and delete it. I missed this the first time, and so my change had no

to manually tell the newly created config.status to make the Makefiles

Still - make wouldn't link.

This was for librep.

When I shifted my attention to imlib, it seemed to have a configure made
by an older version of  autoconf. It didn't allow the --file option.

Then I poked inside config.status, saw where it got it's file-list from,

"Mark Aufflick" <> wrote:
>./configure completes fine, but creates no Makefile. It creates all the
>header files (config.h etc.) though.
>This happens the same with or without cygwin patches applied to the
>In a fit of giving up I installed Window Maker - only to find i needeed
>to recompile libtiff with LZW.
>Interestingly, libtiff uses a non-standard configure, and this configures
>and makes fine.
>So it is purely a problem with GNU configure...

Mark Aufflick
 w: (business)
 w: (personal)
 p: +61 438 700 647
 f: +61 2 9436 4737

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]