Skip to content

Commit

Permalink
Added getopt for systems without full GNU getopt support (e.g. cygwin,
Browse files Browse the repository at this point in the history
FreeBSD).

Use "make all/make install" to produce/install both asy and man pages.
  • Loading branch information
johncbowman committed Jan 27, 2005
1 parent d907ef6 commit 7deacc0
Show file tree
Hide file tree
Showing 8 changed files with 1,460 additions and 41 deletions.
21 changes: 10 additions & 11 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ LIBS = $(LFLAGS) @LIBS@
CAMP = camperror path drawpath drawlabel picture psfile texfile util settings \
guide knotlist pathlist drawfill
FILES = $(CAMP) cast env genv main runtime stm dec errormsg inst name symbol \
types entry exp newexp stack camp.tab lex.yy import access \
types entry exp newexp stack camp.tab lex.yy import access @getopt@ \
absyn record pool interact fileio builtin fftw++ simpson coder coenv
CLEAN = camp.tab.h camp.tab.cc lex.yy.cc camp.output
NAME = asy
XNAME = x$(NAME)
MANFILES = {asy.1,xasy.1x}

CXX = @CXX@ -Wall -ansi
MAKEDEPEND = $(CXX) $(OPTS) -M -DDEPEND
Expand All @@ -35,12 +34,14 @@ exampledir = $(datadir)/doc/asymptote
latexdir = @latexdir@
INSTALL = @INSTALL@

export INSTALL prefix exampledir mandir

ASYMPTOTE_DIR = ../base
export ASYMPTOTE_DIR

# $(MAGIC) is here for when we reimport from Compile
asy$(MAGIC): depend
$(MAKE) -f Compile asy
$(MAKE) -f Compile asy

all: asy man

Expand All @@ -62,7 +63,10 @@ lex.yy.cc: camp.l

lex.yy.d: lex.yy.cc camp.tab.h

install: asy
install-all:
install: install-asy install-man

install-asy: asy
${INSTALL} -d $(bindir) $(asydir) $(exampledir) $(latexdir)
${INSTALL} -s $(NAME) $(bindir)
${INSTALL} $(XNAME) $(bindir)
Expand All @@ -72,14 +76,9 @@ install: asy
texhash

install-man: man
${INSTALL} -d $(prefix)/info $(exampledir) $(mandir)/man1
${INSTALL} -m 644 doc/asymptote.info $(prefix)/info
install-info --infodir=$(prefix)/info doc/asymptote.info
${INSTALL} -m 644 doc/asymptote.pdf $(exampledir)
${INSTALL} -m 644 doc/$(MANFILES) $(mandir)/man1

install-all: install install-man
cd doc; $(MAKE) install

uninstall-all:
uninstall:
-cd $(exampledir); rm -f *.asy asy*
-rmdir $(exampledir)
Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ AC_PROG_CC
AC_PROG_MAKE_SET

AC_CHECK_FUNC(getopt_long_only, AC_DEFINE(HAVE_GNU_GETOPT_H, 1,
[Define if getopt.h is the GNU version]),)
AC_SEARCH_LIBS([getopt_long_only],[gnugetopt])
[Define if getopt.h is the GNU version]),
getopt="getopt getopt1",)
AC_SUBST(getopt)

AC_CHECK_HEADER(fftw3.h,
AC_CHECK_LIB([fftw3], fftw_execute,,
Expand Down
14 changes: 11 additions & 3 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
asyfiles := $(wildcard *.asy)
MANFILES = asy.1 xasy.1x
ASYFILES = $(wildcard *.asy)

man: asymptote.info asymptote.ps asymptote.pdf html

Expand All @@ -15,8 +16,8 @@ latexusage.eps: latexusage.tex
dvips -o latexusage.eps latexusage
rm -f latexusage.*.eps latexusage.asy

figures: latexusage.eps latexusage.png $(asyfiles:.asy=.eps) \
$(asyfiles:.asy=.png) version.texi
figures: latexusage.eps latexusage.png $(ASYFILES:.asy=.eps) \
$(ASYFILES:.asy=.png) version.texi

asymptote.info: figures
makeinfo asymptote
Expand All @@ -40,6 +41,13 @@ clean: FORCE
rm -f asymptote.{aux,cp,cps,dvi,fn,info,ky,log,pg,ps,pdf,toc,tp,vr}
rm -rf asymptote

install: man
${INSTALL} -d $(prefix)/info $(exampledir) $(mandir)/man1
${INSTALL} -m 644 asymptote.info $(prefix)/info
install-info --infodir=$(prefix)/info asymptote.info
${INSTALL} -m 644 asymptote.pdf $(exampledir)
${INSTALL} -m 644 $(MANFILES) $(mandir)/man1

distclean: FORCE clean
rm -f version.texi

Expand Down
29 changes: 12 additions & 17 deletions doc/asymptote.texi
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ equations;
@chapter Installation
@cindex installation

A binary distribution for a specific platform ARCH can be installed in
@code{/usr/local} with the commands:
A binary distribution of @code{Asymptote} version @code{x.xx} for a
specific platform @code{ARCH} can be installed in @code{/usr/local} with
the commands:
@verbatim
cd /
tar -zxf asymptote-x.xx.ARCH.tar.gz
Expand All @@ -202,22 +203,18 @@ tar -zxvf asymptote-x.xx.ARCH.tar.gz | xargs rm
texhash
@end verbatim

To compile and install @code{Asymptote} from a source release x.xx, execute the
following commands:
To compile and install @code{Asymptote} from a source release
@code{x.xx}, execute the commands:
@verbatim
tar -zxf asymptote-x.xx.tar.gz
cd asymptote-x.xx
./configure
make
make all
make install
@end verbatim

For a (default) system-wide installation, the last command should be
done as root. To build and install the man pages as well, type:
@verbatim
make man
make install-man
@end verbatim
done as root.

In order to compile @code{Asymptote} you will need the @code{boost}
headers from @code{http://boost.org} (included in Fedora Linux distributions).
Expand All @@ -228,7 +225,7 @@ http://dl.sourceforge.net/sourceforge/boost/boost-jam-3.1.10-1.i386.rpm
http://dl.sourceforge.net/sourceforge/boost/boost_1_32_0.tar.bz2
@end verbatim

However, Asymptote currently only uses the @code{boost} header files,
However, @code{Asymptote} currently only uses the @code{boost} header files,
so it is sufficient to copy the @code{boost} subdirectory from the
@code{boost} source distribution to @code{/usr/include} or even just
make a link in the top level directory of the @code{Asymptote} source code:
Expand All @@ -239,7 +236,7 @@ tar -jxf asymptote-x.xx.tar.gz
cd asymptote-x.xx
ln -s ../boost_1_32_0/boost .
./configure
make
make all
make install
@end verbatim

Expand All @@ -256,13 +253,13 @@ http://www.uhoreg.ca/programming/debian.text
@end verbatim

@cindex readline
If you are compiling with gcc, you will need a relatively recent version
If you are compiling with @code{gcc}, you will need a relatively recent version
(e.g. 3.3.3 or later). If you get errors compiling @code{interact.cc},
try installing an up-to-date version of the GNU @code{readline} library
or else uncomment @code{HAVE_LIBREADLINE} in @code{config.h}.

The FFTW library is only required if you want @code{Asymptote} to be able to
take Fourier transforms of data (say to compute an audio power spectrum).
take Fourier transforms of data (say, to compute an audio power spectrum).

If you don't want to install @code{Asymptote} system wide, just make
sure the compiled binary @code{asy} and GUI script @code{xasy} are in
Expand Down Expand Up @@ -349,10 +346,8 @@ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/asymptote co asymptote
cd asymptote-x.xx
./autogen.sh
./configure
make
make man
make all
make install
make install-man
@end verbatim

To compile without optimization, use the command @code{make OPT=-g}.
Expand Down
Loading

0 comments on commit 7deacc0

Please sign in to comment.