source: trunk/third/gnome-core/configure.in @ 15821

Revision 15821, 13.7 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15820, which included commits to RCS files with non-trunk default branches.
Line 
1AC_INIT(panel)
2
3AM_CONFIG_HEADER(config.h)
4AM_INIT_AUTOMAKE(gnome-core, 1.4.0)
5
6AM_MAINTAINER_MODE
7
8AM_ACLOCAL_INCLUDE(macros)
9
10AM_PROG_XML_I18N_TOOLS
11
12dnl
13dnl let applications configure for gnome
14dnl
15gnome_cv_use_gnome=yes
16
17GNOME_INIT(capplet)
18
19AC_ISC_POSIX
20AC_PROG_CC
21AC_STDC_HEADERS
22AC_ARG_PROGRAM
23AM_PROG_LIBTOOL
24AM_PROG_LEX
25AC_PROG_YACC
26AC_PATH_PROGS(PATH_TO_XRDB, "xrdb")
27
28GNOME_COMPILE_WARNINGS
29
30GNOME_X_CHECKS
31GNOME_XML_CHECK
32
33AM_PATH_GTK(1.2.5, ,[
34AC_MSG_ERROR(Please upgrade your GTK+)])
35
36dnl Check for new enough gnome-libs
37CFLAGS_save=$CFLAGS
38LIBS_save=$LIBS
39CFLAGS=`gnome-config --cflags gnomeui`
40LIBS=`gnome-config --libs gnomeui`
41
42AC_CHECK_LIB(gnomeui, gnome_window_icon_set_default_from_file, ,[
43AC_MSG_ERROR(gnome-libs 1.0.59 or higher is required.)])
44
45CFLAGS=$CFLAGS_save
46LIBS=$LIBS_save
47
48dnl utility conditional
49AM_CONDITIONAL(FALSE, test "x" = "y")
50
51ALL_LINGUAS="az bg_BG.cp1251 ca cs da de el en_GB es et eu fi fr ga gl hu it ja ko lt nl nn no pl pt pt_BR ro ru sk sl sp sr sv ta tr uk wa zh_TW.Big5 zh_CN.GB2312"
52AM_GNOME_GETTEXT
53# AM_GNOME_GETTEXT above substs $DATADIRNAME
54# this is the directory where the *.{mo,gmo} files are installed
55gnomelocaledir='${prefix}/share/locale'
56AC_SUBST(gnomelocaledir)
57
58AC_SUBST(CFLAGS)
59AC_SUBST(CPPFLAGS)
60AC_SUBST(LDFLAGS)
61
62AC_CHECK_HEADERS(dlfcn.h dl.h syslog.h tcpd.h)
63AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[
64AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
65AC_CHECK_FUNCS(dlopen, DL_LIB="",
66AC_MSG_ERROR(Dynamic linking is not available on this platform.  Some
67apps, like panel, will not run properly.))
68])])
69AC_SUBST(DL_LIB)
70
71for dir in `(IFS=:; for i in $PATH; do echo $i ; done)` ; do
72  if test -f $dir/orbit-idl ; then
73     orbit_prefix=`echo $dir | sed 's%/bin$%%' |sed 's%/bin/$%%'`
74     break
75  fi
76done
77
78ORB_LIBS="$ORBIT_LIBS"
79ORB_CFLAGS="$ORBIT_CFLAGS"
80
81AC_SUBST(ORB_LIBS)
82AC_SUBST(ORB_CFLAGS)
83
84dnl
85dnl CApplet, Note that the libs and all that is set up in gnome_init,
86dnl but gnome_init is truly dumb and doesn't require it, so we need to
87dnl do a separate check
88dnl
89AC_MSG_CHECKING(for CApplet library)
90vers=`$GNOME_CONFIG --modversion capplet`
91case "x$vers" in
92  xcapplet-*)
93    AC_MSG_RESULT(found)
94    ;;
95  *)
96    AC_MSG_ERROR(Did not find CApplet library, you probably need to install control-center first)
97    ;;
98esac
99
100dnl
101dnl Configure Easter Egg
102dnl
103AC_MSG_CHECKING(for Configure Easter Egg version >= 3.14)
104AC_MSG_RESULT(found)
105
106dnl
107dnl GdkPixBuf
108dnl
109AC_MSG_CHECKING(for GdkPixbuf library >= 0.7.0)
110PIXBUF_CFLAGS=`$GNOME_CONFIG --cflags gdk_pixbuf`
111PIXBUF_LIBS=`$GNOME_CONFIG --libs gdk_pixbuf`
112if test "x$PIXBUF_CFLAGS" != x ; then
113    vers=`gdk-pixbuf-config --version | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
114    if test "$vers" -ge 0007000; then
115        AC_MSG_RESULT(found)
116    else
117       AC_MSG_ERROR(You need at least GdkPixbuf version 0.7.0 for the panel)
118    fi
119else
120    AC_MSG_ERROR(Did not find GdkPixbuf installed)
121fi
122AC_SUBST(PIXBUF_CFLAGS)
123AC_SUBST(PIXBUF_LIBS)
124
125dnl
126dnl GnomeCanvasPixbuf
127dnl
128CANVAS_PIXBUF_CFLAGS=`$GNOME_CONFIG --cflags gnomecanvaspixbuf`
129CANVAS_PIXBUF_LIBS=`$GNOME_CONFIG --libs gnomecanvaspixbuf`
130AC_SUBST(CANVAS_PIXBUF_CFLAGS)
131AC_SUBST(CANVAS_PIXBUF_LIBS)
132if test "x$CANVAS_PIXBUF_CFLAGS" = x ; then
133        AC_MSG_ERROR(GnomeCanvasPixbuf is required for gnome-about.
134This is contained in the gdk-pixbuf module, however, make sure to build
135this module after you build gnome-libs)
136fi
137
138dnl
139dnl Gnome Terminal
140dnl
141ZVT_LIBS=`$GNOME_CONFIG --libs zvt`
142AC_SUBST(ZVT_LIBS)
143
144dnl Gnome Terminal now requires LibGlade
145AC_MSG_CHECKING(for Glade libraries >= 0.14)
146libglade_ok=no
147if gnome-config --libs libglade > /dev/null 2>&1; then
148    verstxt=`gnome-config --modversion libglade`
149    vers=`echo "$verstxt" | awk -F. '{ printf "%d", $1 * 1000 + $2;}'`
150    if test "$vers" -ge 14; then
151        AC_MSG_RESULT($marker_ok found $verstxt)
152        libglade_ok=yes
153    else
154        AC_MSG_RESULT($marker_fail found only $verstxt)
155    fi
156else
157    AC_MSG_RESULT($marker_fail not found)
158fi
159if test "$libglade_ok" = no; then
160    AC_MSG_ERROR(You need at least libglade 0.14 for this version of gnome-core)
161fi
162unset libglade_ok
163GT_LIBS="libglade zvt gnorba gnomeui"
164GNOME_TERMINAL_LIBS=`gnome-config --libs $GT_LIBS`
165GNOME_TERMINAL_CFLAGS=`gnome-config --cflags $GT_LIBS`
166AC_SUBST(GNOME_TERMINAL_LIBS)
167AC_SUBST(GNOME_TERMINAL_CFLAGS)
168
169dnl
170dnl gnome-session
171dnl
172dnl $GNOME_HAVE_SM comes from GNOME_X_CHECKS
173AM_CONDITIONAL(SESSION, test "$GNOME_HAVE_SM" = true)
174
175AC_MSG_CHECKING("whether to use TCP wrappers")
176LIBWRAP_PATH=""
177for I in $LDFLAGS $LIBS -L/usr/lib -L/usr/local/lib; do
178        case "$I" in
179        -L*)
180        THEFILE="`echo $I | sed -e 's,^-L,,'`"
181        echo "From $I, checking in dir $THEFILE for libwrap.a" 1>&5
182        if test -f $THEFILE/libwrap.a; then
183                LIBWRAP_PATH="$THEFILE"
184                echo "Found in $LIBWRAP_PATH" 1>&5
185                break
186        fi
187                esac
188done
189if test -n "$LIBWRAP_PATH"; then
190        AC_MSG_RESULT(yes)
191else
192        AC_MSG_RESULT(no)
193fi
194
195if test -n "$LIBWRAP_PATH"; then
196        nm $LIBWRAP_PATH/libwrap.* | grep 'T setenv' && LIBWRAP_PATH=""
197        if test -z "$LIBWRAP_PATH"; then
198                echo "*********************************************************"
199                echo " You have a broken TCP wrappers library (setenv included)"
200                echo " Please get the latest TCP wrappers package from your OS"
201                echo " vendor, or recompile TCP wrappers to not include a"
202                echo " setenv() implementation."
203                echo
204                echo "Not using TCP wrappers after all."
205                echo "*********************************************************"
206        fi
207fi
208dnl We need the header files too!
209if test "$ac_cv_header_syslog_h" != yes || test "$ac_cv_header_tcpd_h" != yes; then
210        echo "Resetting $LIBWRAP_PATH because syslog is $ac_cv_header_syslog_h and tcpd is $ac_cv_header_tcpd_h" 1>&5
211        LIBWRAP_PATH=""
212fi
213
214dnl find out if we need -lnsl or whatever
215LIBWRAP_NSL=
216if test -n "$LIBWRAP_PATH"; then
217        AC_MSG_CHECKING(whether -lwrap requires -lnsl)
218        ORIG_LIBS="$LIBS"
219        LIBS="-L$LIBWRAP_PATH -lwrap $LIBS"
220        AC_TRY_LINK([
221extern int hosts_access;
222int allow_severity, deny_severity;
223], [return hosts_access;], ,[
224dnl try with -lnsl
225OLD_LIBS="$LIBS"
226LIBS="$LIBS -lnsl"
227AC_TRY_LINK([
228extern int hosts_access;
229int allow_severity, deny_severity;
230], [return hosts_access;], LIBWRAP_NSL="-lnsl",
231LIBWRAP_PATH="")
232LIBS="$OLD_LIBS"
233])
234        LIBS="$ORIG_LIBS"
235if test -n "$LIB_NSL"; then
236        AC_MSG_RESULT(yes)
237        LIBS="$LIBS $LIB_NSL"
238else
239        AC_MSG_RESULT(no)
240fi
241fi
242LIBWRAP_LIBS=
243if test -n "$LIBWRAP_PATH"; then
244        LIBWRAP_LIBS="-L$LIBWRAP_PATH -lwrap $LIBWRAP_NSL"
245        AC_DEFINE(HAVE_HOSTS_ACCESS)
246fi
247AC_SUBST(LIBWRAP_LIBS)
248
249AC_ARG_WITH(window-manager,
250[  --with-window-manager=NAME
251                           Specify default window manager],[
252    WINDOW_MANAGER="$with_window_manager"], [
253    dnl gnome-wm is a shell script that starts the WM.
254    WINDOW_MANAGER=gnome-wm])
255AC_SUBST(WINDOW_MANAGER)
256
257
258
259dnl help-browser using gtkhtml
260AC_ARG_WITH(gtkhtml,
261[  --with-gtkhtml=PREFIX  Specify gtkhtml prefix],[
262    GTK_HTML_PREFIX="$with_gtkhtml"], [
263    GTK_HTML_PREFIX=`$GNOME_CONFIG --prefix`])
264AC_SUBST(GTK_HTML_PREFIX)
265
266dnl help-browser using gtkhtml
267AC_ARG_WITH(gnome-print,
268[  --with-gnome-print=PREFIX  Specify gnome-print prefix],[
269    GNOME_PRINT_PREFIX="$with_gnome_print"], [
270    GNOME_PRINT_PREFIX=`$GNOME_CONFIG --prefix`])
271AC_SUBST(GNOME_PRINT_PREFIX)
272
273help_use_gtkhtml=false
274
275CPPFLAGS_save=$CPPFLAGS
276LDFLAGS_save=$LDFLAGS
277CPPFLAGS=`$GNOME_CONFIG --cflags gtkhtml`
278LDFLAGS=`$GNOME_CONFIG --libs gtkhtml`
279
280lib_gtkhtml=false
281AC_CHECK_LIB(gtkhtml, gtk_html_construct, lib_gtkhtml=true, [
282        AC_MSG_WARN([Recent enough GtkHTML library not found (using GtkXmHTML)
283        ])
284])
285
286CPPFLAGS=$CPPFLAGS_save
287LDFLAGS=$LDFLAGS_save
288
289dnl this shouldn't be enabled by default yet, since gtkhtml has some bugs
290AC_ARG_ENABLE(gtkhtml-help, [  --enable-gtkhtml-help  Use GtkHTML for the help browser],
291        gtkhtml_enabled="$enableval", gtkhtml_enabled=no)
292
293if test "x$gtkhtml_enabled" = "xyes" ; then
294        if test "x$lib_gtkhtml" = "xtrue" ; then
295                AC_MSG_CHECKING(for static libgtkhtml)
296                if test -e $GTK_HTML_PREFIX/lib/libgtkhtml.a ; then
297                        AC_MSG_RESULT(yes)
298                        AC_MSG_CHECKING(for static libgnomeprint)
299                        if test -e $GNOME_PRINT_PREFIX/lib/libgnomeprint.a ; then
300                                AC_MSG_RESULT(yes)
301                                help_use_gtkhtml=true
302                        else
303                                AC_MSG_RESULT(no)
304                        fi
305                else
306                        AC_MSG_RESULT(no)
307                fi
308        fi
309fi
310
311AC_MSG_CHECKING(which HTML widget to use)
312if test "x$help_use_gtkhtml" = "xtrue" ; then
313        AC_MSG_RESULT(GtkHTML)
314else
315        AC_MSG_RESULT(GtkXmHTML)
316fi
317
318AM_CONDITIONAL(HELP_USE_GTKHTML, test x$help_use_gtkhtml = xtrue)
319dnl AC_SUBST(HELP_USE_GTKHTML)
320
321dnl help-browser
322dnl I found `inet_aton' in -lresolv on solaris
323oLIBS="$LIBS"
324RES_LIBS=
325# the following two are covered by X11 too.  If inet_aton is found in
326# plain libc, -lsocket or -lnsl, RES_LIBS will be empty.
327AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
328AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
329AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton,RES_LIBS="-lresolv")])
330AC_SUBST(RES_LIBS)
331LIBS="$oLIBS"
332
333dnl
334dnl Check for zvt_term_reset
335dnl
336oLIBS="$LIBS"
337LIBS="$GNOMEUI_LIBS $GNOME_LIBDIR $ZVT_LIBS"
338AC_CHECK_FUNC(zvt_term_reset,[AC_DEFINE(HAVE_ZVT_TERM_RESET)])
339LIBS="$oLIBS"
340
341dnl
342dnl Check for libbz2
343dnl
344oLIBS="$LIBS"
345BZ_LIBS=""
346AC_CHECK_LIB(bz2, bzopen, [
347        AC_DEFINE(HAVE_LIBBZ2)
348        LIBS=$oLIBS
349        BZ_LIBS="-lbz2"
350        ], AC_CHECK_LIB(bz2, BZ2_bzopen, [
351           AC_DEFINE(HAVE_LIBBZ2)
352           AC_DEFINE(HAVE_LIBBZ2_1_0)
353           LIBS=$oLIBS
354           BZ_LIBS="-lbz2"
355           ], AC_MSG_WARN([Recent enough BZ2 library not found. Help-Browser will not be able to read bzipped man/info pages])
356))
357AC_SUBST(BZ_LIBS)
358
359dnl
360dnl Place to look for KDE menus
361dnl
362AC_ARG_WITH(kde-datadir, [  --with-kde-datadir=DIR         Location of KDE data])
363
364if test "x$with_kde_datadir" = x ; then
365  kde_datadir=/usr/share
366else
367  kde_datadir=$with_kde_datadir
368fi
369
370AC_DEFINE_UNQUOTED(KDE_MENUDIR, "$kde_datadir/applnk")
371AC_DEFINE_UNQUOTED(KDE_ICONDIR, "$kde_datadir/icons")
372AC_DEFINE_UNQUOTED(KDE_MINI_ICONDIR, "$kde_datadir/icons/mini")
373
374dnl
375dnl Place to look for KDE docs
376dnl
377AC_ARG_WITH(kde-docdir, [  --with-kde-docdir=DIR         Location of KDE documentation])
378
379if test "x$with_kde_docdir" = x ; then
380  kde_docdir=/usr/doc/kde
381else
382  kde_docdir=$with_kde_docdir
383fi
384
385AC_DEFINE_UNQUOTED(KDE_DOCDIR, "$kde_docdir")
386
387
388
389dnl AC_CONFIG_SUBDIRS(gemvt)
390
391dnl gtk-doc stuff
392
393AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
394AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
395AC_SUBST(HAVE_GTK_DOC)
396
397dnl Let people disable the gtk-doc stuff.
398AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
399
400if test x$enable_gtk_doc = xauto ; then
401  if test x$GTKDOC = xtrue ; then
402    enable_gtk_doc=yes
403  else
404    enable_gtk_doc=no
405  fi
406fi
407
408dnl
409dnl Solaris and other OSes do not have IceListenForWellKnownConnections
410dnl
411oLIBS="$LIBS"
412LIBS="$GNOMEUI_LIBS $GNOME_LIBDIR"
413AC_CHECK_FUNCS(_IceTransNoListen)
414LIBS="$oLIBS"
415
416dnl
417dnl Sun shipped a patch which makes gnome-session seg fault in a libICE call.
418dnl Use the check for the broken libICE on Solaris _only_
419dnl
420uname_s=`uname -s`
421if test "x$uname_s" = xSunOS; then
422  AC_DEFINE(DO_LIBICE_CHECK)
423fi
424
425dnl NOTE: We need to use a separate automake conditional for this
426dnl       to make this work with the tarballs.
427AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
428
429dnl HACK to expand datadir
430ICONDIR=`eval echo "${datadir}/pixmaps"`
431AC_DEFINE_UNQUOTED(GNOME_ICONDIR,"${ICONDIR}")
432
433AC_OUTPUT([
434Makefile
435gnome-core.spec
436po/Makefile.in
437macros/Makefile
438panel/Makefile
439panel/doc/Makefile
440panel/help/Makefile
441panel/help/C/Makefile
442panel/help/de/Makefile
443panel/help/it/Makefile
444panel/help/ja/Makefile
445applets/Makefile
446applets/applet-dirs/Makefile
447applets/gen_util/Makefile
448applets/gen_util/help/Makefile
449applets/gen_util/help/C/Makefile
450applets/gen_util/help/C/clock/Makefile
451applets/gen_util/help/C/mailcheck/Makefile
452applets/gen_util/help/C/printer/Makefile
453applets/gen_util/help/de/Makefile
454applets/gen_util/help/no/Makefile
455applets/gen_util/help/da/Makefile
456applets/gen_util/help/da/clock/Makefile
457applets/gen_util/help/da/mailcheck/Makefile
458applets/gen_util/help/da/printer/Makefile
459applets/gen_util/help/es/Makefile
460applets/gen_util/help/es/printer/Makefile
461applets/fish/Makefile
462applets/fish/help/Makefile
463applets/fish/help/C/Makefile
464applets/fish/help/no/Makefile
465applets/fish/help/da/Makefile
466applets/desk-guide/Makefile
467applets/desk-guide/help/Makefile
468applets/desk-guide/help/C/Makefile
469applets/desk-guide/help/de/Makefile
470applets/tasklist/Makefile
471applets/tasklist/help/Makefile
472applets/tasklist/help/C/Makefile
473core-docs/Makefile
474core-docs/fdl/Makefile
475core-docs/fdl/C/Makefile
476core-docs/gpl/Makefile
477core-docs/gpl/C/Makefile
478core-docs/lgpl/Makefile
479core-docs/lgpl/C/Makefile
480desktop-links/Makefile
481gnome-terminal/Makefile
482gnome-terminal/C/Makefile
483gnome-terminal/de/Makefile
484gnome-terminal/da/Makefile
485gnome-terminal/es/Makefile
486gnome-terminal/it/Makefile
487gnome-terminal/no/Makefile
488help-browser/Makefile
489help-browser/gnome-man2html/Makefile
490help-browser/gnome-info2html/Makefile
491help-browser/help/Makefile
492help-browser/help/C/Makefile
493help-browser/help/ca/Makefile
494help-browser/help/da/Makefile
495help-browser/help/el/Makefile
496help-browser/help/es/Makefile
497help-browser/help/et/Makefile
498help-browser/help/eu/Makefile
499help-browser/help/hu/Makefile
500help-browser/help/fr/Makefile
501help-browser/help/gl/Makefile
502help-browser/help/it/Makefile
503help-browser/help/ja/Makefile
504help-browser/help/ko/Makefile
505help-browser/help/lt/Makefile
506help-browser/help/no/Makefile
507help-browser/help/uk/Makefile
508help-browser/help/wa/Makefile
509gnome-hint/Makefile
510gnome-about/Makefile
511gmenu/Makefile
512gnome-edit/Makefile
513idl/Makefile
514pixmaps/Makefile
515gsm/Makefile
516gsm/help/Makefile
517gsm/help/C/Makefile
518gsm/default.session.5
519gsm/gnome-session.1
520smproxy/Makefile
521intl/Makefile
522omf-install/Makefile])
Note: See TracBrowser for help on using the repository browser.