BUILD: fix withXaw conditional (tiny change)
[xboard.git] / configure.ac
1 dnl| configure.in
2 dnl|
3 dnl| Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 dnl| 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
5 dnl|
6 dnl| GNU XBoard is free software: you can redistribute it and/or modify
7 dnl| it under the terms of the GNU General Public License as published by
8 dnl| the Free Software Foundation, either version 3 of the License, or (at
9 dnl| your option) any later version.
10 dnl|
11 dnl| GNU XBoard is distributed in the hope that it will be useful, but
12 dnl| WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 dnl| General Public License for more details.
15 dnl|
16 dnl| You should have received a copy of the GNU General Public License
17 dnl| along with this program. If not, see http://www.gnu.org/licenses/.
18 dnl|
19 dnl| --------------------------------------------------------------------
20 dnl|
21 dnl| You can process this file with autoconf to produce a configure script.
22 dnl| However, normally the supplied configure script will work fine.
23 dnl|
24 dnl| If you do need to change the configure script, instead of editing
25 dnl| it directly, try to edit configure.in (in a way that will keep
26 dnl| it portable to sites and systems other than your own), and run autoconf
27 dnl| to regenerate configure.  Then submit your changes to be folded into
28 dnl| the standard version of xboard.
29
30 dnl| define second argument as VERSION.PATCHLEVEL. e.g. 4.4.0j
31 AC_INIT([xboard],[master-20130828],[bug-xboard@gnu.org])
32
33 dnl| need this to be able to compile some files in a subdir (filebrowser)
34 AM_INIT_AUTOMAKE([subdir-objects])
35 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
36
37 AC_CONFIG_HEADERS([config.h])
38
39 dnl | a bunch of templates for defines used below
40 AH_TEMPLATE([FIRST_PTY_LETTER],[template])
41 AH_TEMPLATE([HAVE_FCNTL_H],[template])
42 AH_TEMPLATE([HAVE_GETHOSTNAME],[template])
43 AH_TEMPLATE([HAVE_GETTIMEOFDAY],[template])
44 AH_TEMPLATE([HAVE_RANDOM],[template])
45 AH_TEMPLATE([HAVE_SYS_SOCKET_H],[template])
46 AH_TEMPLATE([IBMRTAIX],[template])
47 AH_TEMPLATE([LAST_PTY_LETTER],[template])
48 AH_TEMPLATE([PTY_ITERATION],[template])
49 AH_TEMPLATE([PTY_NAME_SPRINTF],[template])
50 AH_TEMPLATE([PTY_OPEN],[template])
51 AH_TEMPLATE([PTY_TTY_NAME_SPRINTF],[template])
52 AH_TEMPLATE([REMOTE_SHELL],[template])
53 AH_TEMPLATE([RTU],[template])
54 AH_TEMPLATE([UNIPLUS],[template])
55 AH_TEMPLATE([USE_PTYS],[template])
56 AH_TEMPLATE([X_WCHAR],[template])
57 AH_TEMPLATE([ATTENTION],[template])
58 AH_TEMPLATE([DEFINED_SYS_ERRLIST],[template])
59 AH_TEMPLATE([HAVE_LIBXPM],[template])
60 AH_TEMPLATE([USE_XAW3D],[template])
61 AH_TEMPLATE([X_LOCALE],[template])
62
63
64
65 if test -z "$CFLAGS" ; then
66 dnl| Prevent the next macro from setting CFLAGS to -g
67   CFLAGS=" "
68 fi
69 AC_PROG_CC
70
71 dnl| need this to be able to compile files in a subdir
72 AM_PROG_CC_C_O
73
74 AC_PROG_CPP
75 AC_ISC_POSIX
76 AC_PROG_INSTALL
77
78 dnl| add gettext support
79 AM_GNU_GETTEXT_VERSION(0.17)
80 AM_GNU_GETTEXT([external])
81
82 AC_CHECK_PROGS(RSH, remsh rsh, rsh)
83 AC_CHECK_PROGS(MINFO, makeinfo, makeinfo_not_found)
84 if test "$MINFO" = makeinfo_not_found ; then
85    echo Please install \"makeinfo\"
86    exit 1
87 fi
88 AC_DEFINE_UNQUOTED(REMOTE_SHELL, "$RSH")
89 AC_CHECK_PROG(NROFF, nroff, [nroff -man], cat)
90 AC_SUBST(NROFFFLAGS)
91 AC_PATH_PROGS(AWKPATH, awk mawk gawk nawk)
92 AC_PATH_PROGS(PERLPATH, perl)
93
94 AC_HEADER_STDC
95 AC_HEADER_TIME
96 AC_HEADER_SYS_WAIT
97 AC_HEADER_DIRENT
98 AC_TYPE_SIGNAL
99 AC_CHECK_HEADERS(stropts.h sys/time.h string.h unistd.h sys/systeminfo.h)
100 AC_CHECK_HEADERS(fcntl.h sys/fcntl.h, break)
101 AC_CHECK_HEADERS(sys/socket.h lan/socket.h, break)
102 AC_CHECK_HEADER(stddef.h, [], AC_DEFINE(X_WCHAR, 1))
103
104 AC_CHECK_FUNCS(_getpty grantpt setitimer usleep)
105 AC_CHECK_FUNCS(gettimeofday ftime, break)
106 AC_CHECK_FUNCS(random rand48, break)
107 AC_CHECK_FUNCS(gethostname sysinfo, break)
108 AC_CHECK_FUNC(setlocale, [],
109   AC_CHECK_LIB(i, setlocale, [], AC_DEFINE(X_LOCALE, 1)))
110
111 AC_CHECK_LIB(seq, getpseudotty)
112
113 dnl | add compiler warnings only if compiler understands them
114 AC_MSG_CHECKING(whether compiler understands -Wall -Wno-parentheses)
115 SAVE_CFLAGS="$CFLAGS"
116 CFLAGS="$CFLAGS -Wall -Wno-parentheses"
117 AC_TRY_COMPILE([],[],
118   AC_MSG_RESULT(yes),
119   AC_MSG_RESULT(no)
120   CFLAGS="$SAVE_CFLAGS")
121
122 dnl | check for pkg-config
123 AC_CHECK_PROGS([PKGCONFIG], [pkg-config], pkgconfig_not_found)
124 AS_IF( [test "x$PKGCONFIG" = xpkgconfig_not_found],
125        AC_MSG_ERROR([cannot find pkg-config! Please install it.]))
126
127 dnl | check for cairo and librsvg
128 PKG_CHECK_MODULES([CAIRO], [ cairo >= 1.2.0 librsvg-2.0 >= 2.14.0 ])
129 AC_SUBST(CAIRO_CFLAGS)
130 AC_SUBST(CAIRO_LIBS)
131
132 dnl | check which front end to use
133 dnl | first check for gtk
134 dnl | then for Xaw3d
135 dnl | and then for Xaw
136 FRONTEND_CFLAGS=""
137 FRONTEND_LIBS=""
138
139 AC_ARG_WITH([gtk],
140             [AS_HELP_STRING([--with-gtk],[use GTK front-end (experimental)])],
141             [with_GTK=$withval],
142             [with_GTK="no"])
143
144 AC_ARG_WITH([Xaw3d],
145             [AS_HELP_STRING([--with-Xaw3d],[use Xaw3d front-end (not fully supported anymore)])],
146             [with_Xaw3d="$withval"],
147             [with_Xaw3d="no"])
148
149 AC_ARG_WITH([Xaw],
150             [AS_HELP_STRING([--with-Xaw],[use Xaw front-end (default)])],
151             [with_Xaw="$withval"],
152             [with_Xaw="yes"])
153
154 AC_ARG_WITH([iconsdir],
155                         [AS_HELP_STRING([--with-iconsdir=DIR],
156                                                         [path where icons get installed (default: $datadir/icons/hicolor/48x48/apps)])],
157                         [ICONSDIR="$withval"],
158                         [ICONSDIR='$(datadir)/icons/hicolor/48x48/apps'])
159
160 AC_ARG_WITH([svgiconsdir],
161                         [AS_HELP_STRING([--with-svgiconsdir=DIR],
162                                                         [path where svg icons get installed (default: $datadir/icons/hicolor/scalable/apps)])],
163                         [SVGICONSDIR="$withval"],
164                         [SVGICONSDIR='$(datadir)/icons/hicolor/scalable/apps'])
165
166 AC_ARG_WITH([desktopdir],
167                         [AS_HELP_STRING([--with-desktopdir=DIR],
168                                                         [path where desktop files get installed (default: $datadir/applications)])],
169                         [DESKTOPDIR="$withval"],
170                         [DESKTOPDIR='$(datadir)/applications'])
171
172 AC_ARG_WITH([mimedir],
173                         [AS_HELP_STRING([--with-mimedir=DIR],
174                                                         [path where mime files get installed (default: $datadir/mime/packages)])],
175                         [MIMEDIR="$withval"],
176                         [MIMEDIR='$(datadir)/mime/packages'])
177
178 AC_ARG_WITH([gamedatadir],
179                         [AS_HELP_STRING([--with-gamedatadir=DIR],
180                                                         [path where game data files get installed (default: $datadir/games/xboard)])],
181                         [GAMEDATADIR="$withval"],
182                         [GAMEDATADIR='$(datadir)/games/xboard'])
183
184 AC_SUBST(ICONSDIR)
185 AC_SUBST(SVGICONSDIR)
186 AC_SUBST(DESKTOPDIR)
187 AC_SUBST(MIMEDIR)
188 AC_SUBST(GAMEDATADIR)
189
190 dnl | check for libraries
191 if test x"$with_GTK" = x"yes" ; then
192   PKG_CHECK_MODULES([GTK], [ gtk+-2.0 >= 2.16.0 gmodule-2.0 ])
193   FRONTEND_CFLAGS=$GTK_CFLAGS
194   FRONTEND_LIBS=$GTK_LIBS
195 fi
196
197 if test x"$with_GTK" = x"no" ; then
198
199 dnl | general check for Xaw and Xaw3d
200   AC_PATH_XTRA
201   if test -n "$no_x" ; then
202     AC_MSG_ERROR([ "    $PACKAGE requires the X Window System header files and libraries!
203     They were not found on your system.  See FAQ topic C.2.
204     configure failed"])
205   fi
206
207   save_cflags="$CFLAGS"
208   save_cppflags="$CPPFLAGS"
209   CFLAGS="$CFLAGS $X_CFLAGS"
210   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
211   AC_CHECK_HEADER([X11/Intrinsic.h],[xt="yes"],[xt="no"])
212   CFLAGS="$save_cflags"
213   CPPFLAGS="$save_cppflags"
214
215   if test "$xt" = "no" ; then
216      AC_MSG_ERROR([Xt headers not found. Please install the X11 packages.])
217   fi
218
219 dnl | check availability of Xaw3d
220   FRONTEND_LIBS=
221   AS_IF([test x"$with_Xaw3d" != x"no"],
222             [AC_CHECK_LIB([Xaw3d],
223                     [XawTextReplace],
224                     [ FRONTEND_LIBS="-lXaw3d"
225                       AC_DEFINE([USE_XAW3D], [1], [Define if you want to use Xaw3d])],
226                     [AC_MSG_ERROR([--with-Xaw3d was given, but test for Xaw3d failed. Make sure that you have Xaw3d installed, else you might want to try the configure option --without-Xaw3d])],
227                                [-lXaw])])
228
229 dnl | no Xaw3d, check for Xaw; make it the default
230   if test x"$with_Xaw3d" = x"no" ; then
231      with_Xaw=yes
232      save_cflags="$CFLAGS"
233      save_cppflags="$CPPFLAGS"
234      CFLAGS="$CFLAGS $X_CFLAGS"
235      CPPFLAGS="$CPPFLAGS $X_CFLAGS"
236      AC_CHECK_HEADER([X11/Xaw/Dialog.h],[xaw_headers="yes"], [xaw_headers="no"])
237      CFLAGS="$save_cflags"
238      CPPFLAGS="$save_cppflags"
239
240      if test x"$xaw_headers" = x"no" ; then
241         AC_MSG_ERROR([Xaw headers not found. Please install the Xaw package and headers.])
242      fi
243
244      FRONTEND_LIBS="-lXaw"
245   fi
246
247 fi
248
249 dnl | make results available in Makefile.am
250 AM_CONDITIONAL([withGTK],   [test x"$with_GTK" = x"yes"])
251 AM_CONDITIONAL([withXaw],   [test x"$with_Xaw3d" = x"yes" || test x"$with_Xaw" = x"yes"])
252
253
254 AC_SUBST(FRONTEND_CFLAGS)
255 AC_SUBST(FRONTEND_LIBS)
256
257 dnl | end Front-end check
258
259 AC_CANONICAL_HOST
260
261 dnl| The following info is mostly gathered from GNU Emacs 19.24.  Basically,
262 dnl| we are trying to find out whether this is a System-V derivative in
263 dnl| which pipes don't work with select() and if so, whether there is anything
264 dnl| strange about the way to open a pty.  Some of the work was done above
265 dnl| by looking for _getpty, grantpt, and getpseudotty.  A few other strange
266 dnl| properties of particular systems are also handled here.
267
268 dnl| 4/6/97 I'm not sure there really are any systems where pipes
269 dnl| don't work with select(), and ptys cause problems on many
270 dnl| systems, so I'm changing the default to disable ptys in all
271 dnl| cases.  I will change it back if I get bug reports that are fixed
272 dnl| by doing a "configure --enable-ptys"
273
274 USE_PTYS=0
275 case "$host" in
276   *-*-hpux* )
277     AC_DEFINE(PTY_TTY_NAME_SPRINTF,
278         [sprintf (pty_name, "/dev/pty/tty%c%x", c, i);])
279     AC_DEFINE(PTY_NAME_SPRINTF,
280         [sprintf (pty_name, "/dev/ptym/pty%c%x", c, i);])
281 dnl| USE_PTYS=1
282     if test "$GCC" = yes; then
283       CONF_CFLAGS="-fwritable-strings"
284     else
285
286 dnl| Note: You might be able to build xboard even if your compiler does not
287 dnl| support ANSI C (-Aa).  xboard itself does not require ANSI C.  I don't
288 dnl| know whether the X header files on HP-UX require it.
289
290       CONF_CFLAGS="-Aa -D_HPUX_SOURCE"
291     fi
292
293 dnl| HP doesn't supply a full set of X header files and libraries.  People
294 dnl| often have some things installed in one place and some in another.
295 dnl| AC_PATH_XTRA will find only one place, so we try to add all the
296 dnl| likely ones that might be missing here.  It might be better to
297 dnl| change AC_PATH_XTRA to try to extract this information from imake,
298 dnl| since folks who install the missing bits often configure their
299 dnl| imake to find them, but I don't want to delve into autoconf and
300 dnl| hack on its internals.
301
302     if test -d /opt/hppd/include/X11; then
303       X_CFLAGS="$X_CFLAGS -I/opt/hppd/include"
304       X_LIBS="$X_LIBS -L/opt/hppd/lib"
305     elif test -d /usr/contrib/X11R5/include; then
306       X_CFLAGS="$X_CFLAGS -I/usr/contrib/X11R5/include"
307       X_LIBS="$X_LIBS -L/usr/contrib/X11R5/lib"
308     elif test -d /usr/contrib/mitX11R5/include; then
309       X_CFLAGS="$X_CFLAGS -I/usr/contrib/mitX11R5/include"
310       X_LIBS="$X_LIBS -L/usr/contrib/mitX11R5/lib"
311     elif test -d /MIT/X11R5/include; then
312       X_CFLAGS="$X_CFLAGS -I/MIT/X11R5/include"
313       X_LIBS="$X_LIBS -L/MIT/X11R5/lib"
314     elif test -d /usr/local/include/X11R5; then
315       X_CFLAGS="$X_CFLAGS -I/usr/local/include/X11R5"
316       X_LIBS="$X_LIBS -L/usr/local/lib/X11R5"
317     fi
318     if test -d /usr/include/X11R5; then
319       X_CFLAGS="$X_CFLAGS -I/usr/include/X11R5"
320       X_LIBS="$X_LIBS -L/usr/lib/X11R5 -L/usr/lib/X11R4"
321     elif test -d /usr/include/X11R4; then
322       X_CFLAGS="$X_CFLAGS -I/usr/include/X11R4"
323       X_LIBS="$X_LIBS -L/usr/lib/X11R4"
324     fi
325   ;;
326
327   romp-ibm-aix* )
328     AC_DEFINE(IBMRTAIX, 1)
329 dnl| USE_PTYS=1
330   ;;
331
332   i386-ibm-aix )
333 dnl| USE_PTYS=1
334     if test "$GCC" = yes; then
335       CONF_CFLAGS="-fwritable-strings"
336     fi
337   ;;
338
339   *-*-aix3* | *-*-bosx* )
340     AC_DEFINE(PTY_ITERATION, [for (c = 0; !c; c++)])
341     AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptc");])
342     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [strcpy (pty_name, ttyname (fd));])
343 dnl| USE_PTYS=1
344   ;;
345
346   *-*-cxux* )
347     AC_DEFINE(FIRST_PTY_LETTER, 'A')
348     AC_DEFINE(LAST_PTY_LETTER, 'P')
349 dnl| USE_PTYS=1
350   ;;
351
352   *-*-uniplus* )
353     AC_DEFINE(UNIPLUS, 1)
354 dnl| USE_PTYS=1
355   ;;
356
357   *-*-rtu* )
358     AC_DEFINE(FIRST_PTY_LETTER, 'z')
359     AC_DEFINE(PTY_TTY_NAME_SPRINTF,
360         [sprintf (pty_name, "/dev/ttyp%x", i);])
361     AC_DEFINE(PTY_NAME_SPRINTF,
362         [sprintf (pty_name, "/dev/pty%x", i);])
363     AC_DEFINE(RTU, 1)
364 dnl| USE_PTYS=1
365   ;;
366
367   *-*-iris* | *-*-irix3* )
368     AC_DEFINE(PTY_ITERATION, [for (c = 0; !c; c++)])
369     AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptc");])
370     AC_DEFINE(PTY_TTY_NAME_SPRINTF,
371         [sprintf (pty_name, "/dev/ttyq%d", minor(stb.st_rdev));])
372 dnl| USE_PTYS=1
373   ;;
374
375   *-*-irix* )
376 dnl| USE_PTYS=1
377   ;;
378
379   *-*-sunos4* | *-*-solaris1* )
380
381 dnl| Work around a bug in the SunOS 4.x linker.  Not needed if you have patches
382 dnl|  100512-02 and 100573-03 from Sun.  The X FAQ says that the following is
383 dnl|  "overkill," but doesn't explain what should be done instead.
384
385     if test "$GCC" = yes; then
386       PRE_XMULIB="-static"
387       POST_XMULIB="-dynamic"
388     else
389       PRE_XMULIB="-Bstatic"
390       POST_XMULIB="-Bdynamic"
391     fi
392   ;;
393
394   *-*-sunos5* | *-*-solaris2* )
395 dnl| USE_PTYS=1
396
397 dnl| I'm not sure -lelf is needed, but it was in the old Imakefile.
398 dnl| The other libraries should all be found by Ac_PATH_XTRA or other
399 dnl| code above.
400
401     X_LIBS="$X_LIBS -lelf"
402   ;;
403
404   *-*-sco* )
405     AC_DEFINE(PTY_ITERATION, [for (i = 0; ; i++)])
406     AC_DEFINE(PTY_NAME_SPRINTF, [sprintf (pty_name, "/dev/ptyp%d", i);])
407     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [sprintf (pty_name, "/dev/ttyp%d", i);])
408 dnl| USE_PTYS=1
409   ;;
410
411   *-*-dynix* | *-*-ptx* )
412 dnl| USE_PTYS=1
413   ;;
414
415   *-*-esix* )
416 dnl| USE_PTYS=1
417   ;;
418
419   *-*-usg5-4* | *-*-sysvr4* )
420 dnl| USE_PTYS=1
421   ;;
422
423   *-*-usg* | *-*-sysv* | *-*-aix* )
424 dnl| USE_PTYS=1
425   ;;
426
427   vax-*-ultrix )
428     if test "$GCC" = yes; then
429       CONF_CFLAGS="-fwritable-strings"
430     fi
431   ;;
432
433 dnl| add some libs for OS X
434   *-apple-* )
435   ;;
436 esac
437
438 AC_ARG_ENABLE(  [xpm],
439                 [AS_HELP_STRING([--enable-xpm],[libXpm will be used if found (default)])],
440                 [enable_xpm="$enableval"],
441                 [enable_xpm="yes"])
442
443 if test x"$enable_xpm" != "xno"; then
444   save_cflags="$CFLAGS"
445   save_cppflags="$CPPFLAGS"
446   CFLAGS="$CFLAGS $X_CFLAGS"
447   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
448   AC_CHECK_HEADERS(X11/xpm.h)
449   CFLAGS="$save_cflags"
450   CPPFLAGS="$save_cppflags"
451   if test "$ac_cv_header_X11_xpm_h" = "yes"; then
452     save_ldflags="$LDFLAGS"
453     LDFLAGS="$LDFLAGS $X_LIBS"
454     AC_CHECK_LIB(Xpm, XpmReadFileToPixmap,
455                  [X_PRE_LIBS="-lXpm $X_PRE_LIBS"; AC_DEFINE(HAVE_LIBXPM)], [],
456                  [$X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
457     LDFLAGS="$save_ldflags"
458   fi
459 fi
460
461 AC_SUBST(PRE_XMULIB)
462 AC_SUBST(POST_XMULIB)
463 AC_SUBST(CONF_CFLAGS)
464 AC_SUBST(CONF_LDFLAGS)
465
466 AC_MSG_CHECKING(whether ptys or pipes should be used)
467 AC_ARG_ENABLE( [ptys],
468                [AS_HELP_STRING([--enable-ptys],[force use of pseudo-ttys with child processes])],
469 [if test "$enableval" = yes; then
470   USE_PTYS=1
471   enable_ptys="ptys"
472   AC_MSG_RESULT([ptys (user override)])
473 fi
474 if test "$enableval" = no; then
475   USE_PTYS=0
476   enable_ptys="pipes"
477   AC_MSG_RESULT([pipes (user override)])
478 fi],
479 [if test "$USE_PTYS" = 1; then
480   AC_MSG_RESULT(ptys)
481   enable_ptys="ptys"
482 else
483   AC_MSG_RESULT(pipes)
484   enable_ptys="pipes"
485 fi])
486 AC_DEFINE_UNQUOTED(USE_PTYS, $USE_PTYS)
487
488
489 dnl | define not to build zippy as a default, so that autoheader is happy
490 AC_ARG_ENABLE( [zippy],
491                [AS_HELP_STRING([--enable-zippy],[support interfacing a chess program to ICS (default)])],
492                [],
493                [enable_zippy="no"])
494
495 if test x"$enable_zippy" != xno; then
496   AC_DEFINE(ZIPPY, 1,[should zippy be enabled])
497 else
498   AC_DEFINE(ZIPPY, 0,[should zippy be enabled])
499 fi
500 AM_CONDITIONAL([ZIPPY], [test x$enable_zippy != xno])
501
502
503 AC_ARG_ENABLE(sigint,
504 [AS_HELP_STRING([--enable-sigint],[sending SIGINT (^C) wakes up GNU Chess (default)])],
505 [if test "$enableval" = yes; then
506   AC_DEFINE(ATTENTION, 1)
507 fi
508 enable_sigint=$enableval
509 ],
510 [enable_sigint="yes"
511 AC_DEFINE(ATTENTION, 1)])
512
513
514 if test x"$with_Xaw3d" = x"yes" -o  x"$with_Xaw" = x"yes" ; then
515 dnl | save all information for X in X_LIBS, also add the libraries themself
516 dnl | since AC_PATH_XTRA only adds the paths
517 X_LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS -lXmu -lX11 -lXt "
518 AC_SUBST(X_CFLAGS)
519 AC_SUBST(X_LIBS)
520 fi
521
522 dnl | should we install desktop icons and mime associations?
523 AC_ARG_ENABLE(  [update-mimedb],
524                 [AS_HELP_STRING([--disable-update-mimedb],[disable the update-mime-database after install [default=no]])],
525                 [enable_mimedb="no"],
526                 [enable_mimedb="yes"])
527
528 AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x"$enable_mimedb" = "xyes")
529
530 if test x"$enable_mimedb" = "xyes"; then
531    AC_PATH_PROG([XDG_MIME],[xdg-mime])
532    AC_SUBST(XDG_MIME)
533    AC_PATH_PROG([XDG_DESKTOP_MENU],[xdg-desktop-menu])
534    AC_SUBST(XDG_DESKTOP_MENU)
535    AC_PATH_PROG([XDG_ICON_RESOURCE],[xdg-icon-resource])
536    AC_SUBST(XDG_ICON_RESOURCE)
537 fi
538
539 dnl |  output Makefile
540 AC_CONFIG_FILES([Makefile cmail po/Makefile.in])
541 AC_CONFIG_COMMANDS([test-stamp-h],[test -z "$CONFIG_HEADERS" || date > stamp-h])
542 AC_CONFIG_COMMANDS([chmod-cmail],[chmod 755 cmail])
543 AC_OUTPUT
544
545 dnl
546 dnl Output a summary
547 dnl
548 echo ""
549 echo " Configurations summary:"
550 echo ""
551 echo "        prefix:          $prefix       "
552 echo "        datarootdir:     $datarootdir  "
553 echo "        datadir:         $datadir      "
554 echo "        gamedatadir:     $GAMEDATADIR  "
555 echo "        desktopdir:      $DESKTOPDIR   "
556 echo "        mimedir:         $MIMEDIR      "
557 echo "        iconsdir:        $ICONSDIR     "
558 echo "        svgiconsdir:     $SVGICONSDIR  "
559 echo "        infodir:         $infodir   (info files will go here)"
560 echo "        sysconfdir:      $sysconfdir   (xboard.conf will go here)"
561 echo ""
562 echo "        update mimedb:   $enable_mimedb"
563 echo ""
564 echo "        NLS support:     $USE_NLS"
565 echo ""
566 echo "        GTK:             $with_GTK"
567 echo "        Xaw3d:           $with_Xaw3d"
568 echo "        Xaw:             $with_Xaw"
569 echo ""
570 echo "        xpm:             $enable_xpm"
571 echo "        ptys:            $enable_ptys"
572 echo "        zippy:           $enable_zippy"
573 echo "        sigint:          $enable_sigint"