GTK+/GNOME based MOO-client for UNIX.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

235 lines
6.6 KiB

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.59)
  3. AC_INIT(gnoemoe, 2.2.0, http://www.icecrew.nl/software/gnoemoe)
  4. AC_CONFIG_SRCDIR(gnoemoe/gm-app.c)
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
  7. AM_CONFIG_HEADER(config.h)
  8. AM_MAINTAINER_MODE
  9. AC_ISC_POSIX
  10. AC_STDC_HEADERS
  11. AC_PROG_CC
  12. AC_PROG_YACC
  13. AM_PROG_LIBTOOL
  14. AM_PROG_CC_STDC
  15. AC_HEADER_STDC
  16. AM_PROG_LIBTOOL
  17. AC_PROG_INTLTOOL([0.31])
  18. AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
  19. AC_PROG_INSTALL
  20. AC_PROG_MAKE_SET
  21. # AC_PATH_PROG(GCONFTOOL, gconftool-2)
  22. AM_GCONF_SOURCE_2
  23. GETTEXT_PACKAGE=gnoemoe
  24. AC_SUBST(GETTEXT_PACKAGE)
  25. AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
  26. ALL_LINGUAS="nl"
  27. AM_GLIB_GNU_GETTEXT
  28. AC_PROG_YACC
  29. PKG_CHECK_MODULES(PACKAGE, [
  30. gtk+-2.0 >= 2.8.0
  31. gdk-pixbuf-2.0
  32. libgnome-2.0
  33. libglade-2.0
  34. gtksourceview-1.0
  35. gnome-vfs-2.0
  36. libgnomeui-2.0
  37. vte
  38. libxml-2.0
  39. ])
  40. AC_SUBST(PACKAGE_CFLAGS)
  41. AC_SUBST(PACKAGE_LIBS)
  42. AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
  43. AC_ARG_ENABLE(parser, [ --disable-parser disable use of the moo code parser in the editor],
  44. parseren=$enableval, parseren=yes)
  45. if test "_$parseren" = "_yes"; then
  46. AC_DEFINE([HAVE_PARSER], 1, [MOO code parser is enabled])
  47. AM_CONDITIONAL(HAS_PARSER, true)
  48. parsermsg="enjoy parsing"
  49. dnl Check for perfect hash function generator
  50. AC_CHECK_PROG([GPERF],[gperf],[gperf])
  51. else
  52. AM_CONDITIONAL(HAS_PARSER, false)
  53. parsermsg="(user disabled)"
  54. fi
  55. AC_ARG_ENABLE(ruby, [ --disable-ruby disable use of the ruby scripting support],
  56. rubyen=$enableval, rubyen=yes)
  57. #----------------------------------------------------------------
  58. # Look for Ruby
  59. #----------------------------------------------------------------
  60. if test "_$rubyen" = "_yes"; then
  61. RUBYBIN=
  62. AC_ARG_WITH(ruby,[ --with-ruby=path Set location of Ruby executable],[ RUBYBIN="$withval"], [RUBYBIN=])
  63. # First figure out what the name of Ruby is
  64. if test -z "$RUBYBIN"; then
  65. AC_CHECK_PROGS(RUBY, ruby)
  66. else
  67. RUBY="$RUBYBIN"
  68. fi
  69. AC_MSG_CHECKING(for Ruby header files)
  70. if test -n "$RUBY"; then
  71. RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
  72. if test "$RUBYDIR" != ""; then
  73. dirs="$RUBYDIR"
  74. RUBY_CFLAGS=none
  75. for i in $dirs; do
  76. if test -r $i/ruby.h; then
  77. AC_MSG_RESULT($i)
  78. RUBY_CFLAGS="-idirafter $i"
  79. break;
  80. fi
  81. done
  82. if test "$RUBY_CFLAGS" = none; then
  83. AC_MSG_RESULT(could not locate ruby.h, disabling ruby support)
  84. rubymsg="(no headers found, install ruby-dev)"
  85. rubyen="no"
  86. fi
  87. # Find library and path for linking.
  88. AC_MSG_CHECKING(for Ruby library)
  89. RUBYLIB=""
  90. rb_libdir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["libdir"]]') 2>/dev/null`
  91. rb_bindir=`($RUBY -rrbconfig -e 'print Config::CONFIG[["bindir"]]') 2>/dev/null`
  92. dirs="$dirs $rb_libdir $rb_bindir"
  93. rb_libruby=`($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBRUBY_A"]]') 2>/dev/null`
  94. RUBY_LIBS=`($RUBY -rrbconfig -e '
  95. c = Config::CONFIG
  96. if c.has_key? "LIBRUBYARG_STATIC" # 1.8.x
  97. if c[["LIBRUBY"]] == c[["LIBRUBY_A"]]
  98. link = c[["LIBRUBYARG_STATIC"]]
  99. else
  100. link = c[["LIBRUBYARG_SHARED"]]
  101. end
  102. else # 1.6.x
  103. link = "-l" + c[["RUBY_INSTALL_NAME"]]
  104. end
  105. puts link') 2>/dev/null`
  106. if test "$rb_libruby" != ""; then
  107. for i in $dirs; do
  108. if (test -r $i/$rb_libruby;) then
  109. RUBYLIB="$i"
  110. break;
  111. fi
  112. done
  113. fi
  114. if test "$RUBYLIB" = ""; then
  115. AC_MSG_RESULT(not found... disabling ruby support)
  116. rubymsg="(libs not found)"
  117. rubyen="no"
  118. else
  119. AC_MSG_RESULT($RUBY_LIBS in $RUBYLIB)
  120. fi
  121. else
  122. AC_MSG_RESULT(unable to determine ruby configuration, disabling ruby support)
  123. rubymsg="(unable to determine configuration)"
  124. rubyen="no"
  125. fi
  126. else
  127. AC_MSG_RESULT(not found.. disabling ruby support)
  128. rubymsg="(no headers found, install ruby-dev)"
  129. rubyen="no"
  130. fi
  131. fi
  132. if test "_$rubyen" == "_no"; then
  133. RUBY_CFLAGS=""
  134. RUBY_LIBS=""
  135. AM_CONDITIONAL(HAS_RUBY, false)
  136. else
  137. rubymsg="enjoy scripting :)"
  138. AC_DEFINE([HAVE_RUBY], 1, [Ruby scripting is enabled])
  139. AM_CONDITIONAL(HAS_RUBY, true)
  140. fi
  141. AC_SUBST(RUBY_CFLAGS)
  142. AC_SUBST(RUBY_LIBS)
  143. # Look for libnotify
  144. LIBNOTIFY_REQUIRED=0.3.2
  145. AC_ARG_ENABLE(libnotify, AC_HELP_STRING([--disable-libnotify],
  146. [Disable libnotify support]),,
  147. enable_libnotify=auto)
  148. if test "x$enable_libnotify" != "xno"; then
  149. PKG_CHECK_MODULES(NOTIFY, libnotify >= $LIBNOTIFY_REQUIRED,
  150. have_libnotify=yes,
  151. have_libnotify=no)
  152. if test "x$have_libnotify" = "xno" -a "x$enable_libnotify" = "xyes"; then
  153. AC_MSG_ERROR([libnotify support explicitly requested, but libnotify couldn't be found])
  154. fi
  155. if test "x$have_libnotify" = "xyes"; then
  156. enable_libnotify=yes
  157. fi
  158. fi
  159. AM_CONDITIONAL(USE_NOTIFY, test x"$enable_libnotify" = xyes)
  160. if test x$enable_libnotify = xyes ; then
  161. # Find out the version of LIBNOTIFY we're using
  162. libnotify_version=`pkg-config --modversion libnotify`
  163. LIBNOTIFY_VERSION_MAJOR=`echo $libnotify_version | awk -F. '{print $1}'`
  164. LIBNOTIFY_VERSION_MINOR=`echo $libnotify_version | awk -F. '{print $2}'`
  165. LIBNOTIFY_VERSION_MICRO=`echo $libnotify_version | awk -F. '{print $3}'`
  166. if test "z$LIBNOTIFY_VERSION_MAJOR" = "z"; then
  167. LIBNOTIFY_VERSION_MAJOR="0"
  168. fi
  169. if test "z$LIBNOTIFY_VERSION_MINOR" = "z"; then
  170. LIBNOTIFY_VERSION_MINOR="0"
  171. fi
  172. if test "z$LIBNOTIFY_VERSION_MICRO" = "z"; then
  173. LIBNOTIFY_VERSION_MICRO="0"
  174. fi
  175. echo "Your libnotify version is $LIBNOTIFY_VERSION_MAJOR,$LIBNOTIFY_VERSION_MINOR,$LIBNOTIFY_VERSION_MICRO."
  176. NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MAJOR=$LIBNOTIFY_VERSION_MAJOR"
  177. NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MINOR=$LIBNOTIFY_VERSION_MINOR"
  178. NOTIFY_CFLAGS="$NOTIFY_CFLAGS -DLIBNOTIFY_VERSION_MICRO=$LIBNOTIFY_VERSION_MICRO"
  179. AC_DEFINE(HAVE_NOTIFY, 1, [Define if libnotify support is enabled])
  180. AC_SUBST(NOTIFY_CFLAGS)
  181. AC_SUBST(NOTIFY_LIBS)
  182. fi
  183. AC_OUTPUT([
  184. Makefile
  185. pixmaps/Makefile
  186. pixmaps/userlist/Makefile
  187. pixmaps/ice-userlist/Makefile
  188. pixmaps/tray/Makefile
  189. gnoemoe/Makefile
  190. gnoemoe/parser/Makefile
  191. po/Makefile.in
  192. scripts/Makefile
  193. ui/Makefile
  194. data/Makefile
  195. ])
  196. echo
  197. echo Building with ruby ............. : $rubyen $rubymsg
  198. echo Building with parser ........... : $parseren $parsermsg
  199. echo Building with libnotify ........ : $have_libnotify $libnotify_version
  200. echo Install prefix ................. : $prefix
  201. echo Install share .................. : $datadir