-rw-r--r-- 1 root root 166690 Sep 11 1998 /usr/local/lib/libgd.a lrwxrwxrwx 1 root root 10 Jul 1 05:36 /usr/local/lib/libgd.so -> libgd.so.1* lrwxrwxrwx 1 root root 12 Jul 1 05:36 /usr/local/lib/libgd.so.1 -> libgd.so.1.3* -rwxr-xr-x 1 root root 162224 Sep 10 1998 /usr/local/lib/libgd.so.1.3* |
$ tar xvfz gd-1.7.3.tar.gz $ cd gd-1.7.3 |
#If you don't have FreeType and/or Xpm installed, including the #header files, uncomment this (default). #CFLAGS=-O <--- コメントアウト #If you do have FreeType and/or Xpm fully installed, uncomment a #variation of this and comment out the line above. See also LIBS below. CFLAGS=-O -DHAVE_XPM -DHAVE_LIBTTF <--- 行頭の # を削除する #If you don't have FreeType and/or Xpm fully installed, uncomment this #(default). #LIBS=-lm -lgd -lpng -lz <--- コメントアウト #If you do have FreeType and/or Xpm fully installed, uncomment a #variation of this and comment out the line above. Note that #Xpm requires X11. See also CFLAGS above. LIBS=-lm -lgd -lpng -lz -lttf -lXpm -lX11 <--- 行頭の # を削除する |
$ make (snip) gcc -I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11 -O -c gd_png.c -o gd_png.o gd_png.c: In function `gdImageCreateFromPngCtx': gd_png.c:152: warning: passing arg 3 of `png_set_read_fn' from incompatible pointer type gd_png.c:348: `PNG_INTERLACE_ADAM7' undeclared (first use this function) gd_png.c:348: (Each undeclared identifier is reported only once gd_png.c:348: for each function it appears in.) gd_png.c: In function `gdImagePngCtx': gd_png.c:450: warning: passing arg 3 of `png_set_write_fn' from incompatible pointer type gd_png.c:494: `PNG_INTERLACE_ADAM7' undeclared (first use this function) gd_png.c:494: `PNG_INTERLACE_NONE' undeclared (first use this function) gd_png.c:498: `PNG_COMPRESSION_TYPE_DEFAULT' undeclared (first use this function) gd_png.c:498: `PNG_FILTER_TYPE_DEFAULT' undeclared (first use this function) make: *** [gd_png.o] Error 1 |
$ make
(snip)
gcc -I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11 -O -c pngtogd2.c -o pngtogd2.o
gcc -I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11 pngtogd2.o -o pngtogd2 -L.
-L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib -lm -lgd -lpng -lz
./libgd.a(gd_gd2.o): In function `_gd2ReadChunk':
gd_gd2.o(.text+0x276): undefined reference to `uncompress'
./libgd.a(gd_gd2.o): In function `_gdImageGd2':
gd_gd2.o(.text+0xb6d): undefined reference to `compress'
make: *** [pngtogd2] Error 1
|
LIBDIRS=-L. -L/usr/lib -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
~~~~~~~~~~追加
|
$ make (snip) $ su # make install |
$ make
(snip)
gcc -I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11 -O -DHAVE_XPM
-DHAVE_LIBTTF -c gdttf.c -o gdttf.o
gdttf.c:21: freetype.h: そのようなファイルやディレクトリはありません
make: *** [gdttf.o] Error 1
|
#Typical install locations for freetype, zlib, xpm and libpng header files.
#If yours are somewhere else, change this.
INCLUDEDIRS=-I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include/freetype
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 追加
|
$ make $ su # make install # exit |
$ tar xvfz gd-1.8.4.tar.gz $ cd gd-1.8.4 |
#If you don't have FreeType, libjpeg and/or Xpm installed, including the
#header files, uncomment this (default). You really must install
#libpng and zlib to get anywhere if you wish to create PNG images.
#CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG <--- コメントアウト
#If you do have FreeType, libjpeg and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. See also LIBS below.
CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG \ <--- 行頭の # を削除
-DHAVE_LIBFREETYPE -DHAVE_LIBTTF -DJISX0208 <--- 行頭の # を削除
~~~~~~~~~~ 追加
(snip)
#PLEASE NOTE: YOU MAY HAVE TO JUGGLE THE ORDER OF THE LIBRARIES.
#Some systems are very picky about link order. They don't all agree
#on the right order, either.
#LIBS=-lgd -lpng -lz -lm <--- コメントアウト
#If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. Note that
#Xpm requires X11. See also CFLAGS above.
LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm -lttf <--- 行頭の # を削除
|
$ make
(snip)
gcc -I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 \
-I/usr/local/include -O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE \
-DHAVE_LIBTTF -DJISX0208 -c -o gdft.o gdft.c
gdft.c:36: freetype/freetype.h: そのようなファイルやディレクトリはありません
gdft.c:37: freetype/ftglyph.h: そのようなファイルやディレクトリはありません
make: *** [gdft.o] エラー 1
|
#Typical install locations for freetype, zlib, xpm, libjpeg and libpng header
#files. If yours are somewhere else, change this. -I. is important to
#ensure that the version of gd you are installing is used, and not an
#older release in your directory tree somewhere.
INCLUDEDIRS=-I. -I/usr/local/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
~~~~~~ 追加
|
$ make $ su # make install # exit |
#If you do have FreeType, libjpeg and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. See also LIBS below.
CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG \
-DHAVE_LIBFREETYPE -DHAVE_LIBTTF -DJISX0208
~~~~~~~~~~~~~ 削除
LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm -lttf
~~~~~ 削除
|
$ make $ su # make install # exit |
$ tar xvfz gd-2.0.12.tar.gz $ cd gd-2.0.12 $ ./configure --with-png --with-freetype --with-jpeg --with-xpm $ make $ su # make install # exit |