2 AC_DEFUN([AC_CHECK_IPAFONTDIR],[
3 AC_MSG_CHECKING([for directory for IPA font files])
4 AC_ARG_WITH(ipafontdir,
5 AS_HELP_STRING([--with-ipafontdir=DIR],
6 [Path to directory for IPAfont files]),
7 [IPAFONTDIR="$withval"])
9 if test "x${IPAFONTDIR}" = "x"; then
10 IPAFONTDIR=${datadir}/fonts/opentype/ipafont
11 if test ! -d "${IPAFONTDIR}"; then
12 IPAFONTDIR=${datadir}/fonts/opentype
13 if test ! -d "${IPAFONTDIR}"; then
19 if test "x${IPAFONTDIR}" = "x"; then
20 IPAFONTDIR=${datadir}/fonts/truetype/ipafont
21 if test ! -d "${IPAFONTDIR}"; then
22 IPAFONTDIR=${datadir}/fonts/truetype
23 if test ! -d "${IPAFONTDIR}"; then
29 if test "x${IPAFONTDIR}" = "x"; then
30 IPAFONTDIR=${datadir}/fonts
31 if test ! -d ${IPAFONTDIR}; then
36 if test "x${IPAFONTDIR}" = "x"; then
37 AC_MSG_RESULT([not found])
38 AC_MSG_WARN([PDF version cannot be built])
42 IPAGFILE=${IPAFONTDIR}/ipag.ttf
43 if test ! -f ${IPAGFILE}; then
44 IPAGFILE=${IPAFONTDIR}/ipa-gothic/ipag.ttf
45 if test ! -f ${IPAGFILE}; then
51 IPAMFILE=${IPAFONTDIR}/ipam.ttf
52 if test ! -f ${IPAMFILE}; then
53 IPAMFILE=${IPAFONTDIR}/ipa-mincho/ipam.ttf
54 if test ! -f ${IPAMFILE}; then
60 if test "x${IPAGFILE}" = "x" -o "x${IPAMFILE}" = "x"; then
61 AC_MSG_RESULT([not found])
62 AC_MSG_WARN([PDF version cannot be built.])
66 AC_MSG_RESULT([found])