comparison configure.ac @ 3830:e58f4b9ab1ad

[xemacs-hg @ 2007-02-15 16:11:52 by stephent] Adapt canna autodetection to current reality. <878xeze6qj.fsf@uwakimon.sk.tsukuba.ac.jp>
author stephent
date Thu, 15 Feb 2007 16:12:19 +0000
parents e1dc2edc2719
children cfc59907fb1e
comparison
equal deleted inserted replaced
3829:5320274f018b 3830:e58f4b9ab1ad
4592 AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes) 4592 AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes)
4593 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6) 4593 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6)
4594 fi 4594 fi
4595 fi 4595 fi
4596 4596
4597 dnl Autodetect canna 4597 dnl Configure canna
4598 dnl canna_libs variable is initialized at toplevel 4598 dnl canna_libs variable is initialized at toplevel
4599 canna_includes_found=no 4599 dnl #### the hard-coding of /usr/local/canna/include is bogus and
4600 dnl my Mac OS X 10.4 system needs /usr/local/canna/lib, too
4601 dnl #### this whole mess should be in modules/canna, no? maybe not
4602 have_canna=no
4600 if test "$with_canna" != "no"; then 4603 if test "$with_canna" != "no"; then
4601 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
4602 fi
4603 if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
4604 -d "/usr/local/canna/include"; then
4605 save_c_switch_site="$c_switch_site" 4604 save_c_switch_site="$c_switch_site"
4606 c_switch_site="$c_switch_site -I/usr/local/canna/include" 4605 for canna_include_path in "" " -I/usr/local/canna/include"; do
4607 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes) 4606 for canna_wchar_aware in "" " -DCANNA_NEW_WCHAR_AWARE=1"; do
4608 if test "$canna_includes_found" != "yes"; then 4607 c_switch_site="$save_c_switch_site$canna_include_path$canna_wchar_aware"
4608 # defeat autoconf's cache mechanism
4609 $as_unset ac_cv_header_canna_jrkanji_h
4610 $as_unset ac_cv_header_canna_RK_h
4611 # using $ac_header_compiler is a hack, but autoconf doesn't let us
4612 # get at this information otherwise :-(
4613 AC_CHECK_HEADER(canna/jrkanji.h,[AC_CHECK_HEADER(canna/RK.h,have_canna=$ac_header_compiler)])
4614 test "$have_canna" = "yes" && break
4615 AC_MSG_WARN([You may ignore any *Present but not compiled* message
4616 from autoconf. We detect that condition and recheck, but there
4617 is no way to suppress autoconf's message.])
4618 done
4619 test "$have_canna" = "yes" && break
4620 done
4621 if test "$have_canna" = "yes"; then
4622 c_switch_site="$save_c_switch_site$canna_include_path"
4623 else
4609 c_switch_site="$save_c_switch_site" 4624 c_switch_site="$save_c_switch_site"
4610 with_canna="no"
4611 fi 4625 fi
4612 fi 4626 fi
4613 4627
4614 test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) } 4628 test "$have_canna" = "yes" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],have_canna=no) }
4615 test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) } 4629 test "$have_canna" = "yes" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],have_canna=no) }
4616 test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) } 4630 if test "$have_canna" = "yes"; then
4617 test -z "$with_canna" && with_canna=yes
4618 if test "$with_canna" = "yes"; then
4619 AC_DEFINE(HAVE_CANNA) 4631 AC_DEFINE(HAVE_CANNA)
4632 test -n "$canna_wchar_aware" && AC_DEFINE(CANNA_NEW_WCHAR_AWARE)
4620 XE_APPEND(modules/canna, MAKE_SUBDIR) 4633 XE_APPEND(modules/canna, MAKE_SUBDIR)
4621 need_modules_common=yes 4634 need_modules_common=yes
4622 if test "$with_modules" = "yes"; then 4635 if test "$with_modules" = "yes"; then
4623 XE_APPEND(modules/canna, INSTALL_ARCH_DEP_SUBDIR) 4636 XE_APPEND(modules/canna, INSTALL_ARCH_DEP_SUBDIR)
4624 fi 4637 fi
4625 XE_PREPEND(-lcanna -lRKC, canna_libs) 4638 XE_PREPEND(-lcanna -lRKC, canna_libs)
4639 elif test "$with_canna" != "no"; then
4640 AC_MSG_WARN([Canna configuration failed. If you expected success,
4641 maybe you need --with-site-prefixes=/usr/local/canna?])
4626 fi 4642 fi
4627 AC_SUBST(canna_libs) 4643 AC_SUBST(canna_libs)
4628 4644
4629 else dnl "$enable_mule" = "no" 4645 else dnl "$enable_mule" = "no"
4630 for feature in xim canna wnn; do 4646 for feature in xim canna wnn; do
6096 test "$enable_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)." 6112 test "$enable_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)."
6097 test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)." 6113 test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)."
6098 test "$with_xim" = motif && echo " - Using Motif to provide XIM support." 6114 test "$with_xim" = motif && echo " - Using Motif to provide XIM support."
6099 test "$with_xim" = xlib && echo " - Using raw Xlib to provide XIM support." 6115 test "$with_xim" = xlib && echo " - Using raw Xlib to provide XIM support."
6100 test "$with_xfs" = yes && echo " - Using XFontSet to provide bilingual menubar." 6116 test "$with_xfs" = yes && echo " - Using XFontSet to provide bilingual menubar."
6101 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." 6117 test "$have_canna" = yes && echo " Compiling in support for Canna on Mule."
6102 if test "$with_wnn" = yes; then 6118 if test "$with_wnn" = yes; then
6103 echo " Compiling in support for the WNN input method on Mule." 6119 echo " Compiling in support for the WNN input method on Mule."
6104 test "$with_wnn6" = yes && echo " - Using WNN version 6." 6120 test "$with_wnn6" = yes && echo " - Using WNN version 6."
6105 fi 6121 fi
6106 6122