File: configure.in

package info (click to toggle)
gnome-utils 2.8.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 10,056 kB
  • ctags: 1,297
  • sloc: ansic: 14,646; xml: 7,829; sh: 3,397; makefile: 531
file content (398 lines) | stat: -rw-r--r-- 10,745 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
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
AC_INIT(gsearchtool)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnome-utils, 2.8.1)

AM_MAINTAINER_MODE

AC_PROG_INTLTOOL([0.29])

AC_ISC_POSIX
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_STDC_HEADERS
AC_PROG_YACC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

GNOME_COMPILE_WARNINGS

AC_PATH_XTRA

dnl *****************************************
dnl pkg-config check time
dnl *****************************************

GTK_REQUIRED=2.3.2
LIBGNOME_DESKTOP_REQUIRED=2.2.0
LIBGNOME_REQUIRED=2.5.0
LIBGNOMEUI_REQUIRED=2.5.0
LIBGLADE_REQUIRED=2.3.0
LIBBONOBOUI_REQUIRED=2.1.0
GNOMEVFS_REQUIRED=2.3.0
LIBPANEL_APPLET_REQUIRED=2.3.0

dnl *****************************************
dnl libgnome, libgnomeui needed for all utils
dnl *****************************************

PKG_CHECK_MODULES(GNOME_UTILS, gtk+-2.0 >= $GTK_REQUIRED libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
AC_SUBST(GNOME_UTILS_CFLAGS)
AC_SUBST(GNOME_UTILS_LIBS)

dnl *****************************************
dnl floppy-buddy needs libglade
dnl *****************************************
PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
AC_SUBST(LIBGLADE_CFLAGS)
AC_SUBST(LIBGLADE_LIBS)

dnl *****************************
dnl popt is needed for most utils
dnl *****************************

AC_CHECK_LIB(popt, poptHelpOptions,, AC_MSG_ERROR([popt is required to build gnome-utils. You can download the latest version from ftp://people.redhat.com/sopwith/popt/]))

dnl *********************************************
dnl gnome-vfs/mime-data is need for gsearchtool
dnl *********************************************

PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0 >= $GNOMEVFS_REQUIRED gnome-vfs-module-2.0 >= $GNOMEVFS_REQUIRED)
AC_SUBST(GNOMEVFS_CFLAGS)
AC_SUBST(GNOMEVFS_LIBS)

dnl *********************************************
dnl gnome-desktop is need for gsearchtool
dnl *********************************************

PKG_CHECK_MODULES(GNOMEDESKTOP, gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED)
AC_SUBST(GNOMEDESKTOP_CFLAGS)
AC_SUBST(GNOMEDESKTOP_LIBS)

dnl *********************************************
dnl for anything which calls gconftool-2 correctly
dnl *********************************************


AC_PATH_PROG(GCONFTOOL, gconftool-2, no)

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

AM_GCONF_SOURCE_2


dnl *******************************
dnl Applet checks
dnl *******************************

PKG_CHECK_MODULES(APPLET, libpanelapplet-2.0 >= $LIBPANEL_APPLET_REQUIRED)
AC_SUBST(APPLET_LIBS)
AC_SUBST(APPLET_CFLAGS)

dnl ***************************************************************
dnl Other miscellaneous checks 
dnl ***************************************************************

AC_ARG_ENABLE(console-helper,
  [  --enable-console-helper=[no/yes]  	Enable PAM console helper [ default=no ]],,
  enable_console_helper=no)

dnl ***********
dnl PAM prefix
dnl ***********

dnl  ***************Checking for availability of IPv6************ 
AC_MSG_CHECKING([whether to enable IPv6])
AC_ARG_ENABLE(ipv6,
  [ --enable-ipv6=[yes/no] enables compilation of IPv6 code]
   , ,enable_ipv6=yes)
if test $enable_ipv6 = yes; then
  AC_TRY_COMPILE([
   #include <sys/socket.h>
   #include <sys/types.h>], [
   struct sockaddr_storage ss;
   socket(AF_INET6, SOCK_STREAM, 0)
   ],
   have_ipv6=yes,
   have_ipv6=no
  )
fi

if test $have_ipv6 = yes; then
  have_getaddrinfo=no
  AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
  if test $have_getaddrinfo != yes; then
    for lib in bsd socket inet; do
      AC_CHECK_LIB($lib,getaddrinfo,["LIBS=$LIBS -l$lib";have_getaddrinfo=yes;break])
    done
  fi

  if test $have_getaddrinfo = yes; then
    AC_DEFINE(ENABLE_IPV6)
  fi
fi

dnl  ************************end IPv6 checks*********************

withval=""
AC_ARG_WITH(pam-prefix,
[      --with-pam-prefix=<prefix>   specify where pam files go],[
if test x$withval != x; then
   AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.")
fi])
if test x$withval != x; then
	PAM_PREFIX_UNEXPANDED="$withval"
	PAM_PREFIX=`eval echo $PAM_PREFIX_UNEXPANDED`
else
	PAM_PREFIX="\$(sysconfdir)"
fi
AC_SUBST(PAM_PREFIX)
    
AC_PATH_PROG(CONSOLE_HELPER,consolehelper,no)
if test "x$CONSOLE_HELPER" = "xno" -a "x$enable_console_helper" = "xyes" ; then
	AC_MSG_ERROR(Console helper requested but consolehelper binary not found)
fi

dnl **************************************************************
dnl Checks for typedefs, structures, and compiler characteristics.
dnl **************************************************************

AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_ST_RDEV
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UID_T

dnl *****************************
dnl Checks for library functions.
dnl *****************************

AC_FUNC_ALLOCA
AC_FUNC_MMAP
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname logf)

dnl *****************************************************************
dnl Allow users to run logview using the console helper 
dnl PAM stuff.
dnl *****************************************************************

if test "x$enable_console_helper" = "xyes"; then
  AM_CONDITIONAL(CONSOLE_HELPER, true)
else
  AM_CONDITIONAL(CONSOLE_HELPER, false)
fi

dnl ************************************************
dnl X development libraries check
dnl ************************************************

if $PKG_CONFIG --exists pangoxft ; then
  PANGO_PACKAGES="pangox pangoxft"
else
  PANGO_PACKAGES="pangox"
fi

x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
case x_libs in
  *-lX11*) pango_omitted_x_deps=no ;;
  *)       pango_omitted_x_deps=yes ;;
esac

if test $pango_omitted_x_deps = yes ; then
  AC_PATH_XTRA

  if test x$no_x = xyes ; then
    AC_MSG_ERROR([X development libraries not found])
  else
    X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
  fi
fi

AC_SUBST(X_LIBS)

dnl strftime extension checks

AC_TRY_RUN([#include <time.h>
                int main ()
                {
                  char buf[100];
                  struct tm tm = {0};
                  tm.tm_year = 99;
                  if (strftime(buf, 100, "%EY", &tm) == 4 &&
		      strcmp (buf, "1999")==0)
                    return 0;
                  return 1;
                }
            ],
	    AC_DEFINE(HAVE_STRFTIME_EXTENSION, 1, [Define if strftime supports %E and %O modifiers.])
            )

dnl *************************************************
dnl Individual gnome-utils checks 
dnl *************************************************


dnl ******************** 
dnl gfloppy checks
dnl ********************

build_gfloppy=true
AC_CHECK_HEADER(linux/fd.h, AC_DEFINE(HAVE_LINUX_FD_H),
		build_gfloppy=false
                AC_MSG_WARN([*** gfloppy will not be built.]))
# Check for the ext2fs library
AC_CHECK_LIB(ext2fs, ext2fs_mkdir, x_libs="-lext2fs",
  build_gfloppy=false
  AC_MSG_WARN([
*** libext2fs not found. You need e2fsprogs and e2fsprogs-devel installed to build gfloppy.]))
# check for ext2fs header specific includes
AC_CHECK_HEADERS([et/com_err.h])
AC_CHECK_HEADER([ext2fs/ext2_io.h], [],
  [build_gfloppy=false
  AC_MSG_WARN([
*** ext2fs/ext2_io.h not found.  You need e2fsprogs-devel installed.])],
  [#include <string.h>
#if HAVE_ET_COM_ERR_H
#include <et/com_err.h>
#endif
])
AM_CONDITIONAL(BUILD_GFLOPPY, test "$build_gfloppy" = true)


dnl ********************
dnl logview checks
dnl ********************

dnl This is where the binary actually resides,
dnl not the console helper link
if test "x$enable_console_helper" = "xyes"; then
	LOGVIEWDIR_TMP="$sbindir"
else
	LOGVIEWDIR_TMP="$bindir"
fi
EXPANDED_LOGVIEWDIR=`eval echo $LOGVIEWDIR_TMP`
AC_SUBST(EXPANDED_LOGVIEWDIR)


dnl ********************
dnl scrollkeeper checks 
dnl ********************

AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package)
fi


dnl *******************************
dnl Internationalization
dnl ******************************* 

ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id it ja ko lt lv mk ml mn ms nb ne nl nn no pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tr uk vi wa zh_CN zh_TW"
GETTEXT_PACKAGE=gnome-utils-2.0
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT

# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
gnomeutilslocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gnomeutilslocaledir)

AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")

AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${prefix}/share/pixmaps")

AC_OUTPUT([
Makefile
gnome-utils.spec
po/Makefile.in
logview/Makefile
logview/gnome-system-log-security
logview/help/Makefile
logview/help/C/Makefile
logview/help/de/Makefile
logview/help/es/Makefile
logview/help/fr/Makefile
logview/help/it/Makefile
logview/help/sv/Makefile
logview/help/ja/Makefile
logview/help/ko/Makefile
logview/help/zh_CN/Makefile
logview/help/zh_TW/Makefile
gsearchtool/Makefile
gsearchtool/help/Makefile
gsearchtool/help/C/Makefile
gsearchtool/help/es/Makefile
gsearchtool/help/fr/Makefile
gsearchtool/help/it/Makefile
gsearchtool/help/sv/Makefile
gsearchtool/help/ja/Makefile
gsearchtool/help/ko/Makefile
gsearchtool/help/zh_CN/Makefile
gsearchtool/help/zh_HK/Makefile
gsearchtool/help/zh_TW/Makefile
gdictsrc/Makefile
gdictsrc/help/Makefile
gdictsrc/help/C/Makefile
gdictsrc/help/ja/Makefile
gfloppy/Makefile
gfloppy/doc/Makefile
gfloppy/doc/C/Makefile
gfloppy/doc/ja/Makefile
gfloppy/src/Makefile
])

dnl <= Configuration summary =>

echo ""
echo "gnome-utils configuration summary:"
echo "=================================="
echo ""

dnl <= CFLAGS and LDFLAGS =>
echo "CFLAGS : $CFLAGS"
echo "LDFLAGS : $LDFLAGS"
echo "X_LIBS : $X_LIBS"
echo ""

dnl <= Prefixes =>
echo "prefix : $prefix"
echo "sysconf dir : "`eval echo $sysconfdir`
echo "bin dir : "`eval echo $bindir`
echo "sbin dir : "`eval echo $sbindir`
echo "PAM prefix : $PAM_PREFIX"
echo "data dir : "`eval echo $datadir`
echo ""

echo ""
echo "The following will be built -"
echo "============================="
echo ""
dnl <= Console Helper =>
if test "x$enable_console_helper" = "xyes"; then
	echo "Console helper (logview)          : YES"
else
	echo "Console helper (logview)          : NO"
fi

dnl <= message file =>
echo "Logview default message file      : $messages_file"

dnl <= gfloppy =>
if test "x$build_gfloppy" = "xtrue"; then
	echo "Build gfloppy                     : YES"
else
	echo "Build gfloppy                     : NO"
fi

echo ""
dnl <= End of configuration summary =>