File: configure.in

package info (click to toggle)
gnotime 2.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,404 kB
  • ctags: 1,538
  • sloc: ansic: 15,357; sh: 4,053; xml: 1,367; makefile: 239; lisp: 138
file content (351 lines) | stat: -rw-r--r-- 9,468 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
AC_INIT(src)
AM_INIT_AUTOMAKE(gnotime, 2.4.1)

dnl AC_PROG_INTLTOOL

IT_PROG_INTLTOOL([0.35.5])

AM_CONFIG_HEADER(config.h)

AM_MAINTAINER_MODE

m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY],1)])

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 Look for a portable way to reap zombie processes
dnl *****************************************
AC_CHECK_HEADER([signal.h], AC_DEFINE([HAVE_SIGNAL_H], [1], [Define to 1 if we have signal.h on our system.]),
	AC_ERROR([signal.h is needed to compile this program.]))

AC_CHECK_HEADERS([sys/wait.h])
if test x$ac_cv_header_wait_h != "x"; then
	AC_CHECK_FUNCS(waitpid)
	AC_CHECK_DECLS(WNOHANG,,,[#include<sys/wait.h>])

	dnl This causes RETSIGTYPE to contain a signal handler's return type.
	AC_TYPE_SIGNAL()
fi
AC_CHECK_DECLS(SA_NOCLDWAIT,,,[#include<signal.h>])

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

LIBGNOME_REQUIRED=2.0.0
LIBGNOMEUI_REQUIRED=2.0.3
GLIB_REQUIRED=2.14
GTK_REQUIRED=2.12
LIBGNOMEVFS_REQUIRED=2.0.0
LIBGLADE_REQUIRED=2.0.0
LIBGTKHTML_REQUIRED=3.0.0
LIBXML2_REQUIRED=2.0.0
SCROLLKEEPER_BUILD_REQUIRED=0.3.5
LIBQOF_REQUIRED_MIN=0.6.0
LIBDBUS_REQUIRED_MIN=0.74

dnl *****************************************
dnl Check for guile
dnl *****************************************

# The below checks for guile-1.8. It works, the code compile, works.
# GUILE_FLAGS
#
# GUILE_VERSION=`$GUILE_CONFIG --version 2>&1 |/usr/bin/tr -d 'a-zA-Z -'`
# if test "$GUILE_VERSION" "<" "1.8"; then
#    AC_ERROR([We need guile version 1.8 or higher but found version $GUILE_VERSION])
# fi

# http://www.gnu.org/software/guile/manual/html_node/Autoconf-Macros.html
PKG_CHECK_MODULES([GUILE], [guile-2.0])
AC_SUBST(GUILE_CFLAGS)
AC_SUBST(GUILE_LIBS)

dnl *****************************************
dnl Check for glib
dnl *****************************************
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

dnl *****************************************
dnl Check for GTK+
dnl *****************************************
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
AC_SUBST(GTK_FLAGS)
AC_SUBST(GTK_LIBS)

dnl *****************************************
dnl Check for libgnome
dnl *****************************************
PKG_CHECK_MODULES(LIBGNOME, libgnome-2.0 >= $LIBGNOME_REQUIRED)
AC_SUBST(LIBGNOME_CFLAGS)
AC_SUBST(LIBGNOME_LIBS)

dnl *****************************************
dnl Check for libgnomeui
dnl *****************************************
PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
AC_SUBST(LIBGNOMEUI_CFLAGS)
AC_SUBST(LIBGNOMEUI_LIBS)

dnl *****************************************
dnl Check for X11
dnl *****************************************
PKG_CHECK_MODULES(X11, x11)
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)

dnl *****************************************
dnl need libglade
dnl *****************************************
PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
AC_SUBST(LIBGLADE_CFLAGS)
AC_SUBST(LIBGLADE_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

dnl *****************************************
dnl Check for gconf
dnl *****************************************
PKG_CHECK_MODULES(GCONF, gconf-2.0)
AC_SUBST(GCONF_CFLAGS)
AC_SUBST(GCONF_LIBS)

dnl **************************************************************
dnl If QOF is found on the build system, then use it.
dnl **************************************************************
PKG_CHECK_MODULES(LIBQOF, qof >= $LIBQOF_REQUIRED_MIN)
AC_SUBST(LIBQOF_CFLAGS)
AC_SUBST(LIBQOF_LIBS)

dnl **************************************************************
dnl pkgconfig looks for xscrnsaver.pc, however, this is 
dnl packaged in unexpected ways for different OS'es:
dnl called xscrnsaver in RedHat/SuSE
dnl called libxss, libxss-dev in Debian/Ubuntu
dnl **************************************************************
PKG_CHECK_MODULES(XSS_EXTENSION, xscrnsaver)
AC_SUBST(XSS_EXTENSION_CFLAGS)
AC_SUBST(XSS_EXTENSION_LIBS)


dnl *************************************************************
dnl Check for DBUS
dnl *************************************************************

PKG_CHECK_MODULES(LIBDBUS, dbus-glib-1 >= $LIBDBUS_REQUIRED_MIN,
[
AC_SUBST(LIBDBUS_CFLAGS)
AC_SUBST(LIBDBUS_LIBS)
WITH_DBUS=1
],
[
WITH_DBUS=0
])
AC_SUBST(WITH_DBUS)


dnl *******************************
dnl Gnome VFS
dnl *******************************

PKG_CHECK_MODULES(LIBGNOMEVFS, gnome-vfs-2.0 >= $LIBGNOMEVFS_REQUIRED)
AC_SUBST(LIBGNOMEVFS_CFLAGS)
AC_SUBST(LIBGNOMEVFS_LIBS)


dnl *******************************
dnl gtkhtml -- ask pkgconfig for some variant of gtkhtml3
dnl *******************************

GTKHTMLPRESENT=no
for GTKHTMLVER in 3.14 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.2 3.1 3.0 ; do
  if $PKG_CONFIG --exists libgtkhtml-$GTKHTMLVER ; then
	PKG_CHECK_MODULES(LIBGTKHTML, libgtkhtml-$GTKHTMLVER >= $LIBGTKHTML_REQUIRED)
	GTKHTMLPRESENT=yes
	break
  fi
done
if test x$GTKHTMLPRESENT = x'no'; then
	AC_ERROR([gtkhtml3 is needed in order to compile this program.])
fi

AC_SUBST(LIBGTKHTML_CFLAGS)
AC_SUBST(LIBGTKHTML_LIBS)


dnl ********************
dnl libxml2
dnl The libxml2 library is required 
dnl ********************

PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
AC_SUBST(LIBXML2_CFLAGS)
AC_SUBST(LIBXML2_LIBS)

dnl *****************************
dnl scrollkeeper
dnl *****************************
dnl To substitute into the gnotime.spec
AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)
AC_PATH_PROG(SK_CONFIG, scrollkeeper-config,no)
if test x$SK_CONFIG = xno; then
	AC_MSG_ERROR(cannot find scrollkeeper-config.  In order to properly install the documentation please install the scrollkeeper package: http://scrollkeeper.sourceforge.net)
fi
AC_SUBST(SK_CONFIG)

dnl *****************************
dnl popt is needed 
dnl *****************************

# There is no popt under mac OSX but it still compiles ... 
# so remove this check so that Mac OSX can work.
#
# 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 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_STRFTIME
AC_CHECK_FUNCS(getcwd gettimeofday getwd stpcpy strdup strtoul)
AC_REPLACE_FUNCS(strptime localtime_r)

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 *******************************
dnl Internationalization
dnl ******************************* 

GETTEXT_PACKAGE=gnotime-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",
		[Define the gettext package.])

AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${prefix}/share/pixmaps",
		[Define a gnome pixmaps directory.])

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

AC_OUTPUT([
Makefile
doc/C/Makefile
doc/C/man/Makefile
doc/Makefile
gconf/Makefile
ghtml/C/Makefile
ghtml/Makefile
glade/Makefile
po/Makefile.in
redhat/Makefile
redhat/gnotime.spec
fedora/Makefile
fedora/gnotime.spec
src/Makefile
scripts/Makefile
])

dnl <= Configuration summary =>

echo ""
echo "gnotime configuration summary:"
echo "=================================="
echo ""

dnl <= CFLAGS and LDFLAGS =>
echo "CFLAGS : $CFLAGS"
echo "LDFLAGS : $LDFLAGS"
echo "X_LIBS : $X_LIBS"
echo "GUILE_LIBS : $GUILE_LDFLAGS"
echo "LIBQOF_LIBS : $LIBQOF_LIBS"
echo "LIBQOF_CFLAGS : $LIBQOF_CFLAGS"
echo "LIBDBUS_LIBS : $LIBDBUS_LIBS"
echo "LIBDBUS_CFLAGS : $LIBDBUS_CFLAGS"
echo "XSS_EXTENSION_CFLAGS : $XSS_EXTENSION_CFLAGS"
echo "XSS_EXTENSION_LIBS : $XSS_EXTENSION_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 "data dir : "`eval echo $datadir`
echo ""


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