1. yang xiaoyong
  2. woocode

Source

woocode / sa-auto / src / gd.sh

#!/bin/sh

. ./set_app_env.sh;

L_CFLAGS="-I $APP_LIB/jpeg/include -I $APP_LIB/libpng/include -I$APP_LIB/zlib/include"
L_CPPFLAGS=""
L_LDFLAGS="-L$APP_LIB/jpeg/lib -L$APP_LIB/libpng/lib -L$APP_LIB/zlib/lib"

CFLAGS=" $G_CFLAGS $L_CFLAGS";export CFLAGS;
CPPFLAGS=" $G_CPPFLAGS $L_CPPFLAGS";export CPPFLAGS;
LDFLAGS=" $G_LDFLAGS $L_LDFLAGS";export LDFLAGS;

rm -rf $GD
rm -rf $APP_LIB/gd

tar zxvf $GD.tar.gz

cd $GD

./configure --prefix=$APP_LIB/$GD             \
            --with-png=$APP_LIB/libpng        \
            --with-jpeg=$APP_LIB/jpeg         \
            --with-freetype=$APP_LIB/freetype \
            --with-fontconfig=$APP_LIB/fontconfig

#bsd 不支持
#make $MAKEOPT &&
make &&
make install

ln -s $APP_LIB/$GD $APP_LIB/gd

#  --with-gnu-ld           assume the C compiler uses GNU ld default=no
#  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
#  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
#  --with-png=DIR          where to find the png library
#  --with-freetype=DIR     where to find the freetype 2.x library
#  --with-fontconfig=DIR         where to find the fontconfig library
#  --with-jpeg=DIR         where to find the jpeg library