Re: OS/2 and configure

Hi, Anton!

Sorry for replying so late.

Hi, Pavel.  I played with 'configure' from the Dec 5, 2001 snapshot. 
Here's a few things I ran across.  The first two look like they would
also apply to other PC-type operating systems as well as OS/2:

line 16691:
    # Create a (secure) tmp directory for tmp files.
    : ${TMPDIR=/tmp}

My $TMP environment variable = N:\temp.  Configure seems to create some
temporary files in N:\temp and others in \tmp.  Havoc results.  I didn't
try to figure out where configure does what, but changing it to this
seems to fix the problem:

TMPDIR is a standard name on UNIX for the environment variable that points 
to the directory for temporary files.  TMP is used by some compilers on 
Windows and possibly OS/2.  I don't thing that configure creates anything 
in your N:\temp - maybe it's your compiler.

Just set TMPDIR to the same value as TMP.

My workaround was to change it to:
       case "$srcdir" in
           /*) ${as_ln_s}f  $srcdir/slang/slang-mc.h slang/slang.h;;
           *)  ${as_ln_s}f  ../$srcdir/slang/slang-mc.h slang/slang.h;;

Aesthetically inelegant, since it depends on the fact that 'ln' and 'cp'
both use a -f switch for the same purpose, but those are the only choices
configure offers anyway.

That's wrong.  You don't need -f since the link is removed immediately
before the "case" statement.  Also if you look in the documentation for a
recent Autoconf you will find that it recommends using LN_S variable and
describes what precautions should be taken so that "ln -s" and "cp" do
(almost) the same thing.

Actually, Franco Bez doing Win32 port also had this problem, and his 
solution was to use slang-mc.h directly on Win32.

I think the best solution would be to avoid making any symlinks and use
slang-mc.h directly when the already installed slang library in not used.
It's worth the trouble to look deeper into the problem instead of adding
another layer of hacks.

I'm applying the necessary changes now.  Please test the new snapshot at

Franco, if you are reading this, it should be useful for you too.  As you
can see, the problem with slang.h is not Win32-specific at all.

line 9845:
    WARNING: could not determine how to read list of mounted fs

Hm, that sounds serious.  Don't know what it means yet.  

It means that the info screen invoked by "Ctrl-x i" will lack some 
information.  If you have never seen the info screen you should not worry.

All that stuff also needs a serious overhaul.  I just touched the surface
when I was adding support for QNX Neutrino, but all that code should be
reorganized.  The biggest problem is that it contains specific code for
systems that a hard to find (e.g. Cray) to test the new code.

line 17362:
  for file in `sed -n -e '
    /^DEP_FILES = .*\\\\$/ {
      s/^DEP_FILES = //
        /\\\\$/ b loop
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do

For some reason, I sometimes get a tab character in $file.  As I said
earlier, the only language I know is DOS Basic, and that block of code
is a dark and sinister mystery to me.  I =think= this is probably
something broken in OS/2's 'sed', but I mention it because I am
frequently wrong.

It may be helpful for you to know that all that code is copied verbatim 
to config.status and is executed there.

The first sed finds and prints the lines beginning with "DEP_FILES = ".  
This beginning is removed.  If there is a backslash at the end of the 
line, sed reads and prints the next lines in the loop until it meets the 
line that doesn't end with backslash.

The second sed replaces $(DEPDIR) with $DEPDIR and $U with "$U".  Since 
the whole pipeline between backticks is not surrounded by quotes, it 
should be expanded and all tabs should be eliminated.

You could add redirections after each sed to see the intermediate results.  
My suspicion is a bug in your shell.  It may also be a bug in Automake, 
possibly related to DOS-style line endings.

Maybe "\\\\$" doesn't match backslash followed by DOS-style line end?  
Could you please run this test and make sure that both "test1" and "test2" 
are printed?  I'm assuming that the file "foo" will have a DOS style line 
ending.  Please create it in a native OS/2 editor if that's wrong.

echo '\' >foo
sed 's/\\$/test1/' foo
echo `sed 's/\\\\$/test2/' foo`

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]