Newer
Older
scim-wnn / skim_honoka / configure.in.in
@tamra tamra on 24 May 2006 1 KB skim_honokaをtrunkに移動。
#MIN_CONFIG(3.2.0)
cflags_set=${CFLAGS+set}
cppflags_set=${CPPFLAGS+set}

AM_INIT_AUTOMAKE(skim_honoka, 0.8.2)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN

SCIM_VERSION=1.3.0
PKG_CHECK_MODULES(SCIM,[scim >= $SCIM_VERSION])
PKG_CHECK_MODULES(HONOKA,[honoka >= "0.8.2"])

HONOKA_PLUGINDIR=`$PKG_CONFIG --variable=honokaplugindir honoka`
AC_SUBST(HONOKA_PLUGINDIR)

# Extra args.
AC_ARG_ENABLE(debug,
              [  --enable-debug     Turn on debugging],
              [case "${enableval}" in
               yes) debug=yes ;;
               no)  debug=no ;;
               *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
              esac],[debug=no])

if test "x$debug" = "xyes"; then
  test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
  test "$cppflags_set" = set || CPPFLAGS="$CXXFLAGS -g"
  SCIM_DEBUG_FLAGS="-DENABLE_DEBUG=1"
else
  SCIM_DEBUG_FLAGS="-DENABLE_DEBUG=0"
fi
AC_SUBST(SCIM_DEBUG_FLAGS)


REQUIRED_SKIM_VERSION=1.3.0
PKG_CHECK_MODULES(SKIM, [skim >= $REQUIRED_SKIM_VERSION],
                        [HAS_SKIM=yes],
                        [HAS_SKIM=no])

if test "x$HAS_SKIM" = "xyes"; then

PKG_CHECK_MODULES(SCIM_KDEUTILS,[scim_kdeutils >= $REQUIRED_SKIM_VERSION],
                                [HAS_KDEUTILS=yes],
                                [HAS_KDEUTILS=no])

  if test "x$HAS_KDEUTILS" = "xyes"; then
        SKIM_VERSION=`$PKG_CONFIG --modversion skim`
        SCIM_PINYIN_ENABLE_SKIM_SUPPORT=1
        skim_prefix=`$PKG_CONFIG --variable=prefix skim`
        AC_SUBST(skim_prefix)
        ##we need to overwrite prefix with the same prefix of which skim was installed to
        prefix=$skim_prefix
        ##this is to get rid of the last warning
        given_prefix=$skim_prefix
  fi
else
  AC_MSG_ERROR([skim library is not available or the version is too old!])
fi