You are trying to install (with `sudo make install`) to the same
directory you're building FLTK in (error: "'../lib/libfltk_jpeg.a' and
'/home/alan/reference/fltk-1.3.5/lib/libfltk_jpeg.a' are the same file").
There are some issues with your commands:
(1) You do not need to "install" FLTK to use it. If your build (2nd
command: 'make') worked w/o errors you're ready to use FLTK in another
project and you can run the example programs in the test/ folder.
(2) Several of your ./configure command switches are default so you
don't need them, for instance "--enable-threads --enable-xdbe
--enable-xft". You can safely remove these commandline switches.
(3) The following switches are (AFAICT) redundant or even wrong. You
should remove those.
> --includedir=/home/alan/reference/fltk-1.3.5/include
> --bindir=/home/alan/reference/fltk-1.3.5/bin
> --libdir=/home/alan/reference/fltk-1.3.5/lib
(4) You don't need `sudo' if you (really) want to "install" the FLTK
libs to a subdirectory of your home folder (if that's what you did). You
need `sudo' only if you install to a system directory.
(5) If you really want to "install" FLTK (that's fine although not
necessary) and want to use a subdirectory of your home folder I suggest
to use something where you'll maybe install other software as well, e.g.
'/home/alan/dev' or another appropriate directory (not the source
directory of FLTK).
That all said, your configure, build, and install commands might look
like this:
$ ./configure --enable-debug --disable-gl --enable-shared
--prefix=/home/alan/dev
$ make
$ make install
Note that --prefix is used for the install target folder, change this as
required.
One last hint: I'd try to use the defaults when building new software
and amend the commands only when needed. The default values are usually
(and in the FLTK case definitely) a good starting point.
Welcome to the FLTK community, have fun!