Type

	./configure --with-appdefaultdir=</path/to/your/app-defaults>
	make
	make install

to build xfig and install it below /usr/local.  For requirements, see below.

Optional:
	make check	     # Run a few tests on the newly built executable
	make installcheck    # Run the same tests with the installed executable

Variations:
make -sj  (-s .. silent, -j .. parallel build),
make install-strip .. strip debugging symbols from the final executable

The path given by the --with-appdefaultdir option varies between systems.
It may be one of "/usr/share/X11/app-defaults", "/etc/X11/app-defaults",
"/opt/X11/share/app-defaults", or others. This path is a property of your
X-server, not of xfig. Therefore, the path expected by your X-server must be
passed to xfig with this option.
At installation time, the app-defaults file of xfig is placed into this
directory. The X-server reads the X-resources contained in this file. The
client, in this case xfig, obtains the resources from the X-server at run time.

Important options to configure are
	--prefix=<path>		root of installation tree, default /usr/local
	--with-gsexe=<path>	path of the ghostscript executable
	--with-appdefaultdir=<path>	directory to install the X resources
				file to, default $prefix/share/X11/app-defaults/
	--with-icondir=<path>	directory to install the xfig icon to,
				default $prefix/share/pixmaps/
	--with-applicationsdir=<path>	directory for the xfig.desktop file,
				default $prefix/share/applications/
	--without-xfig-libraries	do not install xfig libraries files,
				currently 2531 fig files, 16 MB.
Type ./configure --help for help text on all options.
When running ./configure, the values of various flags are printed at the
very end of its output.


Requirements:

The following runtime libraries and header file must be installed:
libx11, libxt, libxaw, libxi, libxpm;
Optionally, libxaw3d, libpng, libjpeg, libtiff, libgs or ghostscript.
libxaw3d enables a three-dimensional look of the graphical user interface.
With libpng, libjpeg, and libtiff, these image files can be read and displayed.
To embed and display the first page of a postscript, eps or pdf document in
xfig, either libgs should be linked with xfig, or the ghostscript executable is
needed at runtime.

Usually, if a package manager is used, the runtime libraries are contained in a
"lib*" package, the header files in a "lib*-dev" or "lib*-devel" package,
e.g., "libx11" and "libx11-dev".

Fonts:
Xfig queries fontconfig for suitable fonts to display text objects on its
canvas. For best looks, install a package that contains the base 35 Postscript
fonts, e.g., on debian fonts-urw-base35


Specific distributions:

On Mac Darwin, OS X 10.11.1 (El Capitan), using XQuartz and having installed
jpeg, libpng, libtiff and zlib via Macports, the following command should work:
	./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include \
		--with-appdefaultdir=/opt/X11/share/X11/app-defaults
	make -j; make install-strip

On debian, to install xfig under /usr/share, try
	./configure --prefix=/usr --with-appdefaultdir=/etc/X11/app-defaults
	make -j; make install


Please report bug fixes or suggestions for improvement to
thomas.loimer@tuwien.ac.at.
