1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_HEADER(config.h)
5 [ if [ -f configure ]; then ]
6 AC_MSG_ERROR([Please run configure from the build directory (try ../AppRun --compile)])
10 if test -z "$PKG_CONFIG"; then
15 AC_MSG_CHECKING(that pkg-config runs)
16 if "$PKG_CONFIG" --version > /dev/null 2>&1 ; then
20 AC_MSG_ERROR([*** pkg-config missing ***
22 \'$PKG_CONFIG --version\' failed to run - make sure it is inside one of the
23 directories in your PATH environment variable!
25 pkg-config comes with the developement packages for GTK+-2.0, available at:
30 AC_DEFUN(ROX_REQUIRE, [
31 AC_MSG_CHECKING(that $1 (version >= $2) is installed)
32 if "$PKG_CONFIG" --atleast-version=$2 $1 ; then
36 if "$PKG_CONFIG" --exists $1 ; then
37 AC_MSG_ERROR(Current version is only `"$PKG_CONFIG" $1 --modversion`)
39 AC_MSG_ERROR(Package is not installed)
44 ROX_REQUIRE(gtk+-2.0, 2.6.0)
46 dnl Checks for programs.
50 # Compiler characteristics
54 dnl Use -Wall, etc if possible
55 dnl Note: GTK uses func(), so can't use -Wstrict-prototypes
57 if test "x$GCC" = "xyes"; then
58 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
60 AC_MSG_CHECKING(for GCC version 4)
61 [ if $CC --version | grep "(GCC) 4" > /dev/null; then ]
63 [ CFLAGS="$CFLAGS -Wno-pointer-sign" ]
69 dnl Extract version info from AppInfo.xml
70 AC_MSG_CHECKING(AppInfo version information)
72 VERSION=`sed -n 's/^.*<Version>\(@<:@.0-9@:>@*\).*<\/Version>.*$/\1/p' ../AppInfo.xml`
74 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
75 AC_MSG_RESULT($VERSION)
77 AC_ARG_ENABLE(new-tooltips,
78 AC_HELP_STRING([--enable-new-tooltips],
79 [Use Gtk 2.12's new tooltip API if possible]))
81 dnl Checks for header files.
83 dnl Checks for typedefs, structures, and compiler characteristics.
85 dnl Checks for library functions.
86 if test x$enable_new_tooltips = xyes
88 AC_CHECK_FUNC(gtk_widget_set_tooltip_text,
89 [HAVE_GTK_WIDGET_SET_TOOLTIP_TEXT=1],
90 [HAVE_GTK_WIDGET_SET_TOOLTIP_TEXT=0])
92 HAVE_GTK_WIDGET_SET_TOOLTIP_TEXT=0
94 AC_DEFINE_UNQUOTED(HAVE_GTK_WIDGET_SET_TOOLTIP_TEXT,
95 $HAVE_GTK_WIDGET_SET_TOOLTIP_TEXT)