PHP 5.2.12 + GD + gettext

Mac OSX Leopard Serverのセキュリティーアップデートを実行するとまたPHPが置き換えられてしまった。

ので、GD付きで再コンパイル。と、gettextも有効にしたかったのでついでにいっしょにコンパイルします。

基本的に前回の記事にgettextを追加した内容になります。

  • libpng 1.4.1
  • libjpeg jpeg-8a
  • gd 2.0.35
  • gettext 0.17
  • php 5.2.12

バグの修正については前回の記事と同様に適用します。

$ cd ~/Downloads/src/libpng-1.4.1
$ CFLAGS="-arch x86_64" CCFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" ./configure
$ make
$ sudo make install

$ cd ~/Downloads/src/gd-2.0.35
$ CFLAGS="-arch x86_64" ./configure
$ cp libtool ../jpeg-8a/
$ cd ../jpeg-8a/
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" ./configure --enable-shared
$ make
$ sudo make install

$ cd ~/Downloads/src/gd-2.0.35
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6
$ make
$ sudo make install

$ cd ~/Downloads/src/gettext-0.17
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64" CCFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" ./configure --prefix=/usr
$ make
$ sudo make install

$ cd ~/Downloads/src/php-5.2.12
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-apxs2=/usr/sbin/apxs --with-ldap=/usr --with-kerberos=/usr --enable-cli --with-zlib-dir=/usr --enable-trans-sid --with-xml --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-config-file-path=/etc --sysconfdir=/private/etc --with-mysql-sock=/var/mysql --with-mysqli=/usr/bin/mysql_config --with-mysql=/usr --with-openssl --with-xmlrpc --with-xsl=/usr --without-pear --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/X11R6 --with-gd=/usr/local -with-gettext=/usr
$ make
$ make test
$ sudo make install

phpinfoを確認すると無事GDとgettextが有効になっていました。

コメントを残す

メールアドレスが公開されることはありません。

question razz sad evil exclaim smile redface biggrin surprised eek confused cool lol mad twisted rolleyes wink idea arrow neutral cry mrgreen

*