#!/usr/bin/env perl # (C) Copyright 1995-2007 The Board of Trustees of the University of Illinois # All Rights Reserved # # Usage: configure [ optionlist ] (See full option description down below) # Perl 5.x must be in your path, and /usr/bin/env must exist in order # for this to work correctly. ############################################################################## # User modifiable installation parameters, can be overridden by env variables ############################################################################## # Name of shell script used to start program; this is the name used by users $install_name = "vmd"; # Directory where VMD startup script is installed, should be in users' paths. #$install_bin_dir="/usr/local/bin"; $install_bin_dir="/share/apps/local/bin"; # Directory where VMD files and executables are installed $install_library_dir="/share/apps/local/$install_name"; #$install_library_dir="/usr/local/lib/$install_name"; # optionally override hard-coded defaults above with environment variables if ($ENV{VMDINSTALLNAME}) { $install_name = $ENV{VMDINSTALLNAME} } if ($ENV{VMDINSTALLBINDIR}) { $install_bin_dir = $ENV{VMDINSTALLBINDIR} } if ($ENV{VMDINSTALLLIBRARYDIR}) { $install_library_dir = $ENV{VMDINSTALLLIBRARYDIR} } ############################################################################## # You shouldn't normally need to modify anything below this point, though some # people will have to change include/library paths if compiling from source. ############################################################################## # Usage: configure [ optionlist ] # where [ optionlist ] is one or more of the following, separated by spaces: # If conflicting options are given, the last one in the command is used. # If no arguments are given, the file 'configure.options' is checked; if it # exists, the contents of the file are used for the current options. Upon # completion of a successful configure, configure.options is rewritten with # a copy of the most recently used options. # # Architectures: # --------------------------------------------------------------- # AIX4 - compile on an RS/6000 machine (gcc/g++/xlc/xlC) # AIX5 - compile on an RS/6000 machine (gcc/g++/xlc/xlC) # FREEBSD - compile on a FreeBSD machine (gcc/g++) # HPUX11 - compile on an HP-UX 11.0 machine (cc/CC/cc/aCC) # IRIX6 - compile on an SGI, IRIX 6.X or later, 32-bit ABI # IRIX6_64 - compile on an SGI, IRIX 6.X or later, 64-bit ABI # LINUX - compile on a Linux machine (x86 32-bit) # LINUXAMD64 - compile on a Linux machine (x86 64-bit AMD64 or EM64T) # LINUXIA64 - compile on a Linux machine (Itanium) # LINUXALPHA - compile on a Linux machine (Alpha) # LINUXPPC - compile on a Linux machine (PowerPC) # MACOSX - compile on a MacOS-X PowerPC machine # MACOSXX86 - compile on a MacOS-X x86 machine # TRU64 - compile on a DEC Alpha/Digital Unix 4.0 machine # SOLARIS2 - compile on a Solaris machine, 32-bit ABI # SOLARIS2_64 - compile on a Solaris machine, 64-bit ABI # SOLARISX86 - compile on a Solaris x86 machine # SOLARISX86_64 - compile on a Solaris x86 machine # WIN32 - compile on a Win32 machine (NT, 95, 98, etc) # WIN64 - compile on a Win64 machine (Windows XP x64) # # Hardware Accelerated (hopefully) Graphics Libraries: # --------------------------------------------------------------- # OPENGL - use OpenGL for graphics # SDL - use SDL and OpenGL for graphics # FLTKOPENGL - use FLTK to create an OpenGL window for graphics # MESA - use Mesa libraries for OpenGL API emulation (enables OPENGL) # CAVE - compile with the GL or OpenGL CAVE libraries # FREEVR - compile with the OpenGL FreeVR libraries # # Graphical user interface libraries: # --------------------------------------------------------------- # FLTK - Fast Light Tool Kit (FORMS/XFORMS workalike) # TK - enable use of TK library # # Optional components: # --------------------------------------------------------------- # ACTC - triangle mesh stripification library for higher speed surfaces # CUDA - NVIDIA CUDA GPU acceleration functions # IMD - include option for connecting to remote MD simulations # VRPN - include VRPN tracker lib for spatial trackers # SPACEBALL - spaceball 6DOF input device # LIBTACHYON - built-in raytracing via Tachyon library # LIBGELATO - built-in rendering via Gelato library # NETCDF - NetCDF file I/O library # CONTRIB - user contributed code for VMD which has restrictions # TCL - The Tcl scripting language # PYTHON - The Python scripting language # PTHREADS - POSIX Threads Support # SWIG - A Swig-generated interface # NUMPY - Numeric Python extensions # # Compiler options: # --------------------------------------------------------------- # STATIC - link to static libraries only # LP64 - compile for a 64-bit ABI instead of 32-bit if possible # ACC - compile with HP aCC (instead of CC) # GCC - compile with gcc (instead of the vendor supplied one) # ICC - compile with Intel C/C++ compilers # KCC - compile with Kuck and Associates KCC compiler # PURIFY - compile with purify instrumentation # SILENT - suppress the make command echo # SHARED - compile a shared library instead of a standalone executable # CCACHE - compile with ccache (requires local configuration) # # Purify and valgrind notes: # --------------------------------------------------------------- # In order to compile VMD such that memory leak and bounds checkers work # you may need to compile VMD with a fairly minimalistic set of options. # On recent Linux valgrind builds, these options worked well: # LINUX MESA FLTK TK TCL SILENT # Purify is generally more forgiving, but these same options should also work # well with purify. # ############################################################################ # Configure script code begins here ############################################################################ ## Test for existence of a properly compiled plugin tree if (!(-e "plugins")) { print "\n"; print "VMD plugin directory not found.\n"; print "Please compile the VMD plugins and do 'make distrib' to copy them\n"; print "into a 'plugins' directory linked or located in this directory.\n"; print "Be sure your PLUGINDIR environment variable is set before running\n"; print "'make distrib' in the plugin build area.\n"; print "\n"; die "Halting configuration until VMD plugins are built.\n"; } else { if (!(-e "plugins/include/vmdplugin.h")) { print "\n"; print "VMD plugin include files or directory not found.\n"; print "Please compile the VMD plugins and do 'make distrib' to copy them\n"; print "into a 'plugins' directory linked or located in this directory.\n"; print "Be sure your PLUGINDIR environment variable is set before running\n"; print "'make distrib' in the plugin build area.\n"; print "\n"; die "Halting configuration until VMD plugins are built.\n"; } } #################### Parse command line options ########### # list of allowed architectures @archlist=('IRIX6', 'IRIX6_64', 'FREEBSD', 'HPUX11', 'AIX4', 'AIX5', 'AIX5_64', 'LINUX', 'LINUXALPHA', 'LINUXAMD64', 'LINUXIA64', 'LINUXPPC', 'MACOSX', 'MACOSXX86', 'TRU64', 'SOLARIS2', 'SOLARIS2_64', 'SOLARISX86', 'SOLARISX86_64', 'WIN32', 'WIN64'); if ($#ARGV == -1) { $text = `cat configure.options`; chop($text); print "using configure.options: $text\n"; $text =~ s/^\s*//g; $text =~ s/\s*$//g; $text =~ s/\s+/ /g; @ARGV = split(/\s/, $text); } $config_arch = shift @ARGV; if ( ! grep( $_ eq $config_arch , @archlist)) { die "Architecture $config_arch not supported (@archlist)\n"; } $config_opengl = 0; # OpenGL $config_mesa = 0; # Mesa (OpenGL workalike) $config_cave = 0; # CAVE (SGI-only) $config_freevr = 0; # FreeVR $config_fltk = 0; # FLTK user interface $config_fltkopengl = 0; # FLTK-based OpenGL display window $config_sdl = 0; # SDL-based OpenGL display window $config_tk = 0; # Tk interface extensions $config_tkcon = 0; # Tk console log $config_actc = 0; # ACTC $config_cuda = 0; # CUDA $config_imd = 0; # interactive MD sockets code etc. $config_spaceball = 0; # spaceball 6dof input support $config_libtachyon = 0; # Built-in Tachyon ray tracing support $config_libgelato = 0; # Built-in Gelato rendering support $config_vrpn = 0; # VRPN tracker/wand/haptic support $config_sigma = 0; # Sigma support $config_netcdf = 0; # NetCDF support $config_contrib = 0; # VMD Contributed code, off by default $config_silent = 0; # noisy makefiles (can't turn this off, only on...) $config_system = 1; # this is always on $config_vmd = 1; # this is always on $config_plugin = 1; # this is always on $config_swig = 0; # off by default $config_numeric = 0; # off by default $config_rpm = 0; # off by default foreach $term (@ARGV) { # graphics/windowing library if ($term eq "OPENGL") { $config_opengl = 1; next; } if ($term eq "SDL") { $config_sdl = 1; next; } if ($term eq "FLTKOPENGL") { $config_fltkopengl = 1; next; } if ($term eq "MESA") { $config_mesa = 1; next; } if ($term eq "CAVE") { $config_cave = 1; next; } if ($term eq "FREEVR") { $config_freevr = 1; next; } # GUI options if ($term eq "FLTK" ) { $config_fltk = 1; next; } if ($term eq "TK") { $config_tk = 1; next; } # Optional components if ($term eq "ACTC") { $config_actc = 1; next; } if ($term eq "CUDA") { $config_cuda = 1; next; } if ($term eq "IMD") { $config_imd = 1; next; } if ($term eq "SPACEBALL") { $config_spaceball = 1; next; } if ($term eq "LIBTACHYON") { $config_libtachyon = 1; next; } if ($term eq "LIBGELATO" ) { $config_libgelato = 1; next; } if ($term eq "VRPN") { $config_vrpn = 1; next; } if ($term eq "NETCDF") { $config_netcdf = 1; next; } if ($term eq "CONTRIB") { $config_contrib = 1; next; } if ($term eq "TCL") { $config_tcl = 1; next; } if ($term eq "PYTHON") { $config_python = 1; next; } if ($term eq "PTHREADS") { $config_pthreads = 1; next; } if ($term eq "SWIG") { $config_swig = 1; next; } if ($term eq "NUMPY") { $config_numeric = 1; next; } if ($term eq "RPM") { $config_rpm = 1; next; } if ($term eq "TKCON") { $config_tkcon = 1; next; } # once optional, these are now required. They exist for backwards # compatibility; some may be expanded again in the future if ($term eq "SURF") { next; } if ($term eq "MSMS") { next; } # compiler and make options if ($term eq "SILENT") { $config_silent = 1; next; } if ($term eq "NOSILENT") { $config_silent = 0; next; } if ($term eq "STATIC") { $config_static = 1; next; } if ($term eq "LP64") { $config_lp64 = 1; next; } if ($term eq "ACC") { $config_acc = 1; next; } if ($term eq "GCC") { $config_gcc = 1; next; } if ($term eq "ICC") { $config_icc = 1; next; } if ($term eq "KCC") { $config_kcc = 1; next; } if ($term eq "PURIFY") { $config_purify = 1; next; } if ($term eq "SHARED") { $config_shared = 1; next; } if ($term eq "CCACHE") { $config_ccache = 1; next; } # error conditions die "Unknown option '$term'\n"; } # convert back to a string and save $config_string = "$config_arch"; if ($config_opengl) { $config_string .= " OPENGL" } if ($config_sdl) { $config_string .= " SDL" } if ($config_fltkopengl) { $config_string .= " FLTKOPENGL" } if ($config_mesa) { $config_string .= " MESA" } if ($config_cave) { $config_string .= " CAVE" } if ($config_freevr) { $config_string .= " FREEVR" } if ($config_fltk) { $config_string .= " FLTK" } if ($config_tk) { $config_string .= " TK" } if ($config_actc) { $config_string .= " ACTC" } if ($config_cuda) { $config_string .= " CUDA" } if ($config_imd) { $config_string .= " IMD" } if ($config_spaceball) { $config_string .= " SPACEBALL" } if ($config_libtachyon) { $config_string .= " LIBTACHYON" } if ($config_libgelato) { $config_string .= " LIBGELATO" } if ($config_vrpn) { $config_string .= " VRPN" } if ($config_netcdf) { $config_string .= " NETCDF" } if ($config_contrib) { $config_string .= " CONTRIB" } if ($config_tcl) { $config_string .= " TCL" } if ($config_python) { $config_string .= " PYTHON" } if ($config_pthreads) { $config_string .= " PTHREADS" } if ($config_swig) { $config_string .= " SWIG" } if ($config_numeric) { $config_string .= " NUMPY" } if ($config_rpm) { $config_string .= " RPM" } if ($config_tkcon) { $config_string .= " TKCON" } if ($config_silent) { $config_string .= " SILENT" } if ($config_static) { $config_string .= " STATIC" } if ($config_lp64) { $config_string .= " LP64" } if ($config_acc) { $config_string .= " ACC" } if ($config_gcc) { $config_string .= " GCC" } if ($config_icc) { $config_string .= " ICC" } if ($config_kcc) { $config_string .= " KCC" } if ($config_purify) { $config_string .= " PURIFY" } if ($config_shared) { $config_string .= " SHARED" } if ($config_ccache) { $config_string .= " CCACHE" } if (!open(OUTFILE, ">configure.options")) { print STDERR "** Cannot save parameters to configure.options: $!\n"; } else { print OUTFILE "$config_string\n"; close(OUTFILE); } # This is where 'vmd_IRIX6' or 'vmd_SOLARIS2' gets created $config_progname = "vmd_${config_arch}"; # Tcl and Python expects shared libraries to be named like this. if ($config_shared) { $config_progname = "vmd.so"; } ######################### GLOBAL DEFINES ####################### # default screen height, a floating-point value. This distance is in 'world' # coordinate system $def_height="6.0"; # distance from the 'world' coordinates origin to the screen, in the same # units as the DEFHEIGHT value. If > 0, the screen is between the viewer # and the origin; if < 0, the origin is in FRONT of the screen. $def_dist="-2.0"; # whether or not to display the program title on startup: ON or OFF $def_title="ON"; # default temporary file storage directory $def_tmpdir="/tmp"; # name of the external image viewer program for this machine $def_imageviewer="display %s"; # program version number $progversion="1.8.6"; # text prompt string $promptstring="vmd > "; # startup command script file. Read after program initialization. $startupfilename=".vmdrc"; $pystartupfilename=".pyvmdrc"; # main VMD url $vmd_homepage="http://www.ks.uiuc.edu/Research/vmd/"; # VMD help url $vmd_helppage="http://www.ks.uiuc.edu/Research/vmd/"; # who is to blame for this version of VMD. $versionauthors="J. Cohen, J. Stone"; # who is actually to blame for this whole mess $authorsline1="E. Caddigan, A. Dalke, P. Grayson, J. Gullingsrud, W. Humphrey, "; $authorsline2="B. Isralewitz, S. Izrailev, D. Norris, J. Stone, J. Ulrich"; $authorsline3=""; $authors= $authorsline1 . $authorsline2 . $authorsline3; #################### GENERIC OPTIONS FOR EACH MODULE ################## # name of the script used for creating $install_name $vmd_name = "vmd"; ################ VMD directory defines # directories for object files, scripts, and different parts of code. # these are all relative to being in any of the subdirs of the main directory # such as the src, lib, or bin dirs $vmd_main_dir = "../."; $vmd_src_dir = "../src"; $vmd_library_dir = "../lib"; $vmd_data_dir = "../data"; $vmd_doc_dir = "../doc"; $vmd_bin_dir = "../bin"; $vmd_proteins_dir = "../proteins"; $vmd_distrib_dir = "../distrib"; $vmd_arch_dir = "../$config_arch"; ################ General generic architecture settings $arch_cd = "cd"; $arch_copy = "cp"; $arch_copydir = "cp -r"; $arch_makedir = "mkdir -p"; $arch_move = "mv -f"; $arch_delete = "rm -f"; $arch_deletedir = "rm -rf"; $arch_echo = "echo"; $arch_tar = "tar"; $arch_compress = "compress"; $arch_gnucompress = "/usr/local/bin/gzip"; $arch_latex = "latex"; $arch_compilerc = $arch_echo; $arch_rcflags = "No resource compiler required on this platform."; $arch_cc = "cc"; $arch_ccpp = "CC"; $arch_nvcc = "nvcc"; $arch_nvccflags = ""; $arch_gcc = "gcc"; $arch_gccpp = "g++"; $arch_accpp = "aCC"; # for HPs $arch_lex = "lex"; $arch_yacc = "yacc"; $arch_yflags = "-d"; $arch_copts = ""; # used to make CFLAGS (for C) $arch_cppopts = ""; # used to make CPPFLAGS (for C++) $arch_lopts = ""; # used to make LOADLIBES (for the linker) $arch_opt_flag = "-O"; $arch_debug_flag = "-g"; $arch_depend_flag = ""; # used for "make depend" DO NOT SET IT HERE! # # use this if you have problems finding sqrtf and the other float math functions # # NOTE: The AIX make tool needs a space after the last -D"acosf...." # if its missing, it breaks.. # $arch_no_math_float = <<'EOM'; -D"expf=exp" -D"logf=log" -D"sqrtf=sqrt" -D"cosf=cos" -D"sinf=sin" -D"fabsf=fabs" -D"acosf=acos" EOM ; # get rid of the trailing newline chop($arch_no_math_float); ################ Plugin options # $plugin_dir = "../plugins"; #$molfile_dir = "$plugin_dir/$config_arch/molfile"; $molfile_dir = "/share/apps/local/vmd/plugins/LINUXAMD64/molfile"; $plugin_include = "-I$plugin_dir/include -I$molfile_dir"; $plugin_library = "-L$molfile_dir"; $plugin_libs = "-lmolfile_plugin"; $plugin_defines = "-DVMDSTATICPLUGINS"; @plugin_cc = (); @plugin_cu = (); @plugin_ccpp = (); @plugin_h = ('plugin.h', 'molfile_plugin.h', 'libmolfile_plugin.h'); @plugin_extra = (); ################ OpenGL location # location of OpenGL library and include files; if OPENGL is not being used, # the next two options will be ignored. If left blank, standard system # directories will be searched. This also specifies the names of the # OpenGL libraries. Note that these options require -I and -L in front of # the include and library directory names # # Note: The old OpenGL builds needed -DMATRIX_POST_MULTIPLY, this code was # seriously buggy. The new code will build correctly without that # form of matrix operation now, so we can build it identically to the # GL version. The OpenGL code will compile either way, but until the # post multiply code is completely fixed in the core of VMD, don't. # $opengl_dir = ""; $opengl_include = ""; $opengl_library = ""; $opengl_libs = "-lGL -lGLU"; $opengl_defines = "-DVMDOPENGL -DVMDGRAPHICS"; @opengl_cc = (); @opengl_cu = (); @opengl_ccpp = ('OpenGLDisplayDevice.C', 'OpenGLExtensions.C', 'OpenGLRenderer.C', 'OpenGLShader.C', 'OpenGLCache.C', 'Hershey.C'); @opengl_h = ('OpenGLDisplayDevice.h', 'OpenGLExtensions.h', 'OpenGLRenderer.h', 'OpenGLShader.h', 'OpenGLCache.h', 'Hershey.h'); @opengl_extra = (); ################ Mesa location # location of Mesa library and include files; basically does the same # as OpenGL. This is based on the default instructions from the Mesa # README; the include files should by default be in /usr/local/include/GL. $mesa_dir = "$vmd_library_dir/Mesa"; $mesa_include = "-I$mesa_dir/include"; $mesa_library = "-L$mesa_dir/lib_$config_arch"; $mesa_libs = "-lMesaGL -lMesaGLU"; $mesa_defines = "-DUSELINEAXES -DVMDMESA -DVMDOPENGL -DVMDGRAPHICS"; @mesa_cc = @opengl_cc; @mesa_cu = (); @mesa_ccpp = @opengl_ccpp; @mesa_h = @opengl_h; @mesa_extra = @opengl_extra; # # SDL Direct Media Interface # $sdl_dir = "$vmd_library_dir/sdl"; $sdl_include = "-I$sdl_dir/include"; $sdl_library = "-L$sdl_dir/lib_$config_arch"; $sdl_libs = "-lGL -lGLU -lSDL"; $sdl_defines = "-DVMDOPENGL -DVMDSDL -DVMDGRAPHICS"; @sdl_cc = @opengl_cc; @sdl_cu = (); @sdl_ccpp = ('SDLOpenGLDisplayDevice.C', 'OpenGLRenderer.C', 'OpenGLExtensions.C', 'Hershey.C'); @sdl_h = @opengl_h; @sdl_extra = @opengl_extra; # # FLTK-based OpenGL graphics windows # $fltkopengl_dir = ""; $fltkopengl_include = ""; $fltkopengl_library = ""; $fltkopengl_libs = @opengl_libs; $fltkopengl_defines = "-DVMDOPENGL -DVMDFLTKOPENGL -DVMDGRAPHICS"; @fltkopengl_cc = @opengl_cc; @fltkopengl_cu = (); @fltkopengl_ccpp = ('FltkOpenGLDisplayDevice.C', 'OpenGLExtensions.C', 'OpenGLRenderer.C', 'OpenGLShader.C', 'OpenGLCache.C', 'Hershey.C'); @fltkopengl_h = @opengl_h; @fltkopengl_extra = @opengl_extra; ################ FLTK GUI $fltk_defines = "-DVMDGUI -DVMDFLTK"; $fltk_dir = "$vmd_library_dir/fltk"; $fltk_include = "-I$fltk_dir/include"; $fltk_library = "-L$fltk_dir/$config_arch"; $fltk_libs = "-lfltk -lX11"; #@fltk_cc = ('forms_ui.c'); @fltk_cu = (); @fltk_ccpp = ( 'ColorFltkMenu.C', 'DisplayFltkMenu.C', 'FileChooserFltkMenu.C', 'GraphicsFltkMenu.C', 'SelectionBuilder.C', 'GeometryFltkMenu.C', 'MaterialFltkMenu.C', 'MolBrowser.C', 'RenderFltkMenu.C', 'SaveTrajectoryFltkMenu.C', 'VMDFltkMenu.C', 'MainFltkMenu.C', 'ToolFltkMenu.C', 'frame_selector.C'); @fltk_h = ('ColorFltkMenu.h', 'DisplayFltkMenu.h', 'FileChooserFltkMenu.h', 'GeometryFltkMenu.h', 'GraphicsFltkMenu.h', 'GraphicsFltkReps.h', 'SelectionBuilder.h', 'MaterialFltkMenu.h', 'MolBrowser.h', 'RenderFltkMenu.h', 'SaveTrajectoryFltkMenu.h', 'VMDFltkMenu.h', 'MainFltkMenu.h', 'ToolFltkMenu.h', 'frame_selector.h'); @fltk_extra = ('forms_ui.fd'); ################ Tcl / Tk # location of TCL library and include file. # If left blank, standard system directories will be searched. #$stock_tcl_include_dir=$ENV{"TCL_INCLUDE_DIR"} || "/usr/local/include"; #$stock_tcl_library_dir=$ENV{"TCL_LIBRARY_DIR"} || "/usr/local/lib"; $stock_tcl_include_dir=$ENV{"TCL_INCLUDE_DIR"} || "$vmd_library_dir/tcl/include"; $stock_tcl_library_dir=$ENV{"TCL_LIBRARY_DIR"} || "$vmd_library_dir/tcl/lib_$config_arch"; # location of Tk (for TK option) #$stock_tk_include_dir=$ENV{"TK_INCLUDE_DIR"} || "/usr/local/include"; #$stock_tk_library_dir=$ENV{"TK_LIBRARY_DIR"} || "/usr/local/lib"; $stock_tk_include_dir=$ENV{"TK_INCLUDE_DIR"} || "$vmd_library_dir/tk/include"; $stock_tk_library_dir=$ENV{"TK_LIBRARY_DIR"} || "$vmd_library_dir/tk/lib_$config_arch"; if ($config_tk && !$config_tcl) { die "Error, Tk option requires Tcl\n"; } if ($config_tcl) { $tcl_defines = "-DVMDTCL"; if ($config_tk) { $tcl_defines .= " -DVMDTK"; } $tcl_include = "-I$stock_tcl_include_dir"; if ($config_tk) { $tcl_include .= " -I$stock_tk_include_dir"; } $tcl_library = "-L$stock_tcl_library_dir"; if ($config_tk) { $tcl_library .= " -L$stock_tk_library_dir"; } $tcl_libs = "-ltcl8.4"; if ($config_tk) { $tcl_libs = "-ltk8.4 -lX11 " . $tcl_libs; } @tcl_cc = (); @tcl_cu = (); @tcl_ccpp = ('ColorInfo.C', 'TclCommands.C', 'TclMeasure.C', 'TclMolInfo.C', 'TclTextInterp.C', 'TclVec.C', 'TclGraphics.C', 'TclVolMap.C', 'cmd_animate.C', 'cmd_collab.C', 'cmd_color.C', 'cmd_display.C', 'cmd_imd.C', 'cmd_label.C', 'cmd_material.C', 'cmd_menu.C', 'cmd_mol.C', 'cmd_mouse.C', 'cmd_plugin.C', 'cmd_render.C', 'cmd_tool.C', 'cmd_trans.C', 'cmd_user.C', 'cmd_util.C', 'tcl_commands.C'); @tcl_h = ('TclCommands.h', 'TclTextInterp.h', 'tcl_commands.h'); @tcl_extra = (); } if ($config_tcl) { @tk_cc = (); @tk_cu = (); @tk_ccpp = ('VMDTkMenu.C'); @tk_h = ('VMDTkMenu.h'); } ################ TKCON # OPTIONAL COMPONENT: Tk based console. # This redirects all console output to log all output to a tk # text windget (ideally tkcon) if it is available. if ($config_tkcon) { $tcl_defines .= " -DVMDTKCON"; push (@tk_cc, 'vmdconsole.c'); push (@tk_h, 'vmdconsole.h'); } ################ IMD # OPTIONAL COMPONENT: Interactive Molecular Dynamics support # This may be commented out if not required. # This allows VMD to connect directly to a running MD simulation # and exchange forces, coordinates, and other messages. $imd_defines = "-DVMDIMD"; @imd_cc = (); @imd_cu = (); if ($config_pthreads) { @imd_ccpp = ('IMDMgr.C', 'IMDSim.C', 'IMDSimThread.C', 'CmdIMD.C', 'imd.C' ); @imd_h = ('imd.h', 'IMDMgr.h', 'IMDSim.h', 'IMDSimThread.h', 'CmdIMD.h' ); } else { @imd_ccpp = ('IMDMgr.C', 'IMDSim.C', 'IMDSimBlocking.C', 'CmdIMD.C', 'imd.C' ); @imd_h = ('imd.h', 'IMDMgr.h', 'IMDSim.h', 'IMDSimBlocking.h', 'CmdIMD.h' ); } ################ SPACEBALL # OPTIONAL COMPONENT: Spaceball 6DOF input support # This may be commented out if not required. $spaceball_defines = "-DVMDSPACEBALL"; $spaceball_dir = "$vmd_library_dir/libsball"; $spaceball_include = "-I$spaceball_dir/include"; $spaceball_library = "-L$spaceball_dir/lib_$config_arch"; $spaceball_libs = "-lsball"; @spaceball_cc = (); @spaceball_cu = (); @spaceball_ccpp = ('Spaceball.C', 'SpaceballTracker.C' ); @spaceball_h = ('Spaceball.h', 'SpaceballTracker.h' ); ################ LIBTACHYON # OPTIONAL COMPONENT: Built-in Tachyon ray tracing support # This may be commented out if not required. $libtachyon_defines = "-DVMDLIBTACHYON"; $libtachyon_dir = "$vmd_library_dir/tachyon"; $libtachyon_include = "-I$libtachyon_dir/include"; $libtachyon_library = "-L$libtachyon_dir/lib_$config_arch"; $libtachyon_libs = "-ltachyon"; @libtachyon_cc = (); @libtachyon_cu = (); @libtachyon_ccpp = ('LibTachyonDisplayDevice.C' ); @libtachyon_h = ('LibTachyonDisplayDevice.h', ); ################ LIBGELATO # OPTIONAL COMPONENT: Built-in Gelato rendering support # The GELATOHOME environment variable must be set in order to # use this feature. # This may be commented out if not required. $libgelato_defines = "-DVMDLIBGELATO"; $libgelato_dir = $ENV{GELATOHOME}; $libgelato_include = "-I$libgelato_dir/include"; $libgelato_library = "-L$libgelato_dir/lib"; $libgelato_libs = "-lgelato"; @libgelato_cc = (); @libgelato_cu = (); @libgelato_ccpp = ('LibGelatoDisplayDevice.C' ); @libgelato_h = ('LibGelatoDisplayDevice.h', ); ####################### # OPTIONAL COMPONENT: VRPN Tracker library support # This may be commented out if not required. # This allows the use of many different spatial trackers with the # library developed at U. of North Carolina. Without it, non-CAVE # tracking is not allowed. ####################### $vrpn_defines = "-DVMDVRPN"; $vrpn_dir = "$vmd_library_dir/vrpn"; $vrpn_include = "-I$vrpn_dir/vrpn -I$vrpn_dir/quat"; $vrpn_library = "-L$vrpn_dir/lib_$config_arch"; $vrpn_libs = "-lvrpn -lquat"; @vrpn_cc = (); @vrpn_cu = (); @vrpn_ccpp = ('P_VRPNTracker.C', 'P_VRPNButtons.C', 'P_VRPNFeedback.C', 'P_RotateTool.C'); @vrpn_h = ('P_VRPNTracker.h', 'P_VRPNButtons.h', 'P_VRPNFeedback.h', 'P_RotateTool.h'); @vrpn_extra = (); ####################### # OPTIONAL COMPONENT: EVL/NCSA CAVE support # This may be commented out if not required. # This will require access to the cave library and headers, and will # result in unique CAVE objects being used in the program. ####################### if ( $config_cave && !$config_opengl) { die "CAVE option requires OPENGL!"; } $cave_defines = "-DVMDCAVE"; $cave_dir = "$vmd_library_dir/cave"; $cave_include = "-I$cave_dir/include"; $cave_library = "-L$cave_dir/lib_$config_arch"; # choose which library to link against # someday we might need to add -lsnd back in, but not presently if ( $config_opengl ) { if ($config_arch eq "IRIX6_64") { $cave_libs = "-lcave_ogl_64 -lXi -lGL"; } elsif ($config_arch eq "IRIX6") { $cave_libs = "-lcave_ogl_n32 -lXi -lGL"; } else { $cave_libs = "-lcave_ogl -lXi"; } } else { $cave_libs = "-lcave"; } @cave_cc = (); @cave_cu = (); @cave_ccpp = ('CaveDisplayDevice.C', 'CaveScene.C', 'CaveRoutines.C', 'P_CaveTracker.C', 'P_CaveButtons.C' ); @cave_h = ('CaveDisplayDevice.h', 'CaveRoutines.h', 'CaveScene.h', 'P_CaveTracker.h', 'P_CaveButtons.h' ); @cave_extra = (); ####################### # OPTIONAL COMPONENT: FreeVR support # This may be commented out if not required. # This will require access to the FreeVR library and headers, and will # result in unique FreeVR objects being used in the program. ####################### if ( $config_freevr && !$config_opengl) { die "FREEVR option requires OPENGL!"; } $freevr_defines = "-DVMDFREEVR"; $freevr_dir = "$vmd_library_dir/freevr"; $freevr_include = "-I$freevr_dir/include"; $freevr_library = "-L$freevr_dir/lib_$config_arch"; # choose which library to link against if (($config_arch eq "LINUX") || ($config_arch eq "LINUXAMD64")) { if ($config_pthreads) { if ($config_lp64) { $freevr_libs = "-lfreevr_64pt -lXi"; } else { $freevr_libs = "-lfreevr_64 -lXi"; } } else { if ($config_lp64) { $freevr_libs = "-lfreevr_32pt -lXi"; } else { $freevr_libs = "-lfreevr_32 -lXi"; } } } else { $freevr_libs = "-lfreevr -lXi"; } @freevr_cc = (); @freevr_cu = (); @freevr_ccpp = ('FreeVRDisplayDevice.C', 'FreeVRScene.C', 'FreeVRRoutines.C', 'P_FreeVRTracker.C', 'P_FreeVRButtons.C' ); @freevr_h = ('FreeVRDisplayDevice.h', 'FreeVRRoutines.h', 'FreeVRScene.h', 'P_FreeVRTracker.h', 'P_FreeVRButtons.h' ); @freevr_extra = (); ####################### # OPTIONAL COMPONENT: ACTC Triangle Stripification Library # This option enables the use of ACTC for acceleration of surface # primitives. ####################### $actc_defines = "-DVMDACTC"; $actc_dir = "$vmd_library_dir/actc"; $actc_include = "-I$actc_dir/include"; $actc_library = "-L$actc_dir/lib_$config_arch"; $actc_libs = "-lactc"; @actc_cc = (); @actc_cu = (); @actc_ccpp = (); @actc_h = (); @actc_extra = (); ####################### # OPTIONAL COMPONENT: NVIDIA CUDA GPU acceleration API # This option enables the use of CUDA GPU acceleration functions. ####################### $cuda_defines = "-DVMDCUDA"; $cuda_dir = ""; $cuda_include = ""; $cuda_library = ""; $cuda_libs = "-lcuda -lcudart"; @cuda_cc = (); @cuda_cu = ('CUDAUtil.cu', 'CUDAVolCPotential.cu'); @cuda_ccpp = (); @cuda_h = ('CUDAKernels.h'); @cuda_extra = (); ####################### # OPTIONAL COMPONENT: NetCDF I/O Library (Used by cdfplugin) ####################### $netcdf_defines = ""; $netcdf_dir = "$vmd_library_dir/netcdf"; $netcdf_include = "-I$netcdf_dir/include"; $netcdf_library = "-L$netcdf_dir/lib_$config_arch"; $netcdf_libs = "-lnetcdf"; @netcdf_cc = (); @netcdf_cu = (); @netcdf_ccpp = (); @netcdf_h = (); @netcdf_extra = (); ####################### # OPTIONAL COMPONENT: Contributed VMD code # This option enables contributed code from the VMD user community. # Not all contributed code can be included in all VMD distributions due # to restrictions placed on the code by its author(s). This config option # enables/disables these contributed codes in a semi-nice way. ####################### $contrib_defines = "-DVMDCONTRIB"; $contrib_dir = ""; # "$vmd_library_dir/contrib"; $contrib_include = ""; # "-I$contrib_dir/include"; $contrib_library = ""; # "-L$contrib/lib_$config_arch"; $contrib_libs = ""; @contrib_cc = (); @contrib_cu = (); @contrib_ccpp = (); @contrib_h = (); @contrib_extra = (); ################### system supplied sources and libraries # these are the last libraries listed on the link line, and should # satisfy any needs of the other libraries. $system_defines = ""; $system_dir = ""; $system_include = "-I."; $system_library = ""; if ( $config_gcc ) { $system_libs = "-ll -lm"; } else { $system_libs = "-lm"; } @system_cc = (); @system_cu = (); @system_ccpp = (); @system_h = (); @system_extra = (); ################### # OPTIONAL COMPONENT: POSIX Threads support ################### $pthreads_defines = "-DVMDTHREADS -DUSEPOSIXTHREADS -D_REENTRANT"; $pthreads_dir = ""; $pthreads_include = ""; $pthreads_library = ""; $pthreads_libs = "-lpthread"; @pthreads_cc = (); @pthreads_cu = (); @pthreads_ccpp = (); @pthreads_h = (); @pthreads_extra = (); ################### # OPTIONAL COMPONENT: Python support ################### $python_defines = "-DVMDPYTHON"; $python_dir = "$vmd_library_dir/python"; $python_include = "-I$python_dir/lib_$config_arch/include/python2.2"; $python_library = "-L$python_dir/lib_$config_arch/lib/python2.2/config"; $python_libs = "-lpython2.2 -lpthread"; @python_h = ('PythonTextInterp.h', 'VMDTkinterMenu.h', 'py_commands.h', 'py_molecule.h'); @python_ccpp = ('PythonTextInterp.C', 'VMDTkinterMenu.C', 'py_animate.C', 'py_atomsel.C', 'py_atomselection.C', 'py_axes.C', 'py_color.C', 'py_commands.C', 'py_display.C', 'py_graphics.C', 'py_imd.C', 'py_label.C', 'py_material.C', 'py_menu.C', 'py_molecule.C', 'py_molrep.C', 'py_mouse.C', 'py_render.C', 'py_trans.C'); ################### # OPTIONAL COMPONENT: Swig interface ################### $swig_defines = "-DVMDSWIG"; $swig_include = ""; $swig_cflags = ""; $swig_library = ""; $swig_libs = ""; @swig_h = (); @swig_ccpp = (); # Interfaces for each language are enabled separately. if ( $config_python ) { push(@swig_ccpp, 'vmd_python.C'); } ################### # OPTIONAL COMPONENT: Numeric Python extension # ################# # Numeric requires Python if ( $config_numeric && !$config_python) { die "NUMPY option requires PYTHON!"; } $numeric_defines = "-DVMDNUMPY"; $numeric_include = ""; $numeric_library = ""; $numeric_libs = ""; @numeric_h = ""; @numeric_ccpp = ('py_numeric.C'); ################### # OPTIONAL COMPONENT: RPM build support # ################# # allow passing build flags from rpmbuild $rpm_optflags = ""; if ( $config_rpm ) { $rpm_optflags = "$ENV{RPM_OPT_FLAGS}"; } ################### standard sources $vmd_defines = "-DVMDSURF -DVMDMSMS -DVMDFIELDLINES -DVMDVOLUMETEXTURE $tcl_defines"; #$vmd_defines = "-DVMDWITHCARBS -DVMDSURF -DVMDMSMS -DVMDFIELDLINES -DVMDVOLUMETEXTURE $tcl_defines"; $vmd_include = "$tcl_include"; $vmd_library = "$tcl_library"; $vmd_libs = "$tcl_libs"; @vmd_cc = ('hash.c', 'inthash.c', 'intstack.c', 'vmdsock.c', 'vmddlopen.c', 'pcre.c', 'fitrms.c', @tcl_cc, @tk_cc); @vmd_ccpp = ( 'Animation.C', 'ArtDisplayDevice.C', 'AtomColor.C', 'AtomParser.C', 'AtomLexer.C', 'AtomRep.C', 'AtomSel.C', 'Axes.C', 'BaseMolecule.C', 'BondSearch.C', 'CmdAnimate.C', 'CmdColor.C', 'CmdDisplay.C', 'CmdLabel.C', 'CmdMaterial.C', 'CmdMenu.C', 'CmdMol.C', 'CmdRender.C', 'CmdTrans.C', 'CommandQueue.C', 'CoorPluginData.C', 'CUDAAccel.C', 'DisplayDevice.C', 'Displayable.C', 'DisplayRocker.C', 'DispCmds.C', 'DrawMolecule.C', 'DrawMolItem.C', 'DrawMolItem2.C', 'DrawMolItemRibbons.C', 'DrawMolItemMSMS.C', 'DrawMolItemRings.C', 'DrawMolItemSurface.C', 'DrawMolItemVolume.C', 'DrawForce.C', 'DrawRingsUtils.C', 'FileRenderList.C', 'FileRenderer.C', 'FPS.C', 'GelatoDisplayDevice.C', 'GeometryAngle.C', 'GeometryAtom.C', 'GeometryBond.C', 'GeometryDihedral.C', 'GeometryList.C', 'GeometryMol.C', 'GeometrySpring.C', 'Inform.C', 'ImageIO.C', 'Isosurface.C', 'JRegex.C', 'JString.C', 'macosxvmdstart.C', 'MaterialList.C', 'Matrix4.C', 'Measure.C', 'Molecule.C', 'MoleculeList.C', 'MoleculeGraphics.C', 'MolFilePlugin.C', 'Mouse.C', 'MSMSInterface.C', 'PeriodicTable.C', 'P_JoystickTool.C', 'P_TugTool.C', 'P_GrabTool.C', 'P_PrintTool.C', 'P_PinchTool.C', 'P_UIVR.C', 'P_Buttons.C', 'P_Tracker.C', 'P_Tool.C', 'P_CmdTool.C', 'P_SensorConfig.C', 'ParseTree.C', 'PickList.C', 'PickModeAddBond.C', 'PickModeCenter.C', 'PickModeForce.C', 'PickModeList.C', 'PickModeMolLabel.C', 'PickModeMove.C', 'PickModeUser.C', 'PlainTextInterp.C', 'PluginMgr.C', 'POV3DisplayDevice.C', 'PSDisplayDevice.C', 'VMDQuat.C', 'RadianceDisplayDevice.C', 'RayShadeDisplayDevice.C', 'R3dDisplayDevice.C', 'RenderManDisplayDevice.C', 'Scene.C', 'SnapshotDisplayDevice.C', 'SpringTool.C', 'Stage.C', 'STLDisplayDevice.C', 'Stride.C', 'Surf.C', 'SymbolTable.C', 'TachyonDisplayDevice.C', 'Timestep.C', 'UIObject.C', 'UIText.C', 'VMDApp.C', 'VMDCollab.C', 'VMDDir.C', 'VMDDisplayList.C', 'VMDMenu.C', 'VMDTitle.C', 'VMDThreads.C', 'VolCPotential.C', 'VolMap.C', 'VolMapCreate.C', 'VolumetricData.C', 'VolumeTexture.C', 'VrmlDisplayDevice.C', 'Vrml2DisplayDevice.C', 'WavefrontDisplayDevice.C', 'utilities.C', 'vmd.C', 'vmdmain.C', @tcl_ccpp, @tk_ccpp ); ################### standard headers # VMD header files @vmd_h = ( 'Animation.h', 'ArtDisplayDevice.h', 'Atom.h', 'AtomColor.h', 'AtomParser.h', 'AtomRep.h', 'AtomSel.h', 'Axes.h', 'BaseMolecule.h', 'BondSearch.h', 'CmdAnimate.h', 'CmdColor.h', 'CmdDisplay.h', 'CmdLabel.h', 'CmdMaterial.h', 'CmdMenu.h', 'CmdMol.h', 'CmdRender.h', 'CmdTrans.h', 'Command.h', 'CommandQueue.h', 'CoorData.h', 'CUDAAccel.h', 'CoorPluginData.h', 'DepthSortObj.h', 'DispCmds.h', 'DisplayDevice.h', 'Displayable.h', 'DisplayRocker.h', 'DrawMolecule.h', 'DrawMolItem.h', 'DrawMolItemSolventPoints.data', 'DrawForce.h', 'GelatoDisplayDevice.h', 'FPS.h', 'FileRenderList.h', 'FileRenderer.h', 'Fragment.h', 'GeometryAngle.h', 'GeometryAtom.h', 'GeometryBond.h', 'GeometryDihedral.h', 'GeometryList.h', 'GeometryMol.h', 'GeometrySpring.h', 'Inform.h', 'ImageIO.h', 'Isosurface.h', 'JRegex.h', 'JString.h', 'macosxvmdstart.h', 'MaterialList.h', 'Matrix4.h', 'Measure.h', 'Molecule.h', 'MoleculeGraphics.h', 'MoleculeList.h', 'MolFilePlugin.h', 'Mouse.h', 'MSMSInterface.h', 'NameList.h', 'PeriodicTable.h', 'P_JoystickTool.h', 'P_TugTool.h', 'P_PinchToo.h', 'P_GrabTool.h', 'P_PrintTool.h', 'P_Feedback.h', 'P_UIVR.h', 'P_Buttons.h', 'P_Tracker.h', 'P_CmdTool.h', 'P_SensorConfig.h', 'P_Tool.h', 'ParseTree.h', 'PickList.h', 'PickMode.h', 'PickModeAddBond.h', 'PickModeCenter.h', 'PickModeForce.h', 'PickModeList.h', 'PickModeMolLabel.h', 'PickModeMove.h', 'Pickable.h', 'PlainTextInterp.h', 'PluginMgr.h', 'PointerTool.h', 'POV3DisplayDevice.h', 'PSDisplayDevice.h', 'VMDQuat.h', 'RadianceDisplayDevice.h', 'RayShadeDisplayDevice.h', 'R3dDisplayDevice.h', 'ResizeArray.h', 'RenderManDisplayDevice.h', 'Residue.h', 'Scene.h', 'SnapshotDisplayDevice.h', 'SortableArray.h', 'SpringTool.h', 'Stack.h', 'Stage.h', 'STLDisplayDevice.h', 'Stride.h', 'Surf.h', 'SymbolTable.h', 'TachyonDisplayDevice.h', 'TextEvent.h', 'TextInterp.h', 'Timestep.h', 'UIObject.h', 'UIText.h', 'VMDApp.h', 'VMDDir.h', 'VMDDisplayList.h', 'VMDMenu.h', 'VMDTitle.h', 'VMDThreads.h', 'VolCPotential.h', 'VolMap.h', 'VolMapCreate.h', 'VolumetricData.h', 'VolumeTexture.h', 'VrmlDisplayDevice.h', 'Vrml2DisplayDevice.h', 'WavefrontDisplayDevice.h', 'utilities.h', 'pcre.h', 'pcreinternal.h', 'pcretables.h', 'vmdsock.h', 'fitrms.h', @tcl_h, @tk_h ); # VMD yacc and lex files. There is only one of each, # and they are used for the atom selection parser @vmd_yacc = ('AtomParser.y'); @vmd_lex = ('AtomLexer.l'); # VMD data files, default templates that users can copy # to their home directory for things like .vmdrc and # .vmdsensors. These also provide the default behavior # in the case that a user has no such files in their home # directory. @vmd_data = ('.vmdsensors', '.vmdrc'); $vmd_bin = "vmd"; @vmd_extra = (@tcl_extra); @vmd_other_exe = ( "$vmd_library_dir/stride/stride_$config_arch", "$vmd_library_dir/surf/surf_$config_arch", "$vmd_library_dir/tachyon/tachyon_$config_arch" ); @vmd_other_names = ("stride_$config_arch"); @vmd_main_dir_files = ('Announcement', 'FEEDBACK', 'LICENSE', 'README', 'configure'); ################## ARCHITECTURE-SPECIFIC VERSIONS ############### if ($config_arch eq "AIX4") { if ($config_lp64) { print "No LP64 support for this platform currently.\n"; } if ($config_gcc) { $arch_cc = "gcc"; $arch_ccpp = "g++"; $arch_cppopts = $arch_no_math_float; $arch_lex = "flex"; # $arch_yacc = "bison -b y"; # If standard yacc doesn't work } else { $arch_cc = "xlc"; $arch_ccpp = "xlC"; # $arch_opt_flag = "-O -qmaxmem=16384"; $arch_opt_flag = ""; $arch_cppopts = "-D_H_ACCESS=1" . $arch_no_math_float; $arch_lex = "flex"; # has problems with the vendor lex... } $opengl_libs = "-lGL -lGLU -lX11 -lXext"; $mesa_libs = "-lMesaGL -lMesaGLU -lXext"; # needed for plugins $arch_lopts = "-ldl"; } if ($config_arch eq "AIX5" || $config_arch eq "AIX5_64") { if ($config_lp64) { # -64 64-bit mode print "Configured for -64 64-bit build.\n"; $arch_cc = "xlc"; $arch_ccpp = "xlC"; $arch_copts = "-O -q64 -qarch=com -qtune=pwr4"; $arch_opt_flag = "-O -q64 -qarch=com -qtune=pwr4"; # $arch_cppopts = "-D_H_ACCESS=1" . $arch_no_math_float; $arch_cppopts = "-D_H_ACCESS=1"; $opengl_libs = "-lGL -lGLU -lX11 -lXext"; $mesa_libs = "-lMesaGL -lMesaGLU -lXext"; } else { if ($config_gcc) { $arch_cc = "gcc"; $arch_ccpp = "g++"; # $arch_cppopts = $arch_no_math_float; $arch_cppopts = ""; $arch_lex = "flex"; # $arch_yacc = "bison -b y"; # If standard yacc doesn't work } else { $arch_cc = "xlc"; $arch_ccpp = "xlC"; # $arch_opt_flag = "-O -qmaxmem=16384"; $arch_opt_flag = ""; # $arch_cppopts = "-D_H_ACCESS=1" . $arch_no_math_float; $arch_cppopts = "-D_H_ACCESS=1"; } $opengl_libs = "-lGL -lGLU -lX11 -lXext"; $mesa_libs = "-lMesaGL -lMesaGLU -lXext"; } $arch_lex = "flex"; # has problems with the vendor lex... # needed for plugins $arch_lopts = "-ldl"; } if ($config_arch eq "FREEBSD") { $def_imageviewer="display %s"; # XFree 4.0 Direct Rendering Interface and GLX $opengl_dir = "/usr/X11R6"; $opengl_include = "-I$opengl_dir/include"; $opengl_library = "-L$opengl_dir/lib"; $opengl_libs = "-lGL -lGLU"; $arch_lex = "flex"; $arch_yacc = "bison -b y -d "; # If standard yacc doesn't work $arch_cc = "gcc"; $arch_ccpp = "g++"; $arch_depend_flag = "-MM"; $arch_shld = "ld -shared"; $arch_shlibname = "so"; $arch_shcppopts = "-fPIC"; $arch_shldopts = "-L/usr/local/lib -L/usr/X11R6/lib"; $arch_opt_flag = "-m32 -fno-for-scope -Wno-deprecated -Wall -O3"; $arch_copts = "-m32 -Wall -O3"; if ($config_static) { $arch_lopts = "-static"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11"; } else { $arch_lopts = ""; $mesa_libs = "-lGL -lGLU -L/usr/X11R6/lib -lXext -lX11"; } if ($config_shared) { $arch_lopts = "-shared"; } # a hack - to be removed, just keeps make happy $arch_template_repository = "foobar"; # this is to make tcl happy, # also needed for plugins $system_libs .= " -ldl"; if ($config_python) { # this is to make python happy $system_libs .= " -lutil"; } # this is necessary for the embedded Python interpreter to dynamically # load shared libraries. It increases the size of the binary by 200k. $arch_lopts .= " -Xlinker -export-dynamic"; } if ($config_arch eq "HPUX11") { if ($config_lp64) { print "No LP64 support for this platform currently.\n"; } $opengl_dir = "/opt/graphics/OpenGL"; $opengl_include = "-I$opengl_dir/include"; $opengl_library = "-L$opengl_dir/lib"; $opengl_libs = "-lGL -lGLU -lX11 -lXext"; $mesa_libs = "-lMesaGL -lMesaGLU -lXext"; $arch_opt_flag = "+O2"; $arch_copts = "+O2 +DAportable -Ae"; $arch_cppopts = "+DAportable +a1"; # in tcl8.0 we can load shared libraries at run time, so we need -Wl,-E $arch_lopts = "-Wl,-E -lmalloc"; $arch_template_repository = "ptrepository"; # for compiling with HP aCC compiler: if ($config_acc) { $arch_ccpp = "aCC"; $arch_cppopts = ""; } # for compiling with g++: if ($config_gcc) { $arch_cc = "gcc"; $arch_ccpp = "g++"; $arch_copts = ""; $arch_cppopts = ""; $arch_lopts = "-L/lib/pa1.1 -lmalloc -ldld"; } } if ($config_arch eq "IRIX6" || $config_arch eq "IRIX6_64") { $def_imageviewer = "ipaste %s"; $arch_debug_flag = "-g"; $arch_depend_flag = " -M -c"; $arch_template_repository = "ii_files"; $arch_shld = "ld -shared"; $arch_shlibname = "so"; $arch_shcppopts = "-KPIC"; if ($config_lp64) { # -64 64-bit mode print "Configured for -64 64-bit build.\n"; $arch_opt_flag = "-64 -mips4 -KPIC -O3 -woff 1110,1167,3255,3262 -G 0 -OPT:Olimit=8192"; $arch_copts = "-64 -mips4 -KPIC -O3 -G 0"; $arch_cppopts = "-I/usr/include/CC"; $arch_shldopts = "-64 -mips4"; # SGI linker doesn't figure things out for itself # requires us to list -lGL multiple times... argh! if ($config_opengl) { $arch_lopts = "-lGL -64 -mips4 -KPIC -O3 -L/usr/lib64"; } else { $arch_lopts = "-64 -mips4 -KPIC -O3 -L/usr/lib64"; } } else { # -n32 32-bit mode print "Configured for -n32 32-bit build.\n"; $arch_opt_flag = "-n32 -mips3 -KPIC -O3 -woff 1110,1167,3255,3262 -OPT:Olimit=8192"; $arch_copts = "-n32 -mips3 -KPIC -O3 "; $arch_cppopts = "-I/usr/include/CC"; $arch_shldopts = "-n32 -mips3"; # SGI linker doesn't figure things out for itself # requires us to list -lGL multiple times... argh! if ($config_opengl) { $arch_lopts = "-lGL -n32 -mips3 -KPIC -O3 "; } else { $arch_lopts = "-n32 -mips3 -KPIC -O3 "; } } } if ($config_arch eq "LINUX") { $def_imageviewer="display %s"; if ($config_lp64) { print "No LP64 ABI on this platform currently.\n"; } $fltk_libs = "-lfltk -lX11 -lXft"; # XFree 4.0 Direct Rendering Interface and GLX $opengl_dir = "/usr/X11R6"; $opengl_include = "-I$opengl_dir/include"; $opengl_library = "-L$opengl_dir/lib"; $opengl_libs = "-lGL -lGLU"; # $opengl_libs = "-L/usr/X11R6/lib -lGL -lGLU -lXext -lX11"; $arch_cc = "gcc"; $arch_ccpp = "g++"; # test hack to statically link libstd++ # $arch_ccpp = "gcc"; $arch_depend_flag = "-MM"; $arch_shld = "ld -shared"; $arch_shlibname = "so"; $arch_shcppopts = "-fPIC"; $arch_shldopts = ""; $arch_opt_flag = "-m32 -fno-for-scope -Wno-deprecated -Wall -O3"; $arch_copts = "-m32 -Wall -O3"; if ($config_swig) { $swig_cflags .= " -fno-strict-aliasing"; } if ($config_static) { $arch_lopts = "-static"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11"; } else { $arch_lopts = ""; # test hack to statically link libstd++ # $arch_lopts = "-lstdc++"; # -rpath causes problems for people running Chromium.. # $arch_lopts = "-Wl,-rpath,/usr/X11R6/lib -Wl,-rpath,/usr/local/lib"; $mesa_libs = "-lGL -lGLU -L/usr/X11R6/lib -lXext -lX11"; } if ($config_shared) { $arch_lopts = "-shared"; } # UIText #include's but it doesn't exist for Linux $arch_cppopts = ""; if ($config_cuda) { $arch_nvccflags = "-O3 -Xcompiler \"-m32\" $cuda_include"; } # a hack - to be removed, just keeps make happy $arch_template_repository = "foobar"; # this is to make tcl happy # also needed for plugins $system_libs .= " -ldl"; if ($config_python) { # this is to make python happy $system_libs .= " -lutil"; } # this is necessary for the embedded Python interpreter to dynamically # load shared libraries. It increases the size of the binary by 200k. $arch_lopts .= " -Xlinker -export-dynamic"; } if ($config_arch eq "LINUXALPHA") { $def_imageviewer="display %s"; if ($config_lp64) { print "LP64 ABI is already the default on this platform.\n"; } # for compiling with g++: if ($config_gcc) { $arch_cc = "gcc"; $arch_ccpp = "g++"; $arch_opt_flag = "-Wall -O3 -ffast-math"; $arch_depend_flag = "-MM"; $arch_copts = "-Wall -O3 -ffast-math"; $arch_template_repository = "foobar"; if ($config_swig) { $swig_cflags .= " -fno-strict-aliasing"; } # so far only STATIC version tested if ($config_static) { $arch_lopts = "-static"; } else { $arch_lopts = "-Wl,-rpath,/usr/X11R6/lib -Wl,-rpath,/usr/local/lib"; } } else { # for compiling with Compaq ccc and cxx compilers: $arch_cc = "ccc"; $arch_ccpp = "cxx"; $arch_opt_flag = "-w0 -O4 -fp_reorder -nocleanup -tune host"; $arch_copts = "-fast -O4 -tune host"; $arch_depend_flag = "-M"; $arch_cppopts = "-msg_quiet "; $arch_template_repository = "cxx_repository"; if ($config_static) { $arch_lopts = "-non_shared"; } } $arch_lex = "flex"; # has problems with vendor lex $opengl_libs = "-L/usr/shlib -lGL -lGLU -lXext -lX11"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11"; # this is to make tcl happy # also needed for plugins $system_libs .= " -ldl"; } if ($config_arch eq "LINUXAMD64") { $def_imageviewer="display %s"; if ($config_lp64) { print "LP64 ABI is already the default on this platform.\n"; } # for compiling with g++: $arch_cc = "gcc"; $arch_ccpp = "g++"; $arch_opt_flag = "-m64 -fno-for-scope -Wno-deprecated -Wall -O6 -ffast-math"; $arch_depend_flag = "-MM"; $arch_copts = "-m64 -Wall -O6 -ffast-math"; $arch_template_repository = "foobar"; if ($config_swig) { $swig_cflags .= " -fno-strict-aliasing"; } # so far only STATIC version tested if ($config_static) { $arch_lopts = "-static"; } else { $arch_lopts = "-rdynamic"; } $arch_lex = "flex"; # has problems with vendor lex $opengl_libs = "-L/usr/X11R6/lib64 -lGL -lGLU -lX11"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib64 -lXext -lX11"; # this is to make tcl happy # also needed for plugins $system_libs .= " -ldl"; if ($config_python) { # this is to make python happy $system_libs .= " -lutil"; } } if ($config_arch eq "LINUXIA64") { $def_imageviewer="display %s"; if ($config_lp64) { print "LP64 ABI is already the default on this platform.\n"; } if ($config_icc) { # for compiling with Intel C/C++: $arch_cc = "icc"; $arch_ccpp = "icpc"; $arch_opt_flag = "-O2 -Wall"; $arch_depend_flag = "-MM"; $arch_copts = "-O2 -Wall"; $arch_template_repository = "foobar"; if ($config_static) { # link everything statically (this won't work due to libGL issues) $arch_lopts = "-static"; } else { # link the Intel compiler libraries statically, and use the GCC C++ libs # $arch_lopts = "-static-libcxa -cxxlib-gcc"; # dynamically link all libs, and use Intel libs where possible $arch_lopts = "-rdynamic"; } $arch_lex = "flex"; # has problems with vendor lex $opengl_libs = "-L/usr/X11R6/lib -lGL -lGLU -lX11"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11"; # this is to make tcl happy # also needed for plugins $system_libs .= " -ldl"; if ($config_python) { # this is to make python happy $system_libs .= " -lutil"; } } else { # for compiling with GCC: $arch_cc = "cc"; $arch_ccpp = "c++"; $arch_opt_flag = "-O2 -Wall"; $arch_depend_flag = "-MM"; $arch_copts = "-O2 -Wall"; $arch_template_repository = "foobar"; if ($config_static) { # link everything statically (this won't work due to libGL issues) $arch_lopts = "-static"; } else { $arch_lopts = "-rdynamic"; } $arch_lex = "flex"; # has problems with vendor lex $opengl_libs = "-L/usr/X11R6/lib -lGL -lGLU -lX11"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11"; # this is to make tcl happy # also needed for plugins $system_libs .= " -ldl"; if ($config_python) { # this is to make python happy $system_libs .= " -lutil"; } } } if ($config_arch eq "LINUXPPC") { $def_imageviewer="display %s"; if ($config_lp64) { print "No LP64 ABI on this platform currently.\n"; } $arch_cc = "gcc"; $arch_ccpp = "g++"; $arch_depend_flag = "-MM"; $arch_opt_flag = "-Wall -O3 -ffast-math"; $arch_copts = "-Wall -O3 -ffast-math"; if ($config_static) { $arch_lopts = "-static" } else { $arch_lopts = "-Wl,-rpath,/usr/X11R6/lib -Wl,-rpath,/usr/local/lib"; } $opengl_libs = "-L/usr/X11R6/lib -lGL -lGLU -lXext -lX11"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11"; $arch_cppopts = ""; # a hack - to be removed, just keeps make happy $arch_template_repository = "foobar"; # this is to make tcl happy # also needed for plugins $system_libs .= " -ldl"; } if ($config_arch eq "MACOSX") { $def_imageviewer="/usr/bin/open %s"; if ($config_lp64) { print "No LP64 ABI on this platform currently.\n"; } # Hack the FLTK paths to use 1.1.7 rather than 1.1.4 $fltk_include = "-I$fltk_dir/fltk-1.1.7"; $fltk_library = "-L$fltk_dir/MACOSX.104"; $fltk_libs = "-lfltk -lX11"; # Set Python paths to use the system-provided Python rather than # our own, since Apple MacOS X 10.4.x or newer includes Python 2.3 # by default. $python_include = "-F/System/Library/Frameworks"; $python_library = ""; $python_libs = "-framework Python -lpthread"; $arch_cc = "cc"; $arch_ccpp = "c++"; $arch_depend_flag = "-MM"; $arch_opt_flag = "-fPIC -Os -ffast-math"; $arch_copts = "-fPIC -Os -ffast-math"; $arch_cppopts = ""; if ($config_static) { $arch_lopts = "-static" } else { $arch_lopts = ""; } # Mesa version uses X11 just like other Unix versions, # but the OpenGL version uses native MacOS X, no X11. if ($config_mesa) { $fltk_libs = "-lfltk-x11 -lX11"; $opengl_include = $opengl_include . " -I/usr/X11R6/include"; $opengl_libs = "-L/usr/X11R6/lib -framework OpenGL -framework AGL -framework Carbon -lXext -lX11"; } elsif (!$config_fltkopengl) { # OpenGL version using X11 just like other Unix versions, # but the normal OpenGL version uses native MacOS X, no X11. $fltk_libs = "-lfltk-x11 -lX11"; $opengl_include = $opengl_include . " -I/usr/X11R6/include"; $opengl_libs = "-L/usr/X11R6/lib -lGLU -lGL -framework Carbon -lXext -lX11"; $tcl_libs = "-ltcl8.4-x11"; if ($config_tk) { $tcl_libs = "-ltk8.4-x11 -lX11 " . $tcl_libs; } $vmd_libs = "$tcl_libs"; } else { ## ## MacOS X native builds using Tcl/Tck frameworks ## ## use the Tcl/Tk frameworks provided by apple, when we use their Python # $tcl_include = "-F/System/Library/Frameworks"; # $tcl_library = "-F/System/Library/Frameworks"; ## use our own Tcl/Tk framework builds when not compiling with Python, ## as Apple's currently shipping versions are quite buggy $tcl_include = "-I$stock_tcl_include_dir"; if ($config_tk) { $tcl_include .= " -I$stock_tk_library_dir/Tk.framework/Versions/8.4/Headers"; } $tcl_library = "-F$stock_tcl_library_dir"; if ($config_tk) { $tcl_library .= " -F$stock_tk_library_dir"; } $tcl_libs = "-framework Tcl"; if ($config_tk) { $tcl_libs = "-framework Tk " . $tcl_libs; } $vmd_include = "$tcl_include"; $vmd_library = "$tcl_library"; $vmd_libs = "$tcl_libs"; # MacOS 10.3 stuff $vmd_library .= " -Wl,-executable_path . -lmx"; $fltk_libs = "-lfltk_gl -lfltk"; $opengl_include = $opengl_include; $opengl_libs = "-framework OpenGL -framework AGL -framework Carbon"; $arch_compilerc = "/Developer/Tools/Rez"; $arch_rcflags = "-t APPL -o ../MACOSX/vmd_MACOSX vmdmac.r"; } $sdl_libs = "-lSDL -framework OpenGL -framework AGL"; $fltkopengl_libs = "-framework OpenGL -framework AGL"; $mesa_include = $mesa_include . " -I/usr/X11R6/include"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11"; # a hack - to be removed, just keeps make happy $arch_template_repository = "foobar"; # no libm.a on MacOS-X $system_include = $system_include; $system_libs = " -framework Carbon "; } if ($config_arch eq "MACOSXX86") { $def_imageviewer="/usr/bin/open %s"; # Hack the FLTK paths to use 1.1.7 rather than 1.1.4 $fltk_include = "-I$fltk_dir/fltk-1.1.7"; $fltk_library = "-L$fltk_dir/$config_arch"; $fltk_libs = "-lfltk -lX11"; # Set Python paths to use the system-provided Python rather than # our own, since Apple MacOS X 10.4.x or newer includes Python 2.3 # by default. $python_include = "-F/System/Library/Frameworks"; $python_library = ""; $python_libs = "-framework Python -lpthread"; if ($config_lp64) { print "No LP64 ABI on this platform currently.\n"; } $arch_cc = "cc"; $arch_ccpp = "c++"; $arch_depend_flag = "-MM"; $arch_opt_flag = "-fPIC -Os -ffast-math"; $arch_copts = "-fPIC -Os -ffast-math"; $arch_cppopts = ""; if ($config_static) { $arch_lopts = "-static" } else { $arch_lopts = ""; } # Mesa version uses X11 just like other Unix versions, # but the OpenGL version uses native MacOS X, no X11. if ($config_mesa) { $fltk_libs = "-lfltk-x11 -lX11"; $opengl_include = $opengl_include . " -I/usr/X11R6/include"; $opengl_libs = "-L/usr/X11R6/lib -framework OpenGL -framework AGL -framework Carbon -lXext -lX11"; } elsif (!$config_fltkopengl) { # OpenGL version using X11 just like other Unix versions, # but the normal OpenGL version uses native MacOS X, no X11. $fltk_libs = "-lfltk-x11 -lX11"; $opengl_include = $opengl_include . " -I/usr/X11R6/include"; $opengl_libs = "-L/usr/X11R6/lib -lGLU -lGL -framework Carbon -lXext -lX11"; $tcl_libs = "-ltcl8.4-x11"; if ($config_tk) { $tcl_libs = "-ltk8.4-x11 -lX11 " . $tcl_libs; } $vmd_libs = "$tcl_libs"; } else { ## ## MacOS X native builds using Tcl/Tck frameworks ## ## use the Tcl/Tk frameworks provided by apple, when we use their Python # $tcl_include = "-F/System/Library/Frameworks"; # $tcl_library = "-F/System/Library/Frameworks"; ## use our own Tcl/Tk framework builds when not compiling with Python, ## as Apple's currently shipping versions are quite buggy $tcl_include = "-I$stock_tcl_include_dir"; if ($config_tk) { $tcl_include .= " -I$stock_tk_library_dir/Tk.framework/Versions/8.4/Headers"; } $tcl_library = "-F$stock_tcl_library_dir"; if ($config_tk) { $tcl_library .= " -F$stock_tk_library_dir"; } $tcl_libs = "-framework Tcl"; if ($config_tk) { $tcl_libs = "-framework Tk " . $tcl_libs; } $vmd_include = "$tcl_include"; $vmd_library = "$tcl_library"; $vmd_libs = "$tcl_libs"; # MacOS 10.3 stuff $vmd_library .= " -Wl,-executable_path . -lmx"; $fltk_libs = "-lfltk_gl -lfltk"; $opengl_include = $opengl_include; $opengl_libs = "-framework OpenGL -framework AGL -framework Carbon"; $arch_compilerc = "/Developer/Tools/Rez"; $arch_rcflags = "-t APPL -o ../MACOSXX86/vmd_MACOSXX86 vmdmac.r"; } $sdl_libs = "-lSDL -framework OpenGL -framework AGL"; $fltkopengl_libs = "-framework OpenGL -framework AGL"; $mesa_include = $mesa_include . " -I/usr/X11R6/include"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11"; # a hack - to be removed, just keeps make happy $arch_template_repository = "foobar"; # no libm.a on MacOS-X $system_include = $system_include; $system_libs = " -framework Carbon "; } if ($config_arch eq "TRU64") { if ($config_lp64) { print "LP64 ABI is already the default on this platform.\n"; } # for compiling with g++: if ($config_gcc) { $arch_cc = "gcc"; $arch_ccpp = "g++"; $arch_opt_flag = "-O3"; $arch_depend_flag = "-MM"; $arch_copts = ""; $arch_cppopts = ""; $arch_template_repository = "foobar"; # so far only STATIC version tested if ($config_static) { $arch_lopts = "-static"; } else { $arch_lopts = "-Wl,-rpath,/usr/X11R6/lib -Wl,-rpath,/usr/local/lib"; } } else { # for compiling with Compaq/DEC cc and cxx compilers: $arch_cc = "cc"; $arch_ccpp = "cxx"; $arch_opt_flag = "-w0 -O4 -fp_reorder -nocleanup -tune host"; $arch_copts = "-fast -O4 -tune host"; $arch_depend_flag = "-M"; $arch_cppopts = "-msg_quiet "; $arch_template_repository = "cxx_repository"; if ($config_static) { $arch_lopts = "-non_shared"; } } $arch_lex = "flex"; # has problems with vendor lex $opengl_libs = "-L/usr/shlib -lGL -lGLU -lXext -lX11"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/shlib -lXext -lX11"; # this is to make tcl happy $system_libs .= " -ldnet_stub"; } if ($config_arch eq "SOLARIS2" || $config_arch eq "SOLARIS2_64") { $freevr_libs .= " -lrt"; if ($config_gcc) { if ($config_lp64) { print "GCC doesn't support LP64 ABI on this platform currently.\n"; } $arch_ccpp = "g++"; $arch_cc = "gcc"; $arch_opt_flag = "-O"; $arch_copts = "-O"; $arch_debug_flag = "-g"; $arch_depend_flag = "-M"; } elsif ($config_kcc) { if ($config_lp64) { print "KCC doesn't support LP64 ABI on this platform currently.\n"; } $arch_ccpp = "KCC -D__EXTENSIONS__"; $arch_cc = "cc -D__EXTENSIONS__"; $arch_opt_flag = "-fast --backend -xO4 --backend -native"; $arch_copts = "-fast -xO4 -native"; $arch_debug_flag = "-g"; $arch_depend_flag = "-xM"; $arch_template_repository = "SunWS_cache"; } else { # Using Sun's compilers. if ($config_lp64) { print "Configured for a 64-bit build.\n"; $arch_ccpp = "CC -D__EXTENSIONS__"; $arch_cc = "cc -D__EXTENSIONS__"; if ($config_pthreads) { $arch_opt_flag = "-mt -fast -xO3 -native -xarch=v9a"; $arch_copts = "-mt -fast -xO3 -native -xarch=v9a"; } else { $arch_opt_flag = "-fast -xO3 -native -xarch=v9a"; $arch_copts = "-fast -xO3 -native -xarch=v9a"; } $arch_debug_flag = "-g"; $arch_depend_flag = "-xM"; $arch_template_repository = "SunWS_cache"; } else { print "Configured for a 32-bit build.\n"; $arch_ccpp = "CC -D__EXTENSIONS__"; $arch_cc = "cc -D__EXTENSIONS__"; if ($config_pthreads) { $arch_opt_flag = "-mt -fast -xO3 -native -xarch=v8plusa"; $arch_copts = "-mt -fast -xO3 -native -xarch=v8plusa"; } else { $arch_opt_flag = "-fast -xO3 -native -xarch=v8plusa"; $arch_copts = "-fast -xO3 -native -xarch=v8plusa"; } $arch_debug_flag = "-g"; $arch_depend_flag = "-xM"; $arch_template_repository = "SunWS_cache"; } } # if compiling on Solaris 10, use this setting instead. $arch_cppopts = ""; # $arch_cppopts = $arch_no_math_float; if ($config_static) { $arch_lopts = "-Bstatic -lsocket -lnsl"; } else { $arch_lopts = "-lsocket -lnsl -ldl"; } $opengl_dir = "/usr/openwin"; $opengl_include = "-I$opengl_dir/include"; if ($config_lp64) { $opengl_library = "-L$opengl_dir/lib/sparcv9"; } else { $opengl_library = "-L$opengl_dir/lib"; } $opengl_libs = "-lGL -lGLU -lX11 -lXext"; $mesa_include = $mesa_include . " -I/usr/openwin/include"; if ($config_lp64) { $mesa_library = $mesa_library . " -L/usr/openwin/lib/sparcv9"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/openwin/lib/sparcv9 -lXext -lX11"; } else { $mesa_library = $mesa_library . " -L/usr/openwin/lib"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/openwin/lib -lXext -lX11"; } } if ($config_arch eq "SOLARISX86" || $config_arch eq "SOLARISX86_64") { if ($config_gcc) { if ($config_lp64) { die "No LP64 gcc for this platform currently.\n"; } $arch_ccpp = "g++"; $arch_cc = "gcc"; # XXX gcc/g++ 2.95 and newer need -fpermissive since the X11 headers # on Solaris (and other systems) are broken and still assume that missing # types will default to int.... When they fix this in future revs of Solaris, # we can remove this flag. See: http://gcc.gnu.org/fom_serv/cache/25.html $arch_opt_flag = "-Wall -O -fpermissive"; $arch_copts = "-Wall -O"; $arch_debug_flag = "-g"; $arch_depend_flag = "-M"; $arch_template_repository = "foobar"; } else { # Using Sun's compilers if ($config_lp64) { print "Configured for a 64-bit build.\n"; $arch_ccpp = "CC -D__EXTENSIONS__"; $arch_cc = "cc -D__EXTENSIONS__"; if ($config_pthreads) { $arch_opt_flag = "-mt -fast -xO2 -xarch=native64"; $arch_copts = "-mt -fast -xO3 -xarch=native64"; } else { $arch_opt_flag = "-fast -xO2 -xarch=native64"; $arch_copts = "-fast -xO3 -xarch=native64"; } $arch_debug_flag = "-g"; $arch_depend_flag = "-xM"; $arch_template_repository = "SunWS_cache"; } else { print "Configured for a 32-bit build.\n"; $arch_ccpp = "CC -D__EXTENSIONS__"; $arch_cc = "cc -D__EXTENSIONS__"; if ($config_pthreads) { $arch_copts = "-mt -fast -xO3 -native"; $arch_opt_flag = "-mt -fast -xO2 -native"; } else { $arch_copts = "-fast -xO3 -native"; $arch_opt_flag = "-fast -xO2 -native"; } $arch_debug_flag = "-g"; $arch_depend_flag = "-xM"; $arch_template_repository = "SunWS_cache"; } } # if compiling on Solaris 10, use this setting instead. $arch_cppopts = ""; # $arch_cppopts = $arch_no_math_float; if ($config_static) { $arch_lopts = "-Bstatic -lsocket -lnsl"; } else { $arch_lopts = "-lsocket -lnsl -ldl"; } $opengl_dir = "/usr/openwin"; $opengl_include = "-I$opengl_dir/include"; if ($config_lp64) { $opengl_library = "-L$opengl_dir/lib/amd64"; $opengl_libs = "-lGL -lGLU -lX11 -lXext"; } else { $opengl_library = "-L$opengl_dir/lib"; $opengl_libs = "-lGL -lGLU -lX11 -lXext"; } $mesa_include = $mesa_include . " -I/usr/openwin/include"; if ($config_lp64) { $mesa_library = $mesa_library . " -L/usr/openwin/lib/amd64"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/openwin/lib/amd64 -lXext -lX11"; } else { $mesa_library = $mesa_library . " -L/usr/openwin/lib"; $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/openwin/lib -lXext -lX11"; } } if ($config_arch eq "WIN32") { $arch_ccpp = "g++"; $arch_cc = "gcc"; $arch_opt_flag = "-O"; $arch_debug_flag = "-g"; $arch_depend_flag = "-M"; $arch_copts = ""; $arch_cppopts = $arch_no_math_float; $def_tmpdir="c:\\\\"; $def_imageviewer="explorer %s"; # startup command script file. Read after program initialization. $startupfilename="vmd.rc"; $pystartupfilename="pyvmd.rc"; } if ($config_arch eq "WIN64") { $arch_ccpp = "g++"; $arch_cc = "gcc"; $arch_opt_flag = "-O"; $arch_debug_flag = "-g"; $arch_depend_flag = "-M"; $arch_copts = ""; $arch_cppopts = $arch_no_math_float; $def_tmpdir="c:\\\\"; $def_imageviewer="explorer %s"; # startup command script file. Read after program initialization. $startupfilename="vmd.rc"; } # # If ccache is enabled, add it before the normal command lines (but after # purify. # if ($config_ccache) { $arch_ccpp = "ccache " . $arch_ccpp; $arch_cc = "ccache " . $arch_cc; } # # if purify is enabled, add it before the normal command lines. # if ($config_purify) { if ($config_lp64) { $arch_ccpp = "purify -ptr64 " . $arch_ccpp; $arch_cc = "purify -ptr64 " . $arch_cc; } else { $arch_ccpp = "purify " . $arch_ccpp; $arch_cc = "purify " . $arch_cc; } } ########################### Make config.h #################### # get a pretty date ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); $year += 1900; $config_date = ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")[$mon] . " $mday, $year"; $config_version_msg = "VMD for $config_arch, version $progversion ($config_date)"; ## Bypass making config.h if VMD_NO_CONFIG is set # This is helpful if you are debugging the configure script since # a lot of files depend on config.h, so even minimal changes # (like the date change for the version) causes a major recompile. if (!defined $ENV{'VMD_NO_CONFIG'}) { open(OUTFILE, ">src/config.h") || die "Cannot open config.h: $!\n"; print OUTFILE <doc/vmd_version.txt") || die "Cannot open vmd_version.txt: $!\n"; print OUTFILE ("Build version: " . $progversion . "\n"); close(OUTFILE); ########################### Make vmd_version.tex #################### open(OUTFILE, ">doc/vmd_version.tex") || die "Cannot open vmd_version.tex: $!\n"; print OUTFILE ('\newcommand{\VMDNAME} {' . "vmd" . "}\n"); print OUTFILE ('\newcommand{\VMDDATE} {' . $config_date . "}\n"); print OUTFILE ('\newcommand{\VMDVER} {' . $progversion . "}\n"); print OUTFILE ('\newcommand{\VMDAUTHORS} {' . $authors . "}\n"); print OUTFILE ('\newcommand{\VMDVERSAUTHORS} {' . $versionauthors . "}\n"); close(OUTFILE); ############ main targets (Washington DC, Moscow, Beijing, ....) ## # '' makes the binary # tclindex # clean # install # build ####################### Target requirements ################# # This is tricky. I'm creating functions on the fly for # appending each of the available options to the vmd_ # parameters. Then I will eval the concatenated string. # Since VMD itself uses the same setup everyone else does, # I could use this for everything. However, it is a lot # easier to see how the initial setup works. @DEFINES = (); @INCDIRS = (); @LIBDIRS = (); @LIBS = (); @VMD_CCPP = (); @VMD_CC = (); @VMD_CU = (); @VMD_H = (); sub create_config_option { local($param) = $_[0]; local($if_statement) = ''; $if_statement =<src/$vmd_src_dir/Makefile") || die "Cannot open $vmd_src_dir/Makefile: $!\n"; print OUTFILE< " \$*.o " ..."; \\ \$(CCPP) \$(CPPFLAGS) -c \$< -o $vmd_arch_dir/\$\@ .c.o: \$(ECHO) "Compiling " \$< " --> " \$*.o " ..."; \\ \$(CC) \$(CFLAGS) -c \$< -o $vmd_arch_dir/\$\@ .cu.o: \$(ECHO) "Compiling " \$< " --> " \$*.o " ..."; \\ \$(NVCC) \$(NVCCFLAGS) -c \$< -o $vmd_arch_dir/\$\@ .y.o: .l.o: ########## Targets ### Source targets all default: $config_progname $config_progname: y.tab.h \$(VMD_OBJS) \$(ECHO) "Linking " \$\@ "..."; \\ \$(CD) $vmd_arch_dir ; \\ if [ ! -r ./$arch_template_repository ]; then \\ ln -s $vmd_src_dir/$arch_template_repository ./$arch_template_repository ; \\ fi; \\ \$(CCPP) \$(CPPFLAGS) -I$vmd_src_dir -o \$\@ \$(VMD_OBJS) \$(LOADLIBES) ; \$(COMPILERC) \$(RCFLAGS) install: if [ ! -d "$install_library_dir" ]; then \\ \$(MAKEDIR) "$install_library_dir" ; \\ fi ; \\ if [ ! -d "$install_bin_dir" ]; then \\ \$(MAKEDIR) "$install_bin_dir" ; \\ fi ; \\ if [ ! -d "$install_library_dir"/doc ]; then \\ \$(MAKEDIR) "$install_library_dir"/doc; \\ fi -\$(COPY) ../Announcement "$install_library_dir" -\$(COPY) ../README "$install_library_dir" -\$(COPY) ../LICENSE "$install_library_dir" -\$(COPY) $vmd_doc_dir/ug.pdf "$install_library_dir"/doc if [ -f $install_library_dir/vmd_$config_arch ]; then \\ \$(MOVE) "$install_library_dir/vmd_$config_arch" "$install_library_dir/OLD_vmd_$config_arch" ; \$(DELETE) "$install_library_dir/OLD_vmd_$config_arch" ; fi -\$(COPY) ../$config_arch/vmd_$config_arch "$install_library_dir" -\$(COPY) @vmd_other_exe "$install_library_dir" -\$(CD) ..; \$(TAR) -cf - scripts | \\ (cd "$install_library_dir" ; \$(TAR) -xf -) -\$(CD) $vmd_library_dir; \$(TAR) -cf - scripts | \\ (cd "$install_library_dir" ; \$(TAR) -xf -) -\$(CD) ..; \$(TAR) -cf - python | \\ (cd "$install_library_dir"/scripts ; \$(TAR) -xf -) -\$(CD) ..; \$(TAR) -cf - plugins | \\ (cd "$install_library_dir" ; \$(TAR) -xf -) -\$(CD) ..; \$(TAR) -cf - shaders | \\ (cd "$install_library_dir" ; \$(TAR) -xf -) -\$(COPY) ../data/.vmdrc ../data/.vmdsensors "$install_library_dir" \$(CD) $vmd_bin_dir ; \\ if [ -f run_vmd_tmp ]; then \$(DELETE) run_vmd_tmp; fi ; \\ \$(ECHO) '#!/bin/csh' >> run_vmd_tmp ; \\ \$(ECHO) 'set defaultvmddir="$install_library_dir"' >> run_vmd_tmp ; \\ \$(ECHO) 'set vmdbasename=vmd' >> run_vmd_tmp ; \\ cat $vmd_bin >> run_vmd_tmp ; \\ chmod +x run_vmd_tmp ; \\ \$(COPY) run_vmd_tmp "$install_bin_dir"/$install_name ; \\ \$(DELETE) run_vmd_tmp \$(ECHO) Make sure "$install_bin_dir"/$install_name is in your path. \$(ECHO) "VMD installation complete. Enjoy!" ##### remove most of the cruft clean: \$(CD) $vmd_arch_dir ; \\ \$(DELETE) *.o *.warnings *.depend.old core veryclean: clean swigclean \$(CD) $vmd_arch_dir ; \\ \$(DELETEDIR) $arch_template_repository; \\ \$(DELETE) $config_progname \$(CD) $vmd_src_dir ; \\ \$(DELETE) *.o *.a *~ core; \\ \$(DELETEDIR) $arch_template_repository; \\ \$(DELETE) $config_progname \$(CD) $vmd_doc_dir ; \\ \$(DELETE) *~ core # The '/usr/include' stuff is to reduce checking /usr/include dates depend: y.tab.h if [ "\$(DEPEND)" != "" ]; then \\ echo "Building Makefile dependencies"; \\ \$(ECHO) "Creating " \$(DEPENDFILE) " ..."; \\ if [ -f \$(DEPENDFILE) ]; then \\ \$(MOVE) -f \$(DEPENDFILE) \$(DEPENDFILE).old; \\ fi; \\ touch \$(DEPENDFILE); \\ for i in ZZZ \$(VMD_CCPP) ; do \\ if [ "\$\$i" != "ZZZ" ]; then \\ \$(ECHO) checking dependencies for \$\$i ...; \\ \$(CCPP) \$(DEPEND) \$(CPPFLAGS) \$\$i | \\ sed -e 's/\\/usr\\/include\\/[^ ]*\\..//g' \\ -e 's/\\.\\.\\/lib\\/.*\\/[^ ]*\\..//g' | \\ grep -v '^ *\\\\\$\$' >> \$(DEPENDFILE) ; \\ fi; \\ done; \\ for i in ZZZ \$(VMD_CC) ; do \\ if [ "\$\$i" != "ZZZ" ]; then \\ \$(ECHO) checking dependencies for \$\$i ...; \\ \$(CC) \$(DEPEND) \$(CFLAGS) \$\$i | \\ sed -e 's/\\/usr\\/include\\/[^ ]*\\..//g' \\ -e 's/\\.\\.\\/lib\\/.*\\/[^ ]*\\..//g' | \\ grep -v '^ *\\\\\$\$' >> \$(DEPENDFILE) ; \\ fi; \\ done; \\ \$(ECHO) ParseTree.o AtomLexer.o AtomParser.o: y.tab.h \\ >> \$(DEPENDFILE); \\ \$(COPY) \$(DEPENDFILE) \$(DEPENDFILE).$config_arch ; \\ else \\ \$(ECHO) "Cannot find dependencies; your compiler does not support dependency checking."; \\ fi # to bootstrap without a Makedata.depend file, either # touch Makedata.depend # or change the following line to 'sinclude' include Makedata.depend # Rules for SWIG-generated interface. Ignored unless SWIG option is present include Makefile.swig vmd_python.o: vmd_python.C \$(ECHO) "Compiling " \$< " --> " \$*.o " ..."; \\ \$(CCPP) \$(CPPFLAGS) $swig_cflags -c \$< -o $vmd_arch_dir/\$\@ EOM ; close(OUTFILE); if (! -d $config_arch) { `mkdir $config_arch`; }