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 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
|
AC_PREREQ(2.54)
# Making releases:
# LIBGNOMEUI_MICRO_VERSION += 1;
# LIBGNOMEUI_INTERFACE_AGE += 1;
# LIBGNOMEUI_BINARY_AGE += 1;
# if any functions have been added, set LIBGNOMEUI_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set LIBGNOMEUI_BINARY_AGE and LIBGNOMEUI_INTERFACE_AGE to 0.
#
m4_define([libgnomeui_major_version], [2])
m4_define([libgnomeui_minor_version], [8])
m4_define([libgnomeui_micro_version], [1])
m4_define([libgnomeui_interface_age], [1])
# If you need a modifier for the version number.
# Normally empty, but can be used to make "fixup" releases.
m4_define([libgnomeui_extraversion], [])
dnl Required versions of other packages
m4_define([esound_required_version], [0.2.26])
m4_define([audiofile_required_version], [0.2.3])
m4_define([libgnome_required_version], [2.0.0])
m4_define([libgnomecanvas_required_version], [2.0.0])
m4_define([libbonoboui_required_version], [2.0.0])
m4_define([gconf_required_version], [1.1.11])
m4_define([pango_required_version], [1.1.2])
m4_define([gtk_required_version], [2.4.1])
m4_define([gnomevfs_required_version], [2.7.3])
m4_define([libglade_required_version], [2.0.0])
m4_define([gnome_keyring_required_version], [0.4])
dnl libtool versioning from libgnome
m4_define([libgnomeui_current], [m4_eval(100 * libgnomeui_minor_version + libgnomeui_micro_version - libgnomeui_interface_age)])
m4_define([libgnomeui_binary_age], [m4_eval(100 * libgnomeui_minor_version + libgnomeui_micro_version)])
m4_define([libgnomeui_revision], [libgnomeui_interface_age])
m4_define([libgnomeui_age], [m4_eval(libgnomeui_binary_age - libgnomeui_interface_age)])
m4_define([libgnomeui_version], [libgnomeui_major_version().libgnomeui_minor_version().libgnomeui_micro_version()libgnomeui_extraversion()])
AC_INIT([libgnomeui], [libgnomeui_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=libgnomeui])
AC_CONFIG_SRCDIR([libgnomeui/libgnomeui.h])
LIBGNOMEUI_MAJOR_VERSION=libgnomeui_major_version
LIBGNOMEUI_MINOR_VERSION=libgnomeui_minor_version
LIBGNOMEUI_MICRO_VERSION=libgnomeui_micro_version
LIBGNOMEUI_INTERFACE_AGE=libgnomeui_interface_age
dnl libtool versioning from libgnome
LIBGNOMEUI_CURRENT=libgnomeui_current
LIBGNOMEUI_REVISION=libgnomeui_revision
LIBGNOMEUI_AGE=libgnomeui_age
AC_SUBST(LIBGNOMEUI_CURRENT)
AC_SUBST(LIBGNOMEUI_REVISION)
AC_SUBST(LIBGNOMEUI_AGE)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
dnl make aclocal calls respect $ACLOCAL_FLAGS
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST(ACLOCAL_AMFLAGS)
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
GETTEXT_PACKAGE=libgnomeui-2.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
[Name of gettext translation domain for library])
ALL_LINGUAS="af am ar az be bg bn br bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja kn ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta th tk tr uk vi wa yi zh_CN zh_TW zu"
AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR([GNOMEUILOCALEDIR])
GNOME_COMPILE_WARNINGS
dnl Define GNOME_ENABLE_DEBUG if the --enable-debug switch was given.
GNOME_DEBUG_CHECK
dnl
dnl Check for -lSM (for gnome-client)
dnl
AC_PATH_XTRA
SM_LIBS=""
sm_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
GNOME_HAVE_SM=true
AC_CHECK_LIB(SM, SmcSaveYourselfDone,
[SM_LIBS="$X_LIBS -lSM -lICE"],GNOME_HAVE_SM=false,
$X_LIBS -lICE)
AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
if test "$GNOME_HAVE_SM" = true; then
AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
fi
AC_SUBST(SM_LIBS)
CPPFLAGS="$sm_save_cppflags"
dnl
dnl Start of pkg-config checks
dnl
dnl We first check for esound and audiofile (which has conditional
dnl support built in)
dnl
SOUND_MODULES="esound >= esound_required_version dnl
audiofile >= audiofile_required_version"
PKG_CHECK_MODULES(SOUND_TEST, [$SOUND_MODULES], [
AC_DEFINE(HAVE_LIBAUDIOFILE, 1,
[Define to 1 if you have libaudiofile installed])
AC_DEFINE(HAVE_ESD, 1,
[Define to 1 if you have libesd installed])
esd_msg=yes
],[
SOUND_MODULES=""
esd_msg=no
])
dnl
dnl libjpeg
dnl
if test -z "$LIBJPEG"; then
AC_CHECK_LIB(jpeg, jpeg_start_decompress,
[AC_CHECK_HEADER(jpeglib.h,
jpeg_ok=yes,
jpeg_ok=no)],
AC_MSG_WARN(*** (jpeg library not found) ***), -lm)
if test "$jpeg_ok" = yes; then
JPEG='jpeg'; LIBJPEG='-ljpeg'
AC_DEFINE(HAVE_LIBJPEG, 1,
[Define to 1 if you have libjpeg installed])
else
AC_MSG_WARN(*** JPEG thumbnail loader will not be built (jpeg header file not found) ***)
fi
fi
AC_SUBST(LIBJPEG)
GNOMEUI_MODULES="dnl
libgnome-2.0 >= libgnome_required_version dnl
libgnomecanvas-2.0 >= libgnomecanvas_required_version dnl
libbonoboui-2.0 >= libbonoboui_required_version dnl
gconf-2.0 >= gconf_required_version dnl
pango >= pango_required_version dnl
gnome-vfs-2.0 >= gnomevfs_required_version dnl
gnome-keyring-1 >= gnome_keyring_required_version"
PKG_CHECK_MODULES(LIBGNOMEUI, [$GNOMEUI_MODULES])
LIBGNOMEUI_LIBS="$LIBGNOMEUI_LIBS $LIBJPEG"
PKG_CHECK_MODULES(LIBGNOMEUI_COMPONENTS, [$GNOMEUI_MODULES])
PKG_CHECK_MODULES(LIBGNOMEUI_DEMOS, [$GNOMEUI_MODULES])
PKG_CHECK_MODULES(LIBGNOMEUI_GLADE, [$GNOMEUI_MODULES dnl
libglade-2.0 >= libglade_required_version])
AC_PATH_PROG(LIBGLADE_CONVERT, libglade-convert)
if test -z "$LIBGLADE_CONVERT" ; then
AC_MSG_WARN([libglade-convert (from libglade 2.0) is needed for the checks in the tests directory.])
fi
dnl File Chooser stuff
PKG_CHECK_MODULES(FILE_SYSTEM,
[gtk+-2.0 >= gtk_required_version dnl
gnome-vfs-2.0 >= gnomevfs_required_version])
GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
AC_SUBST(GTK_BINARY_VERSION)
dnl
dnl Check for gtk-doc
dnl
GTK_DOC_CHECK([1.0])
dnl AC_SUBST GTK+ version
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
AC_SUBST(GTK_VERSION)
AC_MSG_CHECKING([for gtk+ multihead support])
if $PKG_CONFIG --atleast-version 2.1.0 gtk+-2.0; then
AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build
libgnomeui. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
AC_CHECK_HEADERS(dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h)
AC_CHECK_FUNCS(bind_textdomain_codeset)
dnl This is installed from GTK+ 2.0's gdk-pixbuf
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
test -z "$GDK_PIXBUF_CSOURCE" && AC_MSG_ERROR([
*** You need the gdk-pixbuf-csource tool which is installed
*** from GTK+ 2.0's gdk-pixbuf.
***
*** Either the location where you installed your GTK+ 2.0 is
*** not in your PATH or something is screwed up with your
*** GTK+ 2.0 installation
])
dnl Don't use AC_PROG_AWK since we need the full pathname.
AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
AC_PATH_PROGS(PERL, perl5 perl)
AC_PATH_PROG(GCONFTOOL, gconftool-2)
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_ARG_ENABLE(rebuilds,
AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules]),,
[enable_rebuilds=yes])
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
test -n "$PERL" && \
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
test -n "$AWK" ; then
REBUILD=
fi
AC_SUBST(REBUILD)
AC_CONFIG_FILES([
Makefile
po/Makefile.in
libgnomeui/Makefile
libgnomeui/libgnomeui-2.0.pc
libgnomeui/pixmaps/Makefile
file-chooser/Makefile
glade/Makefile
images/Makefile
demos/Makefile
test-gnome/Makefile
doc/Makefile
doc/reference/Makefile
doc/reference/version.xml
])
AC_OUTPUT
echo "configuration:
esd support: ${esd_msg}
doc build: ${enable_gtk_doc}
"
|