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

20050110: problem building udunits on freebsd 4.7-RELEASE



Neil,

Well... you can do it that way, but it doesn't show what the problem is
or how to solve it.  And you'll have to revisit the same problem at the
next upgrade.

The apostrophes prevent variable expansion until the "eval" command is
executed (which is why the "eval" command is executed).  So the $doit
variable should, indeed, look like

    $CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} conftest.c ${LIBS-}

Regards,
Steve Emmerson

------- Original Message

Date:    Tue, 11 Jan 2005 15:57:43 -0600
From:    Neil Smith <address@hidden>To:      Steve Emmerson <steve@un
          idata.ucar.edu>
Subject: Re: 20050110: problem building udunits on freebsd 4.7-RELEASE 

Well, when I submitted
   doit='$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} conftest.c 
${LIBS-}'
I got error:
doit='$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} conftest.c 
${LIBS-}'
doit=$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} conftest.c 
${LIBS-}: Command not found.
Well, of course (Duh). Wrong syntax for csh. And configure is a /bin/sh 
script.
So:
 > sh
$ doit='$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} conftest.c 
${LIBS-}'
$ echo $doit
$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} conftest.c ${LIBS-}

What happened to variable replacement? So try:
$ doit="$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} conftest.c 
${LIBS-}"
$ echo $doit
/usr/bin/gcc -o conftest -O -Df2cFortran conftest.c

So I take original configure script and replace single quotes with 
double quotes for this
doit initialization line in this section of code, and WooHoo!
I get a completed configure with OK-looking log and a successfull 'make 
all'.
    (running ./configure in a freebsd csh shell)

Does this make sense? I'd have to dig out my bourne shell book to check 
syntax.

-Neil

Neil R. Smith                           address@hidden
Comp.Sys.Mngr.                  (979)845-6272
Dept. Atmospheric Sciences/Texas A&M University

------- End of Original Message