./configure

b1hgaa88

Registered
I downloaded and installed the latest Apple developer tools and fink and tried to compile a couple of packages not given in the fink list. However, whenever I try the command ./configure I get a "command not found", as in:

[Julian-Woodss-Computer:~/dvi2tty] jfwoods% ./configure
./configure: Command not found.

Am I doing something wrong here? Or should I be setting some PATH variable or something? I thought that this command was a standard one that came with the developer tools etc. (I do have 'make").
 
I presume you've downloaded the source code of some piece of software, decompressed and untaredit, and have cd'd into the source directory. If you have not done that yet, start there.
That aside, "./configure" does not refer to a command, meaning an executable program installed on your system by the dev tools mpkg or fink, it refers to a perl or shell script called "configure" that many software packages (particularly GNU software) use to ease the compilation process. The "./" lets you know that "configure" is in the current directory (or at least that's where the shell is going to look, whether or not it's there) It is a UNIX convention that every directory contains an entry "." which refers to itself. Hence: "./foo" means "the item 'foo' in the current directory."

All that being said, not all software distributions use "configure." Some use similar scripts with names like "Configure" or "Setup." Others rely on make-rules (so you type something like "make ppc-darwin"). The lesson here is to read the install documentation that came with the software, this usually lives either in the untared source directory or in a nested "DOCS" folder with a name like "README" or "INSTALL." You should look for this documentation and proceed from there.

Hope this helps...
-alex.
 
Thanks Alexrd. I tried the various alternatives you suggest but in each case I get "Command not found" or, e.g.

[Julian-Woodss-Computer:~/dvi2tty] jfwoods% make ppc-darwin
make: *** Warning: File `Makefile' has modification time in the future (2003-01-26 17:51:35 > 2003-01-02 11:38:37)
make: *** No rule to make target `ppc-darwin'. Stop.
[Julian-Woodss-Computer:~/dvi2tty] jfwoods%

The decompressed source files are as follows:

00Description
dvi2tty.1
dvi2tty-latin1.patch
README.ORG
README
a.out
DVI.format
dvi2tty.c
dvi2tty.h
dvi2tty.patch
dvi2tty
disdvi.c
dvi2tty.o
MANIFEST
Makefile
dvistuff.c
commands.h
dvistuff.o
dvi2tty-german_umlauts.patch

The README file reads:

COMPILING THE PROGRAMS

Disdvi is rather simple and does not need any modifications.
To compile under VMS, you might need to define an extra macro:
Add a -DVMS on the command line, or add a line
#define VMS
in the dvi2tty.h file.
For dvi2tty you may find the following problems:

function strchr() can not be found:
Your are probably a BSD UNIX or alike.
Solution: #define strchr index
'/usr/bin/pg' program not found.
Solution: change the DEFPAGER macro in dvi2tty.c
To compile under VMS, you might need to define an extra macro:
Add a -DVMS on the command line, or add a line
#define VMS

And the Makefile reads:

# Makefile for dvi2tty and disdvi 23/01/89 M.J.E. Mol
#
# For BSD Unix use the following CFLAGS definition
# CFLAGS = -Dstrchr=index
#
# This Makefile does not work for MSDOS. Make your
# own one, or compile by hand.
#
CFLAGS = -Dstrchr=index

all: dvi2tty disdvi

dvi2tty:dvi2tty.o dvistuff.o
cc -o dvi2tty dvi2tty.o dvistuff.o

disdvi:disdvi.c commands.h
cc -o disdvi disdvi.o

dvi2tty.o: dvi2tty.c dvi2tty.h

dvistuff.o: dvistuff.c dvi2tty.h commands.h

However, I understood that the ,/configure command did something to this Makefile but, as I said, it is not available to me.

What can I do next?
 
Just enter:

make

This should compile and link the two executables dvi2tty and disdvi.
 
No go! This is what happened, in spite of the fact that I was in the dvi2tty directory with all the right stuff:

[Julian-Woodss-Computer:~/dvi2tty] jfwoods% make
make: *** Warning: File `Makefile' has modification time in the future (2003-01-26 17:51:35 > 2003-01-02 14:24:05)
cc -o disdvi disdvi.o
cc: disdvi.o: No such file or directory
cc: no input files
make: *** [disdvi] Error 1
[Julian-Woodss-Computer:~/dvi2tty] jfwoods%
 
Sorry! This should be it:

[Julian-Woodss-Computer:~/dvi2tty] jfwoods% make
cc -o disdvi disdvi.o
cc: disdvi.o: No such file or directory
cc: no input files
make: *** [disdvi] Error 1
[Julian-Woodss-Computer:~/dvi2tty] jfwoods%
 
This is what I get:

[Julian-Woodss-Computer:~/dvi2tty] jfwoods% make disdvi
cc -o disdvi disdvi.o
cc: disdvi.o: No such file or directory
cc: no input files
make: *** [disdvi] Error 1
[Julian-Woodss-Computer:~/dvi2tty] jfwoods% make all
cc -o disdvi disdvi.o
cc: disdvi.o: No such file or directory
cc: no input files
make: *** [disdvi] Error 1
[Julian-Woodss-Computer:~/dvi2tty] jfwoods%

Same thing!!
 
Well, one thing's for sure, either the make process for this app is broken, or your download is faulty. Try getting the source again and doing a make all, if that doesn't work, it would seem the developer has shipped an incomplete distribution. There is no file "disdvi.o" and no make rule to create it.... you're pretty much stuck.

Where did this source code come from, anyway?

-alex
 
There is a bug in the makefile, which would prevent building on any platform.

disdvi:disdvi.c commands.h
cc -o disdvi disdvi.o

disdvi is declared to depend on the .c source file, but then calls on the .o object file (which needs to be made from the .c file itself).

Change that to:
disdvi:disdvi.o commands.h

But, if the makefile is even broken, the source is probably buggy too...
 
Tried all options without result. Yes, think you are right. The source is from CTAN (TeX/LaTeX) and dates from 1993. I think I'll give this one a miss.

Thanks anyway for all your help, everyone.
 
Back
Top