File: configure.in

package info (click to toggle)
gnome-main-menu 0.9.14-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,476 kB
  • ctags: 976
  • sloc: sh: 10,242; ansic: 4,757; makefile: 143; xml: 8
file content (170 lines) | stat: -rw-r--r-- 4,543 bytes parent folder | download
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
AC_INIT([gnome-main-menu], [0.9.14], [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-main-menu])

AC_CONFIG_SRCDIR([.])
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE([1.9 tar-ustar])
AM_MAINTAINER_MODE

AC_SUBST([ACLOCAL_AMFLAGS], ["\${ACLOCAL_FLAGS}"])

GNOME_COMPILE_WARNINGS

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AM_PROG_LIBTOOL

dnl ==============================================
dnl translation support
dnl ==============================================

GETTEXT_PACKAGE=gnome-main-menu
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])

IT_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT

dnl ==============================================
dnl Check that we meet the dependencies
dnl ==============================================

GLIB_REQUIRED=2.16.0
GTK_REQUIRED=2.14
SLAB_REQUIRED=2.29.0

AM_PATH_GLIB_2_0($GLIB_REQUIRED,,,gobject)

COMMON_MODULES="glib-2.0 >= $GLIB_REQUIRED	\
		gio-2.0 >= $GLIB_REQUIRED 	\
		gobject-2.0 			\
		gtk+-2.0 >= $GTK_REQUIRED 	\
		gdk-2.0				\
		libslab >= $SLAB_REQUIRED"

PKG_CHECK_MODULES(MAIN_MENU, [ $COMMON_MODULES libpanelapplet-2.0 gnome-desktop-2.0 gconf-2.0 libgtop-2.0 x11 cairo ])

AC_SUBST(MAIN_MENU_CFLAGS)
AC_SUBST(MAIN_MENU_LIBS)

# Check for Network Manager
NM_GLIB=
PKG_CHECK_EXISTS(libnm-glib, [ NM_GLIB=libnm-glib],
                 PKG_CHECK_EXISTS(libnm_glib, [ NM_GLIB=libnm_glib ]))

PKG_CHECK_MODULES(NETWORK, [NetworkManager $NM_GLIB >= 0.7.0 libnm-util >= 0.7.0], HAVE_NETWORK=1, HAVE_NETWORK=0)
AC_CHECK_HEADERS(iwlib.h, [ AC_CHECK_LIB(iw, iw_sockets_open, , HAVE_NETWORK=0, -lm)], HAVE_NETWORK=0)

if test "x$HAVE_NETWORK" != "x1" ; then
	AC_WARN(Missing network manager or iwlib, network support disabled)
else
	AC_DEFINE(HAVE_NETWORK, 1, [use network-manager and wireless])
	NETWORK_LIBS="$NETWORK_LIBS -liw -lm"
fi

AM_CONDITIONAL(HAVE_NETWORK, test "x$HAVE_NETWORK" = "x1")
AC_SUBST(NETWORK_LIBS)
AC_SUBST(NETWORK_MAIN)


PKG_CHECK_MODULES(APPLICATION_BROWSER, [ $COMMON_MODULES gnome-desktop-2.0 unique-1.0 ])

AC_SUBST(APPLICATION_BROWSER_CFLAGS)
AC_SUBST(APPLICATION_BROWSER_LIBS)

dnl ==============================================
dnl Gconf
dnl ==============================================

AC_PATH_PROG(GCONFTOOL, gconftool-2, no)

if test x"$GCONFTOOL" = xno; then
  AC_MSG_ERROR([gconftool-2 executable was not found in your path - should be install with gconf])
fi

AM_GCONF_SOURCE_2

dnl ==============================================
dnl End: Gconf
dnl ==============================================

dnl ==============================================
dnl Check strftime for %l and %k support
dnl ==============================================

AC_MSG_CHECKING(for %l and %k support in strftime)
AC_TRY_RUN([
#include <string.h>
#include <time.h>

int main(int argc, char **argv)
{
	char buf[10];
	time_t rawtime;
	struct tm *timeinfo;

	time(&rawtime);
	timeinfo=localtime(&rawtime);
	buf[0] = '\0';
	strftime(buf, 10, "%lx%k", timeinfo);

	if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
		exit(1);
	else
		exit(0);
}],[
AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k])
ac_cv_lkstrftime=yes
],ac_cv_lkstrftime=no,ac_cv_lkstrftime=no,[
AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k])
ac_cv_lkstrftime=yes
])
AC_MSG_RESULT($ac_cv_lkstrftime)

dnl ==============================================
dnl End: strftime
dnl ==============================================

dnl ==============================================
dnl Nautilus Extension
dnl ==============================================

ENABLE_PROFILER=
AC_ARG_ENABLE(nautilus-extension,
 AC_HELP_STRING([--enable-nautilus-extension], [Enable nautilus extension]),
 [ENABLE_NAUTILUS_EXTENSION=1])

if test "x$ENABLE_NAUTILUS_EXTENSION" = "x1"
then
	NAUTILUS_REQUIRED=2.6.0

	PKG_CHECK_MODULES(NAUTILUS, [libnautilus-extension >= $NAUTILUS_REQUIRED glib-2.0 gobject-2.0 gconf-2.0])
	NAUTILUSDIR=`pkg-config --variable=extensiondir libnautilus-extension`

	AC_SUBST(NAUTILUS_CFLAGS)
	AC_SUBST(NAUTILUS_LIBS)
	AC_SUBST(NAUTILUSDIR)
fi

AM_CONDITIONAL(ENABLE_NAUTILUS_EXTENSION, test "x$ENABLE_NAUTILUS_EXTENSION" = "x1")


dnl ==============================================
dnl End: Nautilus Extension
dnl ==============================================

GTK_DOC_CHECK(1.0)

AC_CONFIG_FILES([
Makefile
application-browser/etc/Makefile
application-browser/src/Makefile
main-menu/etc/Makefile
main-menu/src/Makefile
nautilus-main-menu/Makefile
patch/Makefile
po/Makefile.in
])

AC_OUTPUT