
ASYMPTOTE: The build process for TeX Live does not automatically build
asymptote. Asymptote must be built separately.
This requires first building three libraries, fftw-3.3.6, gsl-1.16, readline-6.3.
We carefully build these so they will statically link, because they may not
exist on user machines.

As usual, we put this preparation step at the end and describe here the steps
to rebuild asymptote if their are changes.


BUILDING ASYMPTOTE:

On older systems, disable /usr/local.  On El Capitan, disable the bin, include, lib, share, and texlive folders in /usr/local. For example

	cd /usr
	sudo mv local local-temp

Now build asymptote. 
	
	cd ~/texlive2018dev/source/utils/asymptote
	make clean
		(reach into texlive2018dev/source/utils/asymptote
		 and throw away the folder gc-7.4.2, keeping gc-7.4.2open.tar.gz)
	export CPPFLAGS="-I/Users/koch/AsymptoteBuild/include -I/Users/koch/AsymptoteBuild/include/gsi -I/Users/koch/AsymptoteBuild/include/readline"
	export LDFLAGS="-L/Users/koch/AsymptoteBuild/lib"
	./configure --prefix=/tmp/asyinst --enable-texlive-build
	make # CFLAGS="-g -DBROKEN_COMPILER"
	strip asy

	## To test, 

	cd
	cd ~/texlive2018dev/source/utils/asymptote
	make check

	## We want Testing errors…PASSED

	## End of checking
 

Move To Desktop 
	
	cd 
	cd texlive2018dev/source/utils/asymptote
	cp asy ~/Desktop/asy
	
Fix Local When Done


	cd /usr/local
	rm bin, lib, share, include
	rename bin, lib, share, include, and texlive





INITIAL STEPS; DO THESE JUST ONCE BEFORE BEGINNING
TO BUILD ASYMPTOTE:

You must compile three libraries, which will be statically linked so that in
the end they are not installed in a user's system. 

Create a folder named "AsymptoteBuild" in your home directory.

Get the Fast Fourier Transform Library (FFTW) from http://www.fftw.org/
and install the tar.gz file in AsymptoteBuild. Decompress it, producing a folder
named fftw-3.3.7. 

Get the GNU Scientific Library (GSL) from http://www.gnu.org/software/gsl/
and install the tar.gz file in AsymptoteBuild. Decompress it, producing a folder
named gsl-2-4. 

Get the GNU Readline Library from https://tiswww.case.edu/php/chet/readline/rltop.html and and install the tar.gz file in AsymptoteBuild. We use version 6.3, which has always worked, rather than version 7.0. Decompress it, producing a folder 
named readline-6.3 containing the source code.

Build these libraries as follows:

	cd ~/AsymptoteBuild
	cd fftw-3.3.7
	make clean
	./configure --prefix=/Users/koch/AsymptoteBuild --exec-prefix=/Users/koch/AsymptoteBuild
	make
	make install

	cd ..
	cd gsl-2.4
	make clean
	./configure --prefix=/Users/koch/AsymptoteBuild --exec-prefix=/Users/koch/AsymptoteBuild
	make
	make install

	cd ..
	cd readline-6.3
	make clean
	./configure --prefix=/Users/koch/AsymptoteBuild --exec-prefix=/Users/koch/AsymptoteBuild
	make
	make install

	cd /Users/koch/AsymptoteBuild/lib
	rm -f *.dylib
	rm -f *.la


--------------------------------


To see which dylibs are called by asymptote:

	otool -L asy



