The configure script is organized into four sections, which must be updated whenever new files or options are introduced into VMD or a change in the Makefile must be made. Also, the settings of VMD configuration variables must be changed to the proper settings for the user. For most users, the only section that will need to be changed is the very first section, where parameters are set. Developers of VMD will need to change all the sections of the configure script when code changes are made.
The first section of the configure script is present simply to set the values for specific configuration parameters, i.e., the directories to install VMD data files and utilities. See section 12 for a description of these parameters. New configuration parameters should be introduced and initialized in this section.
Following the parameters section, the configure script contains commands to parse the command-line options to the script, and initialize internal variables which store the requested OS type and list of required options. When new optional components for VMD are introduced, this section must include commands to look for the command-line option requesting the new component, and must initialize new variables to indicate the requested option.
The third section of the configure script, which is the largest part of the file, is the set of instructions used to write out the Makefile. This is accomplished by copying text embedded within the configure script to the newly forming Makefile, substituting the values of configuration parameters when necessary. Any changes to how the Makefile operates, or to specific make targets, should be made by altering this section of the configure script. At the start of the Makefile are placed general variable settings, based on the values of the configuration parameters set at the start of the configure script. Following this, the names of all files which comprise the different components of VMD are placed within the Makefile. For the different optional components, the corresponding sets of filenames are included or excluded from the Makefile based on whether the option was included or excluded. This part also includes the names of all documentation, data, etc. files. To conclude the Makefile, the definitions of all make targets are copied over.
At the end of the configure script is a section which finishes up after a new Makefile has been successfully created. This section copies the new Makefile to the proper subdirectories, saves the settings used to create this Makefile to the file configure.options, and then if requested executes a ``make'' command in the src directory. There is little need to change this part.