VMD is a powerful tool to analyze trajectories of molecular dyanmics simulations. Being a Mac user I always try to get it running on OS X compiled in x64 to be able to open large trajectory files. Compiling VMD for OS X is not always trivial. Here is a code tested on OS X 10.13.6 and OS X 10.14 and compiles bare bones VMD 1.9.3.

#!/bin/bash
#0. tested on mac os 10.13.6, 10.14
#1. install Xcode first
#2. Download vmd source v 1.9.3
#3. Add vmdmac.r to the src directory https://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/0678.html
#Set OSX version manually! - that's important for fltk
export OSX_VER=10.13.6
#compiling fltk
#We need latest development version
cd vmd-1.9.3/lib/fltk
wget http://fltk.org/pub/fltk/snapshots/fltk-1.4.x-r13117.tar.gz
tar -xf fltk-1.4.x-r13117.tar.gz
ln -s fltk-1.4.x-r13117 fltk
ln -s fltk include
cd fltk
./configure --prefix="$PWD/../MACOSXX86_64" --exec-prefix="$PWD/../MACOSXX86_64" --libdir="$PWD/../MACOSXX86_64" CXXFLAGS="-mmacosx-version-min=$OSX_VER" LDFLAGS="-mmacosx-version-min=$OSX_VER"
make -j 8
make install
cd ..
cd ..
cd ..
cd ..
export PLUGINDIR="$PWD/vmd-1.9.3/plugins"
export export TCLINC=-I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers
export export TCLLIB=-L/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers
cd plugins
make   MACOSXX86_64 TCLINC=$TCLINC TCLLIB=$TCLLIB
make   distrib 
cd ../vmd-1.9.3
echo "MACOSXX86_64 LP64 FLTKOPENGL FLTK TK  TCL PTHREADS " > configure.options
#Fix code
sed -i.bak 's/MACOSX/MACOSXX86/g' bin/vmd.sh
sed -i.bak 's/MACOSX/MACOSXX86/g' bin/vmd.csh
export VMDINSTALLBINDIR=$PWD/../../vmd-bin/bin #/usr/local/bin
export VMDINSTALLLIBRARYDIR=$PWD/../../vmd-bin/vmd #/usr/local/lib/$install_name
./configure 
cd src
sed -i.bak 's/fltk-1.3.x/fltk/g' Makefile
sed -i.bak 's%../lib/tk/lib_MACOSXX86_64/Tk.framework/Versions/8.5/Headers%/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers%g' Makefile
make veryclean
make -j 8
make install
$VMDINSTALLBINDIR/vmd

It’s always good to have a more full featured VMD with python support and additional libs. One convenient way is to compile vmd against the conda provided python and other libraries. The example below uses system compiler and frameworks except for python. This makes it easy to install python packages later through conda and they will be available in vmd.

#!/bin/bash
#This build aims at installing VMD with miniconda python components of VMD
#0. tested on mac os 10.13.6, 10.14
#1. installed Xcode
#Install miniconda https://conda.io/miniconda.html
#conda create -n vinst
#source activate vinst 
#conda install python=2.7.10
#2.7.10 matches the version of Framework system Python
#but others should work too if we are linking against the conda libs.
#conda install numpy
#conda install libnetcdf
#conda install libpng
#export PREFIX=/...
export PREFIX=/Users/USER/miniconda3/envs/vinst #modify accordingly
#Set version manually! - that's important for fltk
export OSX_VER=10.14 
#compiling fltk
#We need the latest version
cd vmd-1.9.3/lib/fltk
rm -rf fltk-1.4.x-r13117.tar.gz
rm -rf fltk-1.4.x-r13117
wget http://fltk.org/pub/fltk/snapshots/fltk-1.4.x-r13117.tar.gz
tar -xf fltk-1.4.x-r13117.tar.gz
ln -s fltk-1.4.x-r13117 fltk
ln -s fltk include
cd fltk
./configure --prefix="$PWD/../MACOSXX86_64" --exec-prefix="$PWD/../MACOSXX86_64" --libdir="$PWD/../MACOSXX86_64" CXXFLAGS="-mmacosx-version-min=$OSX_VER" LDFLAGS="-mmacosx-version-min=$OSX_VER"
make clean
make -j 8
make install
cd ..
cd ..
cd ..
cd ..
export PLUGINDIR="$PWD/vmd-1.9.3/plugins"
export export TCLINC=-I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers
export export TCLLIB=-L/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers
cd plugins
make   MACOSXX86_64 TCLINC=$TCLINC TCLLIB=$TCLLIB
make   distrib 
cd ..
#Let's make other libraries
cd vmd-1.9.3/lib/
mkdir -p actc
cd actc
wget https://downloads.sourceforge.net/project/actc/actc-source/1.1-final/actc-1.1.tar.gz
tar -xf actc-1.1.tar.gz
ln -s actc-1.1 include
ln -s actc-1.1 lib_MACOSXX86_64
cd actc-1.1
sed -i.bak 's%#include <malloc.h>%%g' tctest2.c
make CFLAGS=-D__linux__
cd ..
cd ..
#Other potential options
# ACTC         - triangle mesh stripification library for higher speed surfaces
# AVX512       - enable use of AVX512 instructions on target CPU
# CUDA         - NVIDIA CUDA GPU acceleration functions
# OPENCL       - OpenCL CPU/GPU/Accelerator device support
# MPI          - MPI based message passing
# IMD          - include option for connecting to remote MD simulations
# VRPN         - include VRPN tracker lib for spatial trackers
# LIBSBALL     - Direct I/O Spaceball 6DOF input device
# XINERAMA     - Support for Xinerama-optimized full-screen mode
# XINPUT       - X-Windows XInput based Spaceball, Dial box, Button box
# TDCONNEXION  - 3DConnexion MacOS X driver for Spaceball 6DOF input devices #Activate it if drivers are installed
# LIBGELATO    - built-in rendering via Gelato library   
# LIBOPTIX     - built-in accelerated ray tracing for NVIDIA GPUs
# LIBOSPRAY    - built-in accelerated ray tracing for Intel CPUs
# +LIBTACHYON   - built-in raytracing via Tachyon (on CPUs)
cd tachyon
wget http://www.photonlimited.com/~johns/tachyon/files/0.99b6/tachyon-0.99b6.tar.gz
tar -xf tachyon-0.99b6.tar.gz
cd tachyon/unix
make linux-64
cd ..
cd ..
ln -s tachyon/src include
ln -s tachyon/compile/linux-64 lib_MACOSXX86_64
cp tachyon/compile/linux-64/tachyon tachyon_MACOSXX86_64
cd ..
# +LIBPNG       - PNG image output support # This can be installed through conda
# +NETCDF       - NetCDF file I/O library # This can be installed through conda
#Below we add them later to be linked statically
# NOSTATICPLUGINS - disable use of statically linked molfile plugins
# CONTRIB      - user contributed code for VMD which has restrictions
# +TCL          - The Tcl scripting language
# +PYTHON       - The Python scripting language
# +PTHREADS     - POSIX Threads Support
# +NUMPY        - Numeric Python extensions
cd ..
echo "MACOSXX86_64 LP64 FLTKOPENGL FLTK TK  TCL PTHREADS PYTHON NUMPY ACTC COLVARS  LIBTACHYON  LIBPNG NETCDF " > configure.options
#Fix code
sed -i.bak 's/MACOSX$/MACOSXX86/g' bin/vmd.sh
sed -i.bak 's/MACOSX$/MACOSXX86/g' bin/vmd.csh
sed -i.bak 's/__APPLE__/__APPLE__NO/g' src/VMDTkinterMenu.h
sed -i.bak 's/__APPLE__/__APPLE__NO/g' src/PythonTextInterp.h
sed -i.bak 's/__APPLE__/__APPLE__NO/g' src/PythonTextInterp.C
sed -i.bak 's/__APPLE__/__APPLE__NO/g' src/py_commands.h
export VMDINSTALLNAME='vmd_py'
export VMDINSTALLBINDIR=$PREFIX/bin #/usr/local/bin
export VMDINSTALLLIBRARYDIR=$PREFIX/vmd #/usr/local/lib/$install_name
export PYTHON_INCLUDE_DIR=$PREFIX/include/python2.7
export NUMPY_INCLUDE_DIR=$PREFIX/lib/python2.7/site-packages/numpy/core/include
export PYTHON_LIBRARY=$PREFIX/lib/python2.7/site-packages/numpy/core/include
export NUMPY_LIBRARY=$PREFIX/lib/python2.7/site-packages/numpy
# export TCL_INCLUDE_DIR=$PREFIX/include/
# export TCL_LIBRARY_DIR=$PREFIX/lib/
./configure 
cd src
sed -i.bak 's/fltk-1.3.x/fltk/g' Makefile
sed -i.bak 's%../lib/tk/lib_MACOSXX86_64/Tk.framework/Versions/8.5/Headers%/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers%g' Makefile
sed -i.bak "s%INCDIRS     =%INCDIRS     = -I$PYTHON_INCLUDE_DIR%g" Makefile
sed -i.bak "s%INCDIRS     =%INCDIRS     = -I$NUMPY_INCLUDE_DIR%g" Makefile
sed -i.bak "s%LIBDIRS     =%LIBDIRS     = -L$PYTHON_LIBRARY%g" Makefile
sed -i.bak "s%LIBDIRS     =%LIBDIRS     = -L$NUMPY_LIBRARY%g" Makefile
sed -i.bak "s%-lpng%$PREFIX/lib/libpng.a%g" Makefile
sed -i.bak "s%-lnetcdf%$PREFIX/lib/libnetcdf.a%g" Makefile
sed -i.bak "s%INCDIRS     =%INCDIRS     = -I$PREFIX/include%g" Makefile
sed -i.bak "s%LIBDIRS     =%LIBDIRS     = -L$PREFIX/lib%g" Makefile
sed -i.bak "s%-framework Python%-lpython2.7%g" Makefile
rm -rf $VMDINSTALLBINDIR/$VMDINSTALLNAME
rm -rf $VMDINSTALLLIBRARYDIR
make veryclean
make -j 8
make install
$VMDINSTALLBINDIR/$VMDINSTALLNAME

Finally, for convenience you might want to pack vmd as a conda package. Here is a recipe to start with https://github.com/intbio/vmd-conda . Compiling for conda is more tricky since it uses its own toolchain/compiler and a specific MacSDK10.9. The recipe currently can compile a working conda package for vmd without python. A vmd+python build unfortunately crashes with a Segfault if run in graphics mode (text mode works).