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
|
AC_INIT([Zenity],[2.31.6],[http://bugzilla.gnome.org/enter_bug.cgi?product=zenity],[zenity])
AC_PREREQ([2.59])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src])
AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
GNOME_COMMON_INIT
GNOME_DOC_INIT
AM_MAINTAINER_MODE
IT_PROG_INTLTOOL([0.40.0])
AC_PROG_CC
GTK_REQUIRED=2.18.0
AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
[case "$with_gtk" in
2.0|3.0) ;;
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
esac],
[with_gtk=2.0])
AC_MSG_RESULT([$with_gtk])
case "$with_gtk" in
2.0) GTK_API_VERSION=2.0
GTK_REQUIRED=2.18.0
;;
3.0) GTK_API_VERSION=3.0
GTK_REQUIRED=2.90.4
;;
esac
PKG_CHECK_MODULES([ZENITY],[gtk+-$GTK_API_VERSION >= $GTK_REQUIRED glib-2.0])
AC_SUBST([ZENITY_CFLAGS])
AC_SUBST([ZENITY_LIBS])
dnl *************************
dnl Check for the GTK+ backend, if it's X11, we -lX11
dnl *************************
zenity_save_cflags="$CFLAGS"
# pull in the CFLAGS to locate gdkconfig.h
CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
AC_COMPILE_IFELSE([
#include <gdkconfig.h>
int main(void) {
#ifndef GDK_WINDOWING_X11
#error GDK_WINDOWING_X11 not defined
#endif
return 0;
}
],
GDK_BACKEND_X11=yes,
GDK_BACKEND_X11=no)
CFLAGS="$zenity_save_cflags"
if test "x$GDK_BACKEND_X11" = "xyes"; then
PKG_CHECK_MODULES(X, x11)
ZENITY_CFLAGS="$ZENITY_CFLAGS $X_CFLAGS"
ZENITY_LIBS="$ZENITY_LIBS $X_LIBS"
fi
# *******************************
# perl check
# *******************************
AC_PATH_PROG([PERL],[perl],)
# *******************************
# libnotify check
# *******************************
LIBNOTIFY_REQUIRED=0.4.1
AC_ARG_ENABLE([libnotify],
AC_HELP_STRING([--enable-libnotify],[enable libnotify support]),,
[enable_libnotify=yes])
if test x$enable_libnotify = xyes ; then
PKG_CHECK_MODULES([LIBNOTIFY],[libnotify >= $LIBNOTIFY_REQUIRED],
[HAVE_LIBNOTIFY="yes"],[HAVE_LIBNOTIFY="no"])
AC_SUBST([LIBNOTIFY_CFLAGS])
AC_SUBST([LIBNOTIFY_LIBS])
if test "x$HAVE_LIBNOTIFY" = "xyes"; then
AC_DEFINE([HAVE_LIBNOTIFY],[1],[libnotify is available on this machine])
fi
fi
# *******************************
# Debug
# *******************************
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
# *******************************
# Internationalization
# *******************************
GETTEXT_PACKAGE=zenity
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext domain])
AM_GLIB_GNU_GETTEXT
# *******************************
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_LDFLAGS])
# *******************************
AC_CONFIG_FILES([
Makefile
po/Makefile.in
src/Makefile
src/gdialog
data/Makefile
help/Makefile
])
AC_OUTPUT
|