| 1 |
dnl Process this file with autoconf to produce a configure script. |
| 2 |
|
| 3 |
AC_PREREQ(2.52) |
| 4 |
|
| 5 |
m4_define(glade_major_version, 3) |
| 6 |
m4_define(glade_minor_version, 6) |
| 7 |
m4_define(glade_micro_version, 7) |
| 8 |
m4_define(glade_version, glade_major_version.glade_minor_version.glade_micro_version) |
| 9 |
|
| 10 |
AC_INIT([glade3], [glade_version], |
| 11 |
[http://bugzilla.gnome.org/enter_bug.cgi?product=glade3]) |
| 12 |
|
| 13 |
AC_CONFIG_HEADERS([config.h]) |
| 14 |
AC_CONFIG_SRCDIR([gladeui/glade.h]) |
| 15 |
AC_CONFIG_MACRO_DIR([m4]) |
| 16 |
|
| 17 |
AC_DEFINE(GLADE_MAJOR_VERSION, glade_major_version, [Glade major version]) |
| 18 |
AC_SUBST(GLADE_MAJOR_VERSION, glade_major_version) |
| 19 |
AC_DEFINE(GLADE_MINOR_VERSION, glade_minor_version, [Glade minor version]) |
| 20 |
AC_SUBST(GLADE_MINOR_VERSION, glade_minor_version) |
| 21 |
AC_DEFINE(GLADE_MICRO_VERSION, glade_micro_version, [Glade micro version]) |
| 22 |
AC_SUBST(GLADE_MICRO_VERSION, glade_micro_version) |
| 23 |
|
| 24 |
AC_CANONICAL_SYSTEM |
| 25 |
|
| 26 |
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2]) |
| 27 |
|
| 28 |
AM_MAINTAINER_MODE |
| 29 |
|
| 30 |
IT_PROG_INTLTOOL([0.35.0]) |
| 31 |
|
| 32 |
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
| 33 |
AC_PATH_PROG(DLLTOOL, dlltool) |
| 34 |
|
| 35 |
AC_ISC_POSIX |
| 36 |
AC_PROG_CC |
| 37 |
AC_DISABLE_STATIC |
| 38 |
AC_PROG_INSTALL |
| 39 |
AC_PROG_MAKE_SET |
| 40 |
|
| 41 |
AC_LIBTOOL_DLOPEN |
| 42 |
AC_LIBTOOL_WIN32_DLL |
| 43 |
AM_PROG_LIBTOOL |
| 44 |
|
| 45 |
# If the source code has changed at all, increment GLADE_REVISION |
| 46 |
# If any interfaces have been added, removed, or changed, increment GLADE_CURRENT, and set GLADE_REVISION to 0. |
| 47 |
# If any interfaces have been added since the last public release, then increment GLADE_AGE. |
| 48 |
# If any interfaces have been removed since the last public release, then set GLADE_AGE to 0. |
| 49 |
# Reference: http://www.gnu.org/software/libtool/manual.html#Versioning |
| 50 |
GLADE_REVISION=3 |
| 51 |
GLADE_CURRENT=9 |
| 52 |
GLADE_AGE=0 |
| 53 |
GLADE_CURRENT_MINUS_AGE=`expr $GLADE_CURRENT - $GLADE_AGE` |
| 54 |
AC_SUBST(GLADE_REVISION) |
| 55 |
AC_SUBST(GLADE_CURRENT) |
| 56 |
AC_SUBST(GLADE_AGE) |
| 57 |
AC_SUBST(GLADE_CURRENT_MINUS_AGE) |
| 58 |
|
| 59 |
dnl are we unstable or stable? |
| 60 |
m4_define([glade_unstable], |
| 61 |
m4_if(m4_eval(glade_minor_version % 2), [1], [yes], [no])) |
| 62 |
GLADE_UNSTABLE=glade_unstable |
| 63 |
AC_SUBST(GLADE_UNSTABLE) |
| 64 |
|
| 65 |
dnl The symbol GLADE_UNSTABLE is defined above for substitution in |
| 66 |
dnl Makefiles and conditionally defined here as a preprocessor symbol |
| 67 |
dnl and automake conditional. |
| 68 |
if test "x$GLADE_UNSTABLE" = "xyes"; then |
| 69 |
AC_DEFINE(GLADE_UNSTABLE, 1, |
| 70 |
[Define to 1 if this is an unstable version of Glade]) |
| 71 |
fi |
| 72 |
AM_CONDITIONAL(GLADE_UNSTABLE, test "x$GLADE_UNSTABLE" = "xyes") |
| 73 |
|
| 74 |
# ================================================================ |
| 75 |
|
| 76 |
GNOME_COMMON_INIT |
| 77 |
GNOME_DEBUG_CHECK |
| 78 |
GNOME_COMPILE_WARNINGS([maximum]) |
| 79 |
GNOME_MAINTAINER_MODE_DEFINES |
| 80 |
|
| 81 |
# For the plugins, we don't use the warning flags defined by GNOME_COMPILE_WARNINGS. |
| 82 |
# These flags include -Wmissing-prototypes, which we prefer not to use. |
| 83 |
if test "x$GCC" = "xyes"; then |
| 84 |
PLUGINS_WARN_CFLAGS="-Wall -Wnested-externs -Wpointer-arith" |
| 85 |
fi |
| 86 |
AC_SUBST(PLUGINS_WARN_CFLAGS) |
| 87 |
|
| 88 |
dnl ================================================================ |
| 89 |
dnl Gettext stuff. |
| 90 |
dnl ================================================================ |
| 91 |
GETTEXT_PACKAGE=AC_PACKAGE_NAME |
| 92 |
AC_SUBST(GETTEXT_PACKAGE) |
| 93 |
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the gettext package.]) |
| 94 |
AM_GLIB_GNU_GETTEXT |
| 95 |
|
| 96 |
dnl ================================================================ |
| 97 |
dnl va_copy. |
| 98 |
dnl ================================================================ |
| 99 |
AC_MSG_CHECKING([how to copy va_list]) |
| 100 |
AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);], |
| 101 |
AC_MSG_RESULT([va_copy]), |
| 102 |
[ AH_TEMPLATE([va_copy], [define if va_copy is not available]) |
| 103 |
AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);], |
| 104 |
[ AC_DEFINE([va_copy], [__va_copy]) |
| 105 |
AC_MSG_RESULT([__va_copy])], |
| 106 |
[ AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))]) |
| 107 |
AC_MSG_RESULT([memcpy])] |
| 108 |
) |
| 109 |
]) |
| 110 |
|
| 111 |
dnl ================================================================ |
| 112 |
dnl Check for gtk-doc |
| 113 |
dnl ================================================================ |
| 114 |
GTK_DOC_CHECK(1.9) |
| 115 |
|
| 116 |
dnl ================================================================ |
| 117 |
dnl Check for gtk+ |
| 118 |
dnl ================================================================ |
| 119 |
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.14.0 gthread-2.0 libxml-2.0 >= 2.4.0]) |
| 120 |
AC_SUBST(GTK_LIBS) |
| 121 |
AC_SUBST(GTK_CFLAGS) |
| 122 |
|
| 123 |
dnl ================================================================ |
| 124 |
dnl Check for the unix print widgets in gtk+ |
| 125 |
dnl ================================================================ |
| 126 |
LIBS=$GTK_LIBS |
| 127 |
AC_CHECK_FUNCS(gtk_print_unix_dialog_new,[have_unix_print=yes]; break,[have_unix_print=no]) |
| 128 |
AM_CONDITIONAL(HAVE_GTK_UNIX_PRINT, test x"$have_unix_print" = "xyes") |
| 129 |
|
| 130 |
dnl ================================================================ |
| 131 |
dnl Check for optional gnome libs |
| 132 |
dnl ================================================================ |
| 133 |
AC_ARG_ENABLE(gnome, |
| 134 |
AS_HELP_STRING([--disable-gnome], [disable gnome catalog]), |
| 135 |
check_gnome=$enableval, check_gnome=yes) |
| 136 |
|
| 137 |
if test x"$check_gnome" = x"yes"; then |
| 138 |
PKG_CHECK_MODULES(GNOME, [libbonoboui-2.0 libgnomeui-2.0], |
| 139 |
[have_gnome=yes],[have_gnome=no]) |
| 140 |
AC_SUBST(GNOME_LIBS) |
| 141 |
AC_SUBST(GNOME_CFLAGS) |
| 142 |
else |
| 143 |
have_gnome=no |
| 144 |
fi |
| 145 |
|
| 146 |
AM_CONDITIONAL(BUILD_GNOME, test x"$have_gnome" = "xyes") |
| 147 |
|
| 148 |
|
| 149 |
dnl ================================================================ |
| 150 |
dnl Python for optional python dev libs |
| 151 |
dnl ================================================================ |
| 152 |
AC_ARG_ENABLE(python, |
| 153 |
AS_HELP_STRING([--disable-python], [disable python catalog]), |
| 154 |
check_python=$enableval, check_python=yes) |
| 155 |
|
| 156 |
if test x"$check_python" = x"yes"; then |
| 157 |
PYGTK_REQUIRED_MAJOR=2 |
| 158 |
PYGTK_REQUIRED_MINOR=10 |
| 159 |
PYGTK_REQUIRED_MICRO=0 |
| 160 |
PKG_CHECK_MODULES(PYGTK, [pygtk-2.0 >= 2.10.0], [have_python=yes],[have_python=no]) |
| 161 |
|
| 162 |
AM_CHECK_PYTHON_HEADERS(, [have_python_headers=no]) |
| 163 |
AM_CHECK_PYTHON_LIBS(, [have_python_lib=no]) |
| 164 |
|
| 165 |
if test x"$have_python_headers" = x"no"; then |
| 166 |
have_python=no |
| 167 |
fi |
| 168 |
|
| 169 |
if test x"$have_python_lib" = x"no"; then |
| 170 |
have_python=no |
| 171 |
fi |
| 172 |
|
| 173 |
|
| 174 |
AC_DEFINE_UNQUOTED(PYGTK_REQUIRED_MAJOR, $PYGTK_REQUIRED_MAJOR, Pygtk mayor version required) |
| 175 |
AC_DEFINE_UNQUOTED(PYGTK_REQUIRED_MINOR, $PYGTK_REQUIRED_MINOR, Pygtk minor version required) |
| 176 |
AC_DEFINE_UNQUOTED(PYGTK_REQUIRED_MICRO, $PYGTK_REQUIRED_MICRO, Pygtk micro version required) |
| 177 |
|
| 178 |
AC_SUBST(PYGTK_LIBS) |
| 179 |
AC_SUBST(PYGTK_CFLAGS) |
| 180 |
else |
| 181 |
have_python=no |
| 182 |
fi |
| 183 |
|
| 184 |
AM_CONDITIONAL(BUILD_PYTHON, test x"$have_python" = "xyes") |
| 185 |
|
| 186 |
# ================================================================== |
| 187 |
# Glade User Manual (requires gnome-doc-utils) |
| 188 |
# ================================================================== |
| 189 |
|
| 190 |
GNOME_DOC_INIT([0.9.0],[],[:]) |
| 191 |
|
| 192 |
dnl ================================================================ |
| 193 |
dnl Check for windows |
| 194 |
dnl ================================================================ |
| 195 |
case $host_os in |
| 196 |
*mingw* | pw32* | cygwin*) |
| 197 |
platform_win32=yes |
| 198 |
;; |
| 199 |
*) |
| 200 |
platform_win32=no |
| 201 |
;; |
| 202 |
esac |
| 203 |
AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = "xyes") |
| 204 |
|
| 205 |
case $host_os in |
| 206 |
*mingw*) |
| 207 |
native_win32=yes |
| 208 |
;; |
| 209 |
*) |
| 210 |
native_win32=no |
| 211 |
;; |
| 212 |
esac |
| 213 |
AM_CONDITIONAL(NATIVE_WIN32, test x"$native_win32" = "xyes") |
| 214 |
|
| 215 |
if test "$native_win32" = "yes"; then |
| 216 |
AC_CHECK_TOOL(WINDRES, windres, no) |
| 217 |
if test "$WINDRES" = no; then |
| 218 |
AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.]) |
| 219 |
fi |
| 220 |
fi |
| 221 |
|
| 222 |
dnl ================================================================ |
| 223 |
dnl Check for GDK Quartz and MacOSX integration package |
| 224 |
dnl ================================================================ |
| 225 |
_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0` |
| 226 |
AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz]) |
| 227 |
if test "x$_gdk_tgt" = xquartz; then |
| 228 |
PKG_CHECK_MODULES(IGE_MAC, ige-mac-integration) |
| 229 |
|
| 230 |
IGE_MAC_BUNDLE_FLAG= |
| 231 |
|
| 232 |
AC_ARG_ENABLE(mac-bundle, |
| 233 |
AS_HELP_STRING([--enable-mac-bundle], [enable mac bundling]), |
| 234 |
build_bundle=yes, build_bundle=no) |
| 235 |
|
| 236 |
if test "x$build_bundle" = xyes; then |
| 237 |
AC_MSG_NOTICE([enableing mac bundle..]) |
| 238 |
|
| 239 |
IGE_MAC_BUNDLE_FLAG=-DMAC_BUNDLE |
| 240 |
fi |
| 241 |
|
| 242 |
AC_SUBST(IGE_MAC_BUNDLE_FLAG) |
| 243 |
AC_SUBST(IGE_MAC_LIBS) |
| 244 |
AC_SUBST(IGE_MAC_CFLAGS) |
| 245 |
fi |
| 246 |
|
| 247 |
AC_SUBST([AM_CPPFLAGS]) |
| 248 |
AC_SUBST([AM_CFLAGS]) |
| 249 |
AC_SUBST([AM_CXXFLAGS]) |
| 250 |
AC_SUBST([AM_LDFLAGS]) |
| 251 |
|
| 252 |
AC_CONFIG_FILES([ |
| 253 |
Makefile |
| 254 |
data/gladeui-1.0.pc |
| 255 |
data/glade-3.desktop.in |
| 256 |
data/Makefile |
| 257 |
data/icons/Makefile |
| 258 |
data/icons/hicolor/Makefile |
| 259 |
data/icons/hicolor/16x16/Makefile |
| 260 |
data/icons/hicolor/16x16/apps/Makefile |
| 261 |
data/icons/hicolor/22x22/Makefile |
| 262 |
data/icons/hicolor/22x22/apps/Makefile |
| 263 |
data/icons/hicolor/24x24/Makefile |
| 264 |
data/icons/hicolor/24x24/apps/Makefile |
| 265 |
data/icons/hicolor/32x32/Makefile |
| 266 |
data/icons/hicolor/32x32/apps/Makefile |
| 267 |
data/icons/hicolor/48x48/Makefile |
| 268 |
data/icons/hicolor/48x48/apps/Makefile |
| 269 |
data/icons/hicolor/scalable/Makefile |
| 270 |
data/icons/hicolor/scalable/apps/Makefile |
| 271 |
gladeui/Makefile |
| 272 |
gladeui/gladeui.rc |
| 273 |
src/Makefile |
| 274 |
src/glade-3.rc |
| 275 |
plugins/Makefile |
| 276 |
plugins/gtk+/Makefile |
| 277 |
plugins/gtk+/icons/Makefile |
| 278 |
plugins/gtk+/icons/16x16/Makefile |
| 279 |
plugins/gtk+/icons/22x22/Makefile |
| 280 |
plugins/gnome/Makefile |
| 281 |
plugins/gnome/icons/Makefile |
| 282 |
plugins/gnome/icons/16x16/Makefile |
| 283 |
plugins/gnome/icons/22x22/Makefile |
| 284 |
plugins/python/Makefile |
| 285 |
po/Makefile.in |
| 286 |
doc/Makefile |
| 287 |
doc/version.xml |
| 288 |
help/Makefile |
| 289 |
]) |
| 290 |
|
| 291 |
AC_OUTPUT |
| 292 |
|
| 293 |
echo " |
| 294 |
|
| 295 |
Configuration: |
| 296 |
|
| 297 |
Source code location: ${srcdir} |
| 298 |
Compiler: ${CC} |
| 299 |
GTK+ UNIX Print Widgets: ${have_unix_print} |
| 300 |
GNOME UI Widgets: ${have_gnome} |
| 301 |
PYTHON Widgets support: ${have_python} |
| 302 |
|
| 303 |
Build Reference Manual: ${enable_gtk_doc} |
| 304 |
Build User Manual: ${gdu_cv_have_gdu} |
| 305 |
" |