MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Chris Trown Date:March 13 1999 1:39am
Subject:Small bug in config script
View as plain text  

     While running configure for the upteenth time, I notice that configure
had determined that the "+z" option to cc was'nt working.  It then turned off 
dynamic linking.  This is on an HPUX 10.20 box with the ANSI C compiler.

     I think to myself, "This is Wrong."  I know "+z" is right.

     On or about line 544, we see:

  $rm conftest*
  echo > conftest.c
  CFLAGS="$CFLAGS $pic_flag -DPIC"
  echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5
  if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>con
ftest.err; } && test -s conftest.o; then
    # Append any warnings to the config.log.
    cat conftest.err 1>&5

    # On HP-UX, both CC and GCC only warn that PIC is supported... then they
    # create non-PIC objects.  So, if there were any warnings, we assume that
    # PIC is not supported.

     The problem is that all the script is doing is creating an empty file.  cc
issues a warning because conftest.c is an empty file, not because "+z" doesn't
work.  Their assumption is incorrect.

     I replaced 

  echo > conftest.c

cat > conftest.c <<EOF
main(){char nm_test_var='a';return(0);}

     and it was happy.  Could probably be much simpler.  I just yanked it from
another part of the script.


What's the point?

An NT server can be run by an idiot, and usually is.
PGP fingerprint: 063FCE320681C336  78C164FC9B2F91EA
Small bug in config scriptChris Trown13 Mar