Steve has some very good points.  First, we shouldn't mess up an existing GLUT installation unless we really have to.  Second, if an application program compiles and links to GLUT, it should compile and link to "freeglut" without change.  Third, if a program is going to use "freeglut" extensions to GLUT (like the main loop behaviour), then it should change its include statement so that some poor fellow doesn't come along later with GLUT and wonder why the thing isn't working.  (When I started this subject I disagreed with his third point, but I think I have changed my mind ... even if it does mean modifying my code.)

Unfortunately, I don't know whether it is possible to follow the first and second points at the same time.  Either the GLUT header file "glut.h" or the freeglut header file "glut.h" will be in the <GL> include directory.  If we give the header file a different name, then the application code will have to change.  Of the two, I think changing the header file is preferable.  (If people differ on this, please speak up.)  All the same, I do think we should minimize the damage done to an existing GLUT installation.

So, to be specific:

Here is the arrangement I suggest (following Steve's lead) for our header files:

(a) We create a file, "glut.h", which differs from GLUT's header file ONLY in the inclusion of a "#define FREEGLUT 1" preprocessor directive and (for Windows) the pragmas to include the GLUT library.  (Are we allowed to do this under Mark Kilgard's licensing arrangements?)

(b) We create a file, "freeglut_ext.h" which contains the public interface part of our extensions to the present GLUT interface.

(c) We modify "freeglut.h" to include the two files in (a) and (b) above.

(d) On a separate topic, but also relevant to the arrangement of header files, I suggest that we move "freeglut_internal.h" out of the public header file directory and into the "freeglut-1.3" directory with the rest of the source codes.  It is not part of the public interface and should not be treated as such.  This is a new suggestion and has not been discussed before.

Here is what I think we should do with the header files on installation (this differs from Steve's suggestion):

(e) If there is an existing "glut.h" file, we check for the existence of a "freeglut.h" file.  If there are both a "glut.h" file and a "freeglut.h" file, we are overwriting an existing "freeglut" installation.  I would simply overwrite the existing files.

(f) If there is an existing "glut.h" file but no existing "freeglut.h" file, we are overwriting a GLUT installation.  I would rename the "glut.h" file to something else ("GLUT_glut.h"?) and continue.

(f) If there is no existing "glut.h" file, we are home free.  We install our own files.

Finally, here are my thoughts on library installation.

(g) I am not qualified to have any thoughts of my own on library installation on Unix/Linux systems.  But following Steve's lead of not overwriting an existing GLUT installation, I would suggest that we name our libraries "libfreeglut.a" and "libfreeglut.so".

(h) On Windows, since all I have seen of GLUT is a DLL, I suggest that we make a DLL the default type of installation.  I suggest that we name the DLL "freeglut.dll" and its interface file "freeglut.lib".

(i) Also on Windows, I personally would like to have a static library.  (It gives me one less file to send to my customers.)  I suggest that we name the static library "freeglut_static.lib".

I can help with the Windows stuff and the file naming, but the Unix installation is way out of my ballpark.  As usual, please let me know what you think.

John F. Fay
john.fay@eglin.af.mil