2006-01-10 02:36:43 +01:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ(2.59)
|
2006-03-24 14:43:26 +01:00
|
|
|
AC_INIT(gnoemoe, 2.0.5, http://www.icecrew.nl/software/gnoemoe)
|
2006-01-10 02:36:43 +01:00
|
|
|
AC_CONFIG_SRCDIR(gnoemoe/gm-app.c)
|
|
|
|
|
2006-03-24 14:43:26 +01:00
|
|
|
AC_DEFINE_UNQUOTED(IVERSION, "205", "this is used for internal representation of the version")
|
2006-01-10 02:36:43 +01:00
|
|
|
|
|
|
|
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
|
2006-02-06 19:44:27 +01:00
|
|
|
|
2006-01-10 02:36:43 +01:00
|
|
|
AC_PROG_INTLTOOL
|
2006-02-06 19:44:27 +01:00
|
|
|
|
|
|
|
AM_GCONF_SOURCE_2
|
|
|
|
|
2006-01-10 02:36:43 +01:00
|
|
|
AC_PROG_YACC
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(PACKAGE, [
|
|
|
|
gtk+-2.0 >= 2.6.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
|
|
|
|
])
|
|
|
|
|
|
|
|
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"
|
2006-03-24 12:57:33 +01:00
|
|
|
RUBY_CFLAGS=none
|
2006-01-10 02:36:43 +01:00
|
|
|
for i in $dirs; do
|
|
|
|
if test -r $i/ruby.h; then
|
|
|
|
AC_MSG_RESULT($i)
|
2006-03-24 12:57:33 +01:00
|
|
|
RUBY_CFLAGS="-idirafter $i"
|
2006-01-10 02:36:43 +01:00
|
|
|
break;
|
|
|
|
fi
|
|
|
|
done
|
2006-03-24 12:57:33 +01:00
|
|
|
if test "$RUBY_CFLAGS" = none; then
|
2006-01-10 02:36:43 +01:00
|
|
|
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`
|
2006-03-24 12:57:33 +01:00
|
|
|
RUBY_LIBS=`($RUBY -rrbconfig -e '
|
2006-01-10 02:36:43 +01:00
|
|
|
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
|
2006-03-24 12:57:33 +01:00
|
|
|
AC_MSG_RESULT($RUBY_LIBS in $RUBYLIB)
|
2006-01-10 02:36:43 +01:00
|
|
|
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
|
2006-03-24 12:57:33 +01:00
|
|
|
RUBY_CFLAGS=""
|
|
|
|
RUBY_LIBS=""
|
|
|
|
AM_CONDITIONAL(HAS_RUBY, false)
|
2006-01-10 02:36:43 +01:00
|
|
|
else
|
|
|
|
rubymsg="enjoy scripting :)"
|
|
|
|
AC_DEFINE([HAVE_RUBY], 1, [Ruby scripting is enabled])
|
2006-03-24 12:57:33 +01:00
|
|
|
AM_CONDITIONAL(HAS_RUBY, true)
|
2006-01-10 02:36:43 +01:00
|
|
|
fi
|
|
|
|
|
2006-03-24 12:57:33 +01:00
|
|
|
AC_SUBST(RUBY_CFLAGS)
|
|
|
|
AC_SUBST(RUBY_LIBS)
|
2006-01-10 02:36:43 +01:00
|
|
|
|
2006-02-20 23:32:18 +01:00
|
|
|
# Look for libnotify
|
2006-03-24 14:26:17 +01:00
|
|
|
LIBNOTIFY_REQUIRED=0.3.2
|
2006-02-20 23:32:18 +01:00
|
|
|
AC_ARG_ENABLE(libnotify, AC_HELP_STRING([--disable-libnotify],
|
|
|
|
[Disable libnotify support]),,
|
|
|
|
enable_libnotify=auto)
|
|
|
|
if test "x$enable_libnotify" != "xno"; then
|
|
|
|
PKG_CHECK_MODULES(NOTIFY, libnotify >= $LIBNOTIFY_REQUIRED,
|
|
|
|
have_libnotify=yes,
|
|
|
|
have_libnotify=no)
|
|
|
|
if test "x$have_libnotify" = "xno" -a "x$enable_libnotify" = "xyes"; then
|
|
|
|
AC_MSG_ERROR([libnotify support explicitly requested, but libnotify couldn't be found])
|
|
|
|
fi
|
|
|
|
if test "x$have_libnotify" = "xyes"; then
|
|
|
|
enable_libnotify=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(USE_NOTIFY, test x"$enable_libnotify" = xyes)
|
|
|
|
|
|
|
|
if test x$enable_libnotify = xyes ; then
|
|
|
|
# Find out the version of LIBNOTIFY we're using
|
|
|
|
libnotify_version=`pkg-config --modversion libnotify`
|
|
|
|
LIBNOTIFY_VERSION_MAJOR=`echo $libnotify_version | awk -F. '{print $1}'`
|
|
|
|
LIBNOTIFY_VERSION_MINOR=`echo $libnotify_version | awk -F. '{print $2}'`
|
|
|
|
LIBNOTIFY_VERSION_MICRO=`echo $libnotify_version | awk -F. '{print $3}'`
|
|
|
|
if test "z$LIBNOTIFY_VERSION_MAJOR" = "z"; then
|
|
|
|
LIBNOTIFY_VERSION_MAJOR="0"
|
|
|
|
fi
|
|
|
|
if test "z$LIBNOTIFY_VERSION_MINOR" = "z"; then
|
|
|
|
LIBNOTIFY_VERSION_MINOR="0"
|
|
|
|
fi
|
|
|
|
if test "z$LIBNOTIFY_VERSION_MICRO" = "z"; then
|
|
|
|
LIBNOTIFY_VERSION_MICRO="0"
|
|
|
|
fi
|
|
|
|
echo "Your libnotify version is $LIBNOTIFY_VERSION_MAJOR,$LIBNOTIFY_VERSION_MINOR,$LIBNOTIFY_VERSION_MICRO."
|
|
|
|
NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MAJOR=$LIBNOTIFY_VERSION_MAJOR"
|
|
|
|
NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MINOR=$LIBNOTIFY_VERSION_MINOR"
|
|
|
|
NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MICRO=$LIBNOTIFY_VERSION_MICRO"
|
|
|
|
|
|
|
|
AC_DEFINE(HAVE_NOTIFY, 1, [Define if libnotify support is enabled])
|
|
|
|
AC_SUBST(NOTIFY_CFLAGS)
|
|
|
|
AC_SUBST(NOTIFY_LIBS)
|
|
|
|
fi
|
|
|
|
|
2006-01-10 02:36:43 +01:00
|
|
|
GETTEXT_PACKAGE=gnoemoe
|
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
2006-03-29 14:47:45 +02:00
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
|
2006-01-10 02:36:43 +01:00
|
|
|
|
|
|
|
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
|
2006-02-06 19:44:27 +01:00
|
|
|
data/Makefile
|
2006-01-10 02:36:43 +01:00
|
|
|
])
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo Building with ruby ............. : $rubyen $rubymsg
|
2006-02-20 23:32:18 +01:00
|
|
|
echo Building with libnotify ........ : $have_libnotify $libnotify_version
|
2006-01-10 02:36:43 +01:00
|
|
|
echo Install prefix ................. : $prefix
|
|
|
|
echo Install share .................. : $datadir
|