dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(gnoemoe, 0.9.1) AC_DEFINE_UNQUOTED(IVERSION, "0.9.1", "this is used for internal representation of the version") AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_ISC_POSIX AC_STDC_HEADERS AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AC_PROG_INTLTOOL pkg_modules="gtk+-2.0 >= 2.0.0 gdk-pixbuf-2.0 libgnome-2.0 libglade-2.0 gtksourceview-1.0 gnome-vfs-2.0 libgnomeui-2.0 vte libxml-2.0 cairo" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) AC_ARG_ENABLE(rubyen, [ GnoeMoe specific options: --disable-ruby disable use of the ruby scripting support], rubyen=$enableval, rubyen=yes) #---------------------------------------------------------------- # Look for Ruby #---------------------------------------------------------------- if test "_$rubyen" = "_yes"; then RUBYBIN= AC_ARG_WITH(ruby,[ --with-ruby=path Set location of Ruby executable],[ RUBYBIN="$withval"], [RUBYBIN=]) # First figure out what the name of Ruby is if test -z "$RUBYBIN"; then AC_CHECK_PROGS(RUBY, ruby) else RUBY="$RUBYBIN" fi AC_MSG_CHECKING(for Ruby header files) if test -n "$RUBY"; then RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null` if test "$RUBYDIR" != ""; then dirs="$RUBYDIR" RUBYINCLUDE=none for i in $dirs; do if test -r $i/ruby.h; then AC_MSG_RESULT($i) RUBYINCLUDE="-idirafter $i" break; fi done if test "$RUBYINCLUDE" = none; then AC_MSG_RESULT(could not locate ruby.h, disabling ruby support) rubymsg="(no headers found, install ruby1.8-dev)" rubyen="no" fi # Find library and path for linking. AC_MSG_CHECKING(for Ruby library) RUBYLIB="" rb_libdir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["libdir"]]') 2>/dev/null` rb_bindir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["bindir"]]') 2>/dev/null` dirs="$dirs $rb_libdir $rb_bindir" rb_libruby=`($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBRUBY_A"]]') 2>/dev/null` RUBYLINK=`($RUBY -rrbconfig -e ' c = Config::CONFIG if c.has_key? "LIBRUBYARG_STATIC" # 1.8.x if c[["LIBRUBY"]] == c[["LIBRUBY_A"]] link = c[["LIBRUBYARG_STATIC"]] else link = c[["LIBRUBYARG_SHARED"]] end else # 1.6.x link = "-l" + c[["RUBY_INSTALL_NAME"]] end puts link') 2>/dev/null` if test "$rb_libruby" != ""; then for i in $dirs; do if (test -r $i/$rb_libruby;) then RUBYLIB="$i" break; fi done fi if test "$RUBYLIB" = ""; then AC_MSG_RESULT(not found... disabling ruby support) rubymsg="(libs not found)" rubyen="no" else AC_MSG_RESULT($RUBYLINK in $RUBYLIB) fi else AC_MSG_RESULT(unable to determine ruby configuration, disabling ruby support) rubymsg="(unable to determine configuration)" rubyen="no" fi else AC_MSG_RESULT(not found.. disabling ruby support) rubymsg="(no headers found, install ruby1.8-dev)" rubyen="no" fi fi if test "_$rubyen" == "_no"; then RUBYINCLUDE="" RUBYLINK="" AM_CONDITIONAL(HAVE_SCRIPT, false) else rubymsg="enjoy scripting :)" AC_DEFINE([HAVE_RUBY], [], [Ruby scripting is enabled]) AM_CONDITIONAL(HAVE_SCRIPT, true) fi AC_SUBST(RUBYINCLUDE) AC_SUBST(RUBYLINK) GETTEXT_PACKAGE=gnoemoe AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", "gettext package") dnl Add the languages which your application supports here. ALL_LINGUAS="nl" AM_GLIB_GNU_GETTEXT AC_OUTPUT([ Makefile pixmaps/Makefile pixmaps/userlist/Makefile pixmaps/ice-userlist/Makefile pixmaps/tray/Makefile src/Makefile src/test/Makefile po/Makefile.in scripts/Makefile ui/Makefile ]) echo echo Building with ruby ............. : $rubyen $rubymsg echo Install prefix ................. : $prefix echo Install share .................. : $datadir