1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
AC_INIT([treil], [1.8], [ueno@unixuser.org])
AC_PREREQ(2.59)
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_PROG_LIBTOOL
AC_ARG_WITH(ruby, AC_HELP_STRING([--with-ruby=PATH], [use ruby executable specified by PATH]), RUBY="$withval")
if test -z "$RUBY"; then
AC_PATH_PROGS(RUBY, [ruby ruby1.8 ruby1.9])
else
AC_PATH_PROG(RUBY, "$RUBY")
fi
test -z "$RUBY" && AC_MSG_ERROR([ruby not installed])
RUBYARCH=`"$RUBY" -rrbconfig -e "puts(RbConfig::CONFIG.fetch('arch'))"`
AC_SUBST(RUBYARCH, "$RUBYARCH")
AC_ARG_WITH(rubylibdir, AC_HELP_STRING([--with-rubylibdir=PATH], [install ruby files in PATH]), RUBYLIBDIR="$withval")
if test -z "$RUBYLIBDIR"; then
RUBYLIBDIR=`"$RUBY" -rrbconfig -e "puts(RbConfig::CONFIG.fetch('sitelibdir'))"`
fi
AC_SUBST(RUBYLIBDIR, "$RUBYLIBDIR")
AC_ARG_WITH(rubyarchdir, AC_HELP_STRING([--with-rubyarchdir=PATH], [install ruby extension libraries in PATH]), RUBYARCHDIR="$withval")
if test -z "$RUBYARCHDIR"; then
RUBYARCHDIR=`"$RUBY" -rrbconfig -e "puts(RbConfig::CONFIG.fetch('sitearchdir'))"`
fi
AC_SUBST(RUBYARCHDIR, "$RUBYARCHDIR")
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile
ruby/Makefile
ruby/extconf.rb])
AC_OUTPUT
|