summaryrefslogtreecommitdiff
path: root/configure.in
blob: b5e92ad2ba1bc9fac7b701f6ac82cfb7ba8f1f73 (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
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
AC_INIT(panel)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnome-core, 1.1.8)

AM_MAINTAINER_MODE

AM_ACLOCAL_INCLUDE(macros)

dnl
dnl let applications configure for gnome
dnl
gnome_cv_use_gnome=yes

GNOME_INIT(capplet)

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
AM_PROG_LEX
AC_PROG_YACC

GNOME_COMPILE_WARNINGS

GNOME_X_CHECKS
GNOME_XML_CHECK

AM_PATH_GTK(1.2.5, ,[
AC_MSG_ERROR(Please upgrade your GTK+)])

dnl utility conditional
AM_CONDITIONAL(FALSE, test "x" = "y")

ALL_LINGUAS="bg_BG.cp1251 ca cs da de el en_GB es et eu fi fr ga gl hu it ja ko lt nl no pl pt pt_BR ru sk sv tr uk wa zh_TW.Big5 zh_CN.GB2312"
AM_GNOME_GETTEXT
# AM_GNOME_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
gnomelocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gnomelocaledir)

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

AC_CHECK_HEADERS(dlfcn.h dl.h syslog.h tcpd.h)
AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[
AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
AC_CHECK_FUNCS(dlopen, DL_LIB="",
AC_MSG_ERROR(Dynamic linking is not available on this platform.  Some
apps, like panel, will not run properly.))
])])
AC_SUBST(DL_LIB)

for dir in `(IFS=:; for i in $PATH; do echo $i ; done)` ; do
  if test -f $dir/orbit-idl ; then
     orbit_prefix=`echo $dir | sed 's%/bin$%%' |sed 's%/bin/$%%'`
     break
  fi
done

ORB_LIBS="$ORBIT_LIBS"
ORB_CFLAGS="$ORBIT_CFLAGS"

AC_SUBST(ORB_LIBS)
AC_SUBST(ORB_CFLAGS)

dnl
dnl GdkPixBuf
dnl
PIXBUF_CFLAGS=`$GNOME_CONFIG --cflags gdk_pixbuf`
PIXBUF_LIBS=`$GNOME_CONFIG --libs gdk_pixbuf`
AC_SUBST(PIXBUF_CFLAGS)
AC_SUBST(PIXBUF_LIBS)
if test "x$PIXBUF_CFLAGS" = x ; then
       AC_MSG_ERROR(GdkPixbuf library is required for the panel)
fi

dnl
dnl GnomeCanvasPixbuf
dnl
CANVAS_PIXBUF_CFLAGS=`$GNOME_CONFIG --cflags gnomecanvaspixbuf`
CANVAS_PIXBUF_LIBS=`$GNOME_CONFIG --libs gnomecanvaspixbuf`
AC_SUBST(CANVAS_PIXBUF_CFLAGS)
AC_SUBST(CANVAS_PIXBUF_LIBS)
if test "x$CANVAS_PIXBUF_CFLAGS" = x ; then
	AC_MSG_ERROR(GnomeCanvasPixbuf is required for gnome-about)
fi

dnl
dnl Gnome Terminal
dnl
ZVT_LIBS=`$GNOME_CONFIG --libs zvt`
AC_SUBST(ZVT_LIBS)

dnl
dnl gnome-session
dnl
dnl $GNOME_HAVE_SM comes from GNOME_X_CHECKS
AM_CONDITIONAL(SESSION, test "$GNOME_HAVE_SM" = true)

AC_MSG_CHECKING("whether to use TCP wrappers")
LIBWRAP_PATH=""
for I in $LDFLAGS $LIBS -L/usr/lib -L/usr/local/lib; do
        case "$I" in
        -L*)
        THEFILE="`echo $I | sed -e 's,^-L,,'`"
        echo "From $I, checking in dir $THEFILE for libwrap.a" 1>&5
        if test -f $THEFILE/libwrap.a; then
                LIBWRAP_PATH="$THEFILE"
                echo "Found in $LIBWRAP_PATH" 1>&5
                break
        fi
	        esac
done
if test -n "$LIBWRAP_PATH"; then
        AC_MSG_RESULT(yes)
else
        AC_MSG_RESULT(no)
fi

if test -n "$LIBWRAP_PATH"; then
        nm $LIBWRAP_PATH/libwrap.* | grep 'T setenv' && LIBWRAP_PATH=""
        if test -z "$LIBWRAP_PATH"; then
                echo "*********************************************************"
                echo " You have a broken TCP wrappers library (setenv included)"
                echo " Please get the latest TCP wrappers package from your OS"
                echo " vendor, or recompile TCP wrappers to not include a"
                echo " setenv() implementation."
                echo
                echo "Not using TCP wrappers after all."
                echo "*********************************************************"
        fi
fi
dnl We need the header files too!
if test "$ac_cv_header_syslog_h" != yes || test "$ac_cv_header_tcpd_h" != yes; then
	echo "Resetting $LIBWRAP_PATH because syslog is $ac_cv_header_syslog_h and tcpd is $ac_cv_header_tcpd_h" 1>&5
	LIBWRAP_PATH=""
fi

dnl find out if we need -lnsl or whatever
LIBWRAP_NSL=
if test -n "$LIBWRAP_PATH"; then
        AC_MSG_CHECKING(whether -lwrap requires -lnsl)
        ORIG_LIBS="$LIBS"
        LIBS="-L$LIBWRAP_PATH -lwrap $LIBS"
        AC_TRY_LINK([
extern int hosts_access;
int allow_severity, deny_severity;
], [return hosts_access;], ,[
dnl try with -lnsl
OLD_LIBS="$LIBS"
LIBS="$LIBS -lnsl"
AC_TRY_LINK([
extern int hosts_access;
int allow_severity, deny_severity;
], [return hosts_access;], LIBWRAP_NSL="-lnsl",
LIBWRAP_PATH="")
LIBS="$OLD_LIBS"
])
        LIBS="$ORIG_LIBS"
if test -n "$LIB_NSL"; then
        AC_MSG_RESULT(yes)
        LIBS="$LIBS $LIB_NSL"
else
        AC_MSG_RESULT(no)
fi
fi
LIBWRAP_LIBS=
if test -n "$LIBWRAP_PATH"; then
	LIBWRAP_LIBS="-L$LIBWRAP_PATH -lwrap $LIBWRAP_NSL"
	AC_DEFINE(HAVE_HOSTS_ACCESS)
fi
AC_SUBST(LIBWRAP_LIBS)

AC_ARG_WITH(window-manager,
[  --with-window-manager=NAME
			   Specify default window manager],[
    WINDOW_MANAGER="$with_window_manager"], [
    dnl gnome-wm is a shell script that starts the WM.
    WINDOW_MANAGER=gnome-wm])
AC_SUBST(WINDOW_MANAGER)



dnl help-browser using gtkhtml
AC_ARG_WITH(gtkhtml,
[  --with-gtkhtml=PREFIX  Specify gtkhtml prefix],[
    GTK_HTML_PREFIX="$with_gtkhtml"], [
    GTK_HTML_PREFIX=`$GNOME_CONFIG --prefix`])
AC_SUBST(GTK_HTML_PREFIX)

dnl help-browser using gtkhtml
AC_ARG_WITH(gnome-print,
[  --with-gnome-print=PREFIX  Specify gnome-print prefix],[
    GNOME_PRINT_PREFIX="$with_gnome_print"], [
    GNOME_PRINT_PREFIX=`$GNOME_CONFIG --prefix`])
AC_SUBST(GNOME_PRINT_PREFIX)

help_use_gtkhtml=false

CPPFLAGS_save=$CPPFLAGS
LDFLAGS_save=$LDFLAGS
CPPFLAGS=`$GNOME_CONFIG --cflags gtkhtml`
LDFLAGS=`$GNOME_CONFIG --libs gtkhtml`

lib_gtkhtml=false
AC_CHECK_LIB(gtkhtml, gtk_html_construct, lib_gtkhtml=true, [
	AC_MSG_WARN([Recent enough GtkHTML library not found (using GtkXmHTML)
	])
])

CPPFLAGS=$CPPFLAGS_save
LDFLAGS=$LDFLAGS_save

dnl this shouldn't be enabled by default yet, since gtkhtml has some bugs
AC_ARG_ENABLE(gtkhtml-help, [  --enable-gtkhtml-help  Use GtkHTML for the help browser],
	gtkhtml_enabled="$enableval", gtkhtml_enabled=no)

if test "x$gtkhtml_enabled" = "xyes" ; then
	if test "x$lib_gtkhtml" = "xtrue" ; then
		AC_MSG_CHECKING(for static libgtkhtml)
		if test -e $GTK_HTML_PREFIX/lib/libgtkhtml.a ; then
			AC_MSG_RESULT(yes)
			AC_MSG_CHECKING(for static libgnomeprint)
			if test -e $GNOME_PRINT_PREFIX/lib/libgnomeprint.a ; then
				AC_MSG_RESULT(yes)
				help_use_gtkhtml=true
			else
				AC_MSG_RESULT(no)
			fi
		else
			AC_MSG_RESULT(no)
		fi
	fi
fi

AC_MSG_CHECKING(which HTML widget to use)
if test "x$help_use_gtkhtml" = "xtrue" ; then
	AC_MSG_RESULT(GtkHTML)
else
	AC_MSG_RESULT(GtkXmHTML)
fi

AM_CONDITIONAL(HELP_USE_GTKHTML, test x$help_use_gtkhtml = xtrue)
dnl AC_SUBST(HELP_USE_GTKHTML)

dnl help-browser
dnl I found `inet_aton' in -lresolv on solaris
oLIBS="$LIBS"
RES_LIBS=
# the following two are covered by X11 too.  If inet_aton is found in
# plain libc, -lsocket or -lnsl, RES_LIBS will be empty.
AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton,RES_LIBS="-lresolv")])
AC_SUBST(RES_LIBS)
LIBS="$oLIBS"

dnl
dnl Check for zvt_term_reset
dnl
oLIBS="$LIBS"
LIBS="$GNOMEUI_LIBS $GNOME_LIBDIR $ZVT_LIBS"
AC_CHECK_FUNC(zvt_term_reset,[AC_DEFINE(HAVE_ZVT_TERM_RESET)])
LIBS="$oLIBS"

dnl
dnl Place to look for KDE menus
dnl
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 AC_CONFIG_SUBDIRS(gemvt)

dnl gtk-doc stuff

AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
AC_SUBST(HAVE_GTK_DOC)

dnl Let people disable the gtk-doc stuff.
AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)

if test x$enable_gtk_doc = xauto ; then
  if test x$GTKDOC = xtrue ; then
    enable_gtk_doc=yes
  else
    enable_gtk_doc=no
  fi
fi

dnl NOTE: We need to use a separate automake conditional for this
dnl       to make this work with the tarballs.
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)


AC_OUTPUT([
Makefile
gnome-core.spec
po/Makefile.in
macros/Makefile
panel/Makefile
panel/doc/Makefile
panel/help/Makefile
panel/help/C/Makefile
panel/help/de/Makefile
applets/Makefile
applets/applet-dirs/Makefile
applets/gen_util/Makefile
applets/gen_util/help/Makefile
applets/gen_util/help/C/Makefile
applets/gen_util/help/de/Makefile
applets/fish/Makefile
applets/fish/help/Makefile
applets/fish/help/C/Makefile
applets/desk-guide/Makefile
applets/desk-guide/help/Makefile
applets/desk-guide/help/C/Makefile
applets/desk-guide/help/de/Makefile
applets/tasklist/Makefile
applets/tasklist/help/Makefile
applets/tasklist/help/C/Makefile
desktop-links/Makefile
gnome-terminal/Makefile
gnome-terminal/C/Makefile
gnome-terminal/de/Makefile
gnome-terminal/da/Makefile
gnome-terminal/es/Makefile
gnome-terminal/it/Makefile
gnome-terminal/no/Makefile
help-browser/Makefile
help-browser/gnome-man2html/Makefile
help-browser/gnome-info2html/Makefile
help-browser/help/Makefile
help-browser/help/C/Makefile
help-browser/help/ca/Makefile
help-browser/help/da/Makefile
help-browser/help/el/Makefile
help-browser/help/es/Makefile
help-browser/help/et/Makefile
help-browser/help/eu/Makefile
help-browser/help/fr/Makefile
help-browser/help/hu/Makefile
help-browser/help/it/Makefile
help-browser/help/ja/Makefile
help-browser/help/ko/Makefile
help-browser/help/lt/Makefile
help-browser/help/no/Makefile
help-browser/help/uk/Makefile
help-browser/help/wa/Makefile
gnome-hint/Makefile
gnome-about/Makefile
gmenu/Makefile
gnome-edit/Makefile
idl/Makefile
pixmaps/Makefile
gsm/Makefile
gsm/default.session.5
gsm/gnome-session.1
smproxy/Makefile
intl/Makefile])

dnl core-docs/Makefile

echo ""
echo " *** IMPORTANT *** "
echo ""
echo "This is a development version of gnome-core."
echo "It is currently in feature freeze, but criticals bugs"
echo "may remain."
echo ""