libharu をダウンロードして展開。


$ wget http://libharu.org/files/libharu-2.2.1.tar.gz
$ tar zxvf ./libharu-2.2.1.tar.gz
$ cd libharu-2.2.1

Mac OS X Snow Leopard だと libpng は /usr/X11 以下にある。


/usr/X11/include/png.h
/usr/X11/lib/libpng.dylib

--with-png=/usr/X11 を指定して ./configure する。


$ ./configure --prefix=/Users/hoge/myroot/usr/local --with-png=/usr/X11

make, make install でインストール完了。


$ make
$ make install

インストール先のファイル一覧。


$ ls -R /Users/hoge/myroot/usr/local
include	lib
 
/Users/hoge/myroot/usr/local/include:
hpdf.h			hpdf_error.h		hpdf_outline.h
hpdf_annotation.h	hpdf_ext_gstate.h	hpdf_page_label.h
hpdf_catalog.h		hpdf_font.h		hpdf_pages.h
hpdf_conf.h		hpdf_fontdef.h		hpdf_pdfa.h
hpdf_config.h		hpdf_gstate.h		hpdf_streams.h
hpdf_consts.h		hpdf_image.h		hpdf_types.h
hpdf_destination.h	hpdf_info.h		hpdf_u3d.h
hpdf_doc.h		hpdf_list.h		hpdf_utils.h
hpdf_encoder.h		hpdf_mmgr.h		hpdf_version.h
hpdf_encrypt.h		hpdf_namedict.h
hpdf_encryptdict.h	hpdf_objects.h
 
/Users/hoge/myroot/usr/local/lib:
libhpdf-2.2.1.dylib	libhpdf.dylib
libhpdf.a		libhpdf.la

Ref. libHaru.org wiki

tags: pdf libharu

Posted by NI-Lab. (@nilab)