summaryrefslogtreecommitdiff
path: root/configure.in
blob: 465390d05abd936de9424ab89f1edd8d54ff18a4 (plain)
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
AC_INIT(libgnome-desktop)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnome-desktop, 2.5.4)

dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")

# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
#   been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
#   change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A

LT_VERSION=3:11:1
AC_SUBST(LT_VERSION)

AM_MAINTAINER_MODE

AC_PROG_INTLTOOL

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)

GNOME_PLATFORM=2
GNOME_MINOR=5
GNOME_MICRO=4
GNOME_DISTRIBUTOR="GNOME.Org"
GNOME_DATE=`date +"%Y-%m-%d"`

AC_ARG_WITH(gnome_distributor, [  --with-gnome-distributor=DISTRIBUTOR  Specify name of GNOME distributor])

if test "x$with_gnome_distributor" != x ; then
  GNOME_DISTRIBUTOR=$with_gnome_distributor
fi

AC_SUBST(GNOME_PLATFORM)
AC_SUBST(GNOME_MINOR)
AC_SUBST(GNOME_MICRO)
AC_SUBST(GNOME_DISTRIBUTOR)
AC_SUBST(GNOME_DATE)

GNOME_COMPILE_WARNINGS(yes)

AC_ARG_ENABLE(deprecations,
              [AC_HELP_STRING([--enable-deprecations],
                              [warn about deprecated usages [default=no]])],,
              [enable_deprecations=no])

if test "x$enable_deprecations" = "xyes"; then
   DISABLE_DEPRECATED_CFLAGS="\
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED"
   AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi

dnl If you add a version number here, you *must* add an AC_SUBST line for
dnl it too, or it will never make it into the spec file!

GDK_PIXBUF_REQUIRED=2.0.3
GTK_REQUIRED=2.1.2
LIBGNOMECANVAS_REQUIRED=2.0.0
LIBGNOMEUI_REQUIRED=2.1.0
GNOME_VFS_REQUIRED=2.0.0
STARTUP_NOTIFICATION_REQUIRED=0.5

AC_SUBST(GTK_REQUIRED)
AC_SUBST(GDK_PIXBUF_REQUIRED)
AC_SUBST(LIBGNOMEUI_REQUIRED)
AC_SUBST(LIBGNOMECANVAS_REQUIRED)
AC_SUBST(GNOME_VFS_REQUIRED)
AC_SUBST(STARTUP_NOTIFICATION_REQUIRED)

if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_REQUIRED libstartup-notification-1.0; then
  echo "Building with libstartup-notification"
  AC_DEFINE(HAVE_STARTUP_NOTIFICATION)
  with_startup_notification=yes
  STARTUP_NOTIFICATION_PACKAGE=libstartup-notification-1.0
else
  echo "***** WARNING: Building without libstartup-notification"
  with_startup_notification=no
  STARTUP_NOTIFICATION_PACKAGE=
fi

AC_SUBST(STARTUP_NOTIFICATION_PACKAGE)

dnl pkg-config dependency checks

PKG_CHECK_MODULES(GNOME_DESKTOP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED $STARTUP_NOTIFICATION_PACKAGE)
AC_SUBST(GNOME_DESKTOP_CFLAGS)
AC_SUBST(GNOME_DESKTOP_LIBS)

PKG_CHECK_MODULES(GNOME_ABOUT, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libgnomecanvas-2.0 >= $LIBGNOMECANVAS_REQUIRED)
AC_SUBST(GNOME_ABOUT_CFLAGS)
AC_SUBST(GNOME_ABOUT_LIBS)


dnl Language Support

GETTEXT_PACKAGE=gnome-desktop-2.0
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
AC_SUBST(GETTEXT_PACKAGE)

ALL_LINGUAS="am ar az be bg bn br bs ca cs cy da de el en_GB eo es et eu fa fi fr ga gl he hi hr hu id is it ja kn ko li lt lv mk ml mn mr ms ne nl nn no pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tr uk vi wa yi zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT


dnl Place to look for KDE menus

AC_ARG_WITH(kde-datadir, [  --with-kde-datadir=DIR  Location of KDE data])

if test "x$with_kde_datadir" = x ; then
  kde_datadir=/usr/share
else
  kde_datadir=$with_kde_datadir
fi

AC_DEFINE_UNQUOTED(KDE_MENUDIR, "$kde_datadir/applnk")
AC_DEFINE_UNQUOTED(KDE_ICONDIR, "$kde_datadir/icons")
AC_DEFINE_UNQUOTED(KDE_MINI_ICONDIR, "$kde_datadir/icons/mini")

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)

dnl define a MAINT-like variable REBUILD which is set if Perl
dnl and awk are found, so autogenerated sources can be rebuilt
AC_ARG_ENABLE(rebuilds, [  --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_DEFINE(_XOPEN_SOURCE, [], [Needed on Linux systems to provide full X/Open
compatibility (e.g. prototypes strptime).])

AC_OUTPUT([
Makefile
gnome-desktop.spec
desktop-links/Makefile
gnome-about/Makefile
gnome-about/headers/Makefile
libgnome-desktop/Makefile
libgnome-desktop/gnome-desktop-2.0.pc
gnome-version.xml.in
po/Makefile.in
pixmaps/Makefile
desktop-docs/Makefile
desktop-docs/fdl/Makefile
desktop-docs/fdl/C/Makefile
desktop-docs/gpl/Makefile
desktop-docs/gpl/C/Makefile
desktop-docs/lgpl/Makefile
desktop-docs/lgpl/C/Makefile
desktop-docs/gnome-feedback/Makefile
desktop-docs/gnome-feedback/C/Makefile
man/Makefile
])