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