$ xcode-select --install ( 指示に従ってインストールする ) $ sudo xcodebuild -license ( ライセンスの同意書を閉じた後「agree」と入力すること )
$ sudo port selfupdate $ sudo port sync $ sudo port install hs-zlib $ sudo port install xpm $ sudo port install emacs $ sudo port install gperf $ sudo port install gsed $ sudo port install apple-gcc42 ( 他の gcc 系コンパイラでは swarm がコンパイルできなかったり、実行時エラーが起きる )
$ export CFLAGS="-I/opt/local/include -arch x86_64" $ export CC=gcc-apple-4.2 $ cd Swarm-2.4.1-MinGW-sources/sources/ $ tar zxf tcl8.4.19-src.tar.gz $ cd tcl8.4.19/unix $ ./configure --enable-framework --disable-corefoundation $ make $ sudo make install
$ cd ../.. ( tclの作業からの続き、これでSwarm-2.4.1-MinGW-sources/sources/に移動 ) $ tar zxf tk8.4.19-src.tar.gz $ cd tk8.4.19 $ patch -p1 --ignore-whitespace < ../../patches/tk-8.4.19.patch $ cd unix $ export LDFLAGS="-L/opt/local/lib -L/usr/local/lib" $ ./configure --enable-framework --disable-corefoundation $ make $ sudo make install
$ cd ../.. ( tkの作業からの続き、これでSwarm-2.4.1-MinGW-sources/sources/に移動 ) $ tar zxf BLT2.4z.tar.gz $ cd blt2.4z $ patch -p1 < ../../patches/blt2.4z_for_x86_64.patch $ export CFLAGS="$CFLAGS -L/opt/local/lib -L/usr/local/lib" (LDFLAGSを認識しないため、CFLAGSで設定する) $ ./configure --with-tcl=/usr/local/lib --with-tk=/usr/local/lib $ make $ sudo make install $ cd library $ sudo make install
$ export OBJC=gcc-apple-4.2 $ export CC=$OBJC $ export LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64" $ export CPPFLAGS='-I/opt/local/include -DUSE_INTERP_RESULT -O -fno-omit-frame-pointer' $ export CFLAGS="-pipe -arch x86_64 -O -fno-omit-frame-pointer" $ export OBJCFLAGS="$CFLAGS -DH5_USE_16_API -fnested-functions -O -fno-omit-frame-pointer" $ export SWARMHOME=/opt/local $ tar zxf swarm-2.2_fix_0.36.tgz $ cd swarm-2.2_fix_0.36 $ ./configure --prefix=/opt/local ( 改行せずに一行で入力すること ) --with-x --x-include=/opt/local/include --x-lib=/opt/local/lib --with-tcl=/opt/local/lib --with-tk=/opt/local/lib ac_cv_path_GREP=/usr/bin/grep --with-jdkdir=/Library/Java/JavaVirtualMachines/jdk???.jdk/Contents/Home/ ( ???はjavaのバージョンに合わせて変更 ) $ make $ sudo make install
export SWARMHOME=/opt/local/ export CLASSPATH=.:/opt/local/share/swarm/kawa.jar:/opt/local/share/swarm/swarm.jar