Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 200 lines (173 sloc) 5.375 kb
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
AC_INIT(gnome-globalmenu, [0.7.8], [rainwoodman@gmail.com], [gnome-globalmenu])

AC_CONFIG_MACRO_DIR([autotools])
AC_CONFIG_AUX_DIR([autotools])
AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools")

AM_INIT_AUTOMAKE([1.9 tar-ustar dist-bzip2 subdir-objects])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)

# maintainer mode
AM_MAINTAINER_MODE


# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_LIBTOOL_DLOPEN
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
DOLT
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

AM_GCONF_SOURCE_2

AC_PATH_PROG(GCONFTOOL, gconftool-2)

# tests
USE_TESTS=true
AC_ARG_ENABLE(
[tests],
AC_HELP_STRING([--enable-tests], [enable tests, default is yes]),
[ test "x$enableval" == xno && USE_TESTS=false ],
[ USE_TESTS=true ])
AM_CONDITIONAL([ENABLE_TESTS], [test "x$USE_TESTS" == xtrue])

# misc defines
AC_DEFINE(WNCK_I_KNOW_THIS_IS_UNSTABLE, 1, [libwnck is happy with this])
AC_DEFINE(GMENU_I_KNOW_THIS_IS_UNSTABLE, 1,[libgnome-menus is happy with this])
AC_DEFINE(GDataTestFunc, void*, [Workaround GDataTestFunc problem])

# intl
AM_GLIB_GNU_GETTEXT
# The following lines replaces glib-gettext with autopoint which doesn't work with GNOME
#AM_GNU_GETTEXT(external)
#AM_GNU_GETTEXT_VERSION(0.14.5)
IT_PROG_INTLTOOL
GETTEXT_PACKAGE=gnome-globalmenu
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [gettext package])
AC_SUBST(GETTEXT_PACKAGE)
if test "x$localedir" == x; then
localedir='${datadir}/locale'
AC_SUBST(localedir)
fi
# Check for Vala
VALA_PROG_VALAC(0.7.7)

VALA_DEFAULT_PKGS="--vapidir \$(top_srcdir) --vapidir \$(top_srcdir)/vapi --pkg configmake --pkg config"
AC_SUBST(VALA_DEFAULT_PKGS)
# check for modules

GLIB_REQUIRED=2.10.0
GTK_REQUIRED=2.10.0

WNCK_REQUIRED=2.16.0
PANEL_REQUIRED=2.16.0
GMENU_REQUIRED=2.16.0
NOTIFY_REQUIRED=0.4.0
X11_REQUIRED=1.1.0
XFCE4_PANEL_REQUIRED=4.4.3

PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

PKG_CHECK_MODULES(WNCK, libwnck-1.0 >= $WNCK_REQUIRED)
AC_SUBST(WNCK_CFLAGS)
AC_SUBST(WNCK_LIBS)

PKG_CHECK_MODULES(GMENU, libgnome-menu >= $GMENU_REQUIRED)
AC_SUBST(GMENU_CFLAGS)
AC_SUBST(GMENU_LIBS)

PKG_CHECK_MODULES(X11, x11 >= $X11_REQUIRED)
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)

AC_ARG_WITH(
[gir],
AC_HELP_STRING([--with-gir], [enable building gir typelib]),
[],
[with_gir=no])
AS_IF([test "x$with_gir" != xno],
[
AC_PATH_PROG(GIRCOMPILER, [g-ir-compiler] )
AS_IF([test -n "$GIRCOMPILER" ],
[with_gir=true],
AC_MSG_FAILURE(
[test for g-ir-compiler failed. (--without-gir to disable).]
)
)
AC_SUBST(GIRCOMPILER)
GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
AC_SUBST(GIRDIR)
TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
AC_SUBST(TYPELIBDIR)
]
)
AM_CONDITIONAL(WITH_GIR, [test "x$with_gir" = xtrue ])
AC_ARG_WITH(
[gnome-panel],
AC_HELP_STRING([--without-gnome-panel], [disable gnome panel applet]),
[],
[with_gnome_panel=yes])
AS_IF([test "x$with_gnome_panel" != xno],
[PKG_CHECK_MODULES(GNOME_PANEL,
[ libpanelapplet-2.0 >= $PANEL_REQUIRED,
libnotify >= $NOTIFY_REQUIRED
],
[
with_gnome_panel=true;
AC_SUBST(GNOME_PANEL_CFLAGS)
AC_SUBST(GNOME_PANEL_LIBS)
BONOBO_SERVER_DIR="$($PKG_CONFIG --variable=libdir bonobo-activation-2.0)/bonobo/servers"
AC_SUBST(BONOBO_SERVER_DIR)
],
[
with_gnome_panel=false;
if test "x$with_gnome_panel" != xcheck; then
AC_MSG_FAILURE(
[test for libpanelapplet-2.0 and libnotify failed. (--without-gnome-panel to disable).])
fi;]
)])
AM_CONDITIONAL(WITH_GNOME_PANEL, [test "x$with_gnome_panel" = xtrue ])

AC_ARG_WITH(
[xfce4-panel],
AC_HELP_STRING([--with-xfce4-panel], [enable xfce panel applet]),
[],
[with_xfce4_panel=check])
AS_IF([test "x$with_xfce4_panel" != xno],
[PKG_CHECK_MODULES(XFCE4_PANEL, [libxfce4panel-1.0 >= $XFCE4_PANEL_REQUIRED],
[
with_xfce4_panel=true;
AC_SUBST(XFCE4_PANEL_CFLAGS)
AC_SUBST(XFCE4_PANEL_LIBS)
XFCE4_PANEL_PLUGIN_DIR="$($PKG_CONFIG --variable=libexecdir libxfce4panel-1.0)/xfce4/panel-plugins"
XFCE4_PANEL_DESKTOP_DIR="$($PKG_CONFIG --variable=datadir libxfce4panel-1.0)/xfce4/panel-plugins"
AC_SUBST(XFCE4_PANEL_PLUGIN_DIR)
AC_SUBST(XFCE4_PANEL_DESKTOP_DIR)
],
[
with_xfce4_panel=false;
if test "x$with_xfce4_panel" != xcheck; then
AC_MSG_FAILURE(
[test for libxfce4panel-1.0 failed. (--without-xfce4-panel to disable).])
fi;]
)])
AM_CONDITIONAL(WITH_XFCE4_PANEL, [test "x$with_xfce4_panel" = xtrue ])


GTK_MODULES_DIR="$($PKG_CONFIG --variable=libdir gtk+-2.0)/gtk-2.0/modules"
AC_SUBST(GTK_MODULES_DIR)

# svnversion
dnl AC_PATH_PROG(SVNVERSION_BIN, [svnversion])
dnl SVNVERSION=`$SVNVERSION_BIN|sed -e 's;:;_;g' -e 's;exported;;'`
dnl AC_SUBST(SVNVERSION)
dnl AC_DEFINE_UNQUOTED(SVNVERSION, "$SVNVERSION", [svn version if appropriate])

# old automake fix
AC_SUBST(abs_top_srcdir)
# output

AC_CONFIG_FILES(
[Makefile
legacy-support/Makefile
libserver/Makefile
libserver/tests/Makefile
libsettings/Makefile
libsettings/tests/Makefile
applet/Makefile
xfce/Makefile
tests/Makefile
vapi/Makefile
gtk-modules/Makefile
globalmenu-plugin/Makefile
globalmenu-plugin/tests/Makefile
gtk-modules/gnomenu-panel/Makefile
po/Makefile.in
])

AC_OUTPUT
Something went wrong with that request. Please try again.