dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT(rast, 0.3.1) AC_CONFIG_SRCDIR(src/local_db.c) AM_INIT_AUTOMAKE([1.7 nostdinc dist-bzip2]) AM_CONFIG_HEADER(include/rast/config.h) AM_MAINTAINER_MODE dnl dnl Checks for programs. dnl AC_PROG_CC AC_PROG_LIBTOOL dnl dnl Checks for cc. dnl AC_C_CONST AC_C_INLINE dnl dnl Checks for large files. dnl AC_SYS_LARGEFILE AC_FUNC_FSEEKO AC_CHECK_FUNCS(ftello) dnl dnl Checks for APR. dnl AM_PATH_APR(0, 9, 5) dnl dnl Checks for APR utils. dnl AM_PATH_APU(0, 9, 5) dnl dnl Checks for Berkeley DB. dnl AM_PATH_DB(4, 2, 52) dnl dnl Checks for ICU. dnl AM_PATH_ICU(2, 8) AM_CONDITIONAL(WANT_UTF8_ENCODING_MODULE, test "x$HAVE_ICU" = "xyes") dnl dnl Checks for MeCab. dnl AM_PATH_MECAB AM_CONDITIONAL(WANT_MECAB_EUC_JP_ENCODING_MODULE, test "x$HAVE_MECAB" = "xyes") dnl dnl Checks for Ruby. dnl AM_PATH_RUBY(1, 8, 1) AM_CONDITIONAL(WANT_RUBYLIB, test "x$HAVE_RUBY" = "xyes") dnl dnl Checks for XMLRPC-C. dnl AM_PATH_XMLRPC(0, 9, 10) AM_CONDITIONAL(WANT_XMLRPC, test "x$HAVE_XMLRPC" = "xyes") if test "x$HAVE_XMLRPC" = "xyes" ; then AC_DEFINE(HAVE_XMLRPC, 1, [Define to 1 if you have the xmlrpc header files.]) fi dnl dnl Checks whether we should run tests. dnl AM_CONDITIONAL(WANT_TEST, test "x$HAVE_ICU" = "xyes" && test "x$HAVE_MECAB" = "xyes" && test "x$HAVE_XMLRPC" = "xyes" && test "x$HAVE_RUBY" = "xyes") dnl dnl Configuration options. dnl enable_debugging="no" AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[turn on debugging]), [ enable_debugging="$enableval" ]) if test "x$enable_debugging" = "xyes" ; then AC_DEFINE(RAST_DEBUG, 1, [debug flag]) fi rast_prefix="$prefix" test "x$rast_prefix" = xNONE && rast_prefix="$ac_default_prefix" rast_exec_prefix="$exec_prefix" test "x$rast_exec_prefix" = xNONE && rast_exec_prefix="$rast_prefix" rast_libdir="$libdir" test "x$rast_libdir" = 'x${exec_prefix}/lib' && \ rast_libdir="$rast_exec_prefix/lib" encodingdir="$rast_libdir/rast/encodings" AC_ARG_WITH(encodingdir, AC_HELP_STRING([--with-encodingdir=DIR], [path to directory for encoding modules]), [ encodingdir="$withval" ]) AC_SUBST(encodingdir) AC_DEFINE_UNQUOTED(RAST_ENCODINGDIR, "$encodingdir", [path to directory for encoding modules]) filtermoduledir="$rast_libdir/rast/filters" AC_ARG_WITH(filter-moduledir, AC_HELP_STRING([--with-filter-moduledir=DIR], [path to directory for text filter modules]), [ filtermoduledir="$withval" ]) AC_SUBST(filtermoduledir) AC_DEFINE_UNQUOTED(RAST_FILTER_MODULEDIR, "$filtermoduledir", [path to directory for text filter modules]) rubyfiltermoduledir="$filtermoduledir/ruby" AC_ARG_WITH(ruby-filter-moduledir, AC_HELP_STRING([--with-ruby-filter-moduledir=DIR], [path to directory for text filter modules written by Ruby]), [ rubyfiltermoduledir="$withval" ]) AC_SUBST(rubyfiltermoduledir) AC_DEFINE_UNQUOTED(RAST_RUBY_FILTER_MODULEDIR, "$rubyfiltermoduledir", [path to directory for text filter modules written by Ruby]) AC_MSG_CHECKING([default encoding]) if test "x$HAVE_ICU" = "xyes"; then default_encoding="utf8" else default_encoding="euc_jp" fi AC_ARG_WITH(default-encoding, AC_HELP_STRING([--with-defaunt-encoding=ENCODING], [default encoding]), [ default_encoding="$withval" ]) AC_DEFINE_UNQUOTED(RAST_DEFAULT_ENCODING, "$default_encoding", [default encoding]) AC_MSG_RESULT($default_encoding) dnl dnl Checking shared library suffix. dnl AC_MSG_CHECKING([for shared library suffix]) module="yes" eval "SHREXT=$shrext_cmds" AC_MSG_RESULT($SHREXT) AC_SUBST(SHREXT, $SHREXT) AC_DEFINE_UNQUOTED(SHREXT, "$SHREXT", [shared library suffix]) dnl dnl Checking shared library path variable dnl AC_MSG_CHECKING([for shared library path variable]) SHLIBPATH_VAR="$shlibpath_var" AC_MSG_RESULT($SHLIBPATH_VAR) AC_SUBST(SHLIBPATH_VAR, $SHLIBPATH_VAR) AC_DEFINE_UNQUOTED(SHLIBPATH_VAR, "$SHLIBPATH_VAR", [shared library path variable]) dnl dnl Checking math library dnl AC_CHECK_LIBM() AC_SUBST(LIBM, $LIBM) AC_OUTPUT(Makefile cgi/Makefile include/Makefile include/rast/Makefile src/Makefile src/encodings/Makefile src/filters/Makefile scripts/Makefile ruby/Makefile ruby/ext/Makefile ruby/ext/rast/Makefile ruby/filters/Makefile m4/Makefile docs/Makefile tests/Makefile tests/data/Makefile tests/data/filter/Makefile tests/data/filter/en/Makefile tests/data/filter/ja/Makefile tests/rast/Makefile tests/rast/encoding/Makefile tests/rast/filter/Makefile tests/ruby-filters/Makefile examples/Makefile examples/ruby/Makefile)