dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(gnoemoe, 2.0.0, http://www.icecrew.nl/software/gnoemoe) AC_CONFIG_SRCDIR(gnoemoe/gm-app.c) AC_DEFINE_UNQUOTED(IVERSION, "200", "this is used for internal representation of the version") AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_ISC_POSIX AC_STDC_HEADERS AC_PROG_CC AC_PROG_YACC AM_PROG_LIBTOOL AM_PROG_CC_STDC AC_HEADER_STDC AM_PROG_LIBTOOL AC_PROG_INTLTOOL AC_PROG_YACC PKG_CHECK_MODULES(PACKAGE, [ gtk+-2.0 >= 2.6.0 gconf-2.0 >= 1.1.9 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 ]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) dnl Check for perfect hash function generator AC_CHECK_PROG([GPERF],[gperf],[gperf]) AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) AC_ARG_ENABLE(ruby, [ --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 ruby-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 ruby-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], 1, [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 gnoemoe/Makefile gnoemoe/parser/Makefile po/Makefile.in scripts/Makefile ui/Makefile ]) echo echo Building with ruby ............. : $rubyen $rubymsg echo Install prefix ................. : $prefix echo Install share .................. : $datadir