configure.ac 18.3 KB
Newer Older
1 2
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
3

4
AC_PREREQ([2.53])
5
AC_INIT([AisleRiot], [3.22.8],
6 7
  [http://bugzilla.gnome.org/enter_bug.cgi?product=aisleriot],
  [aisleriot])
Christian Persch's avatar
Christian Persch committed
8

9 10 11 12 13
# Must run under bash; see bug 726780
if test -z "$BASH_VERSION"; then
  AC_MSG_ERROR([Set CONFIG_SHELL to bash and try again.])
fi

Christian Persch's avatar
Christian Persch committed
14
AC_CONFIG_MACRO_DIR([m4])
15
AC_CONFIG_SRCDIR([src/sol.c])
16
AC_CONFIG_HEADERS([config.h])
Christian Persch's avatar
Christian Persch committed
17

18
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 foreign -Wno-portability])
19

20
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
21

22 23 24 25
if test -z "$enable_maintainer_mode"; then
  enable_maintainer_mode=yes
fi
AM_MAINTAINER_MODE([enable])
26

27
# *****************************************************************************
28

29 30
GNOME_DEBUG_CHECK

31
PKG_PROG_PKG_CONFIG([0.15])
32
PKGS=
33

34
AC_PROG_CC
Callum McKenzie's avatar
Callum McKenzie committed
35
AC_PROG_CPP
36
AC_PROG_CXX
Callum McKenzie's avatar
Callum McKenzie committed
37
AC_PROG_LN_S
38
AC_PROG_MKDIR_P
39
AC_PROG_SED
40 41
AM_PROG_CC_C_O

42 43 44 45
LT_PREREQ([2.2])
LT_INIT
LT_LANG([C])
LT_LANG([C++])
46

47 48 49
# ************
# Dependencies
# ************
50

51 52 53 54
# Check which platform to use

AC_MSG_CHECKING([for which platform to build])
AC_ARG_WITH([platform],
55
  [AS_HELP_STRING([--with-platform=gnome|gtk-only (default: gnome)])],
56
  [case "$withval" in
57
    gnome|gtk-only) ;;
58 59 60 61 62 63
    *) AC_MSG_ERROR([invalid argument "$withval" for --with-platform]) ;;
   esac],
  [with_platform=gnome])
AC_MSG_RESULT([$with_platform])

AM_CONDITIONAL([HAVE_GNOME],[test "$with_platform" = "gnome"])
Andreas Røsdal's avatar
Andreas Røsdal committed
64

65 66 67
if test "$with_platform" = "gnome"; then
  AC_DEFINE([HAVE_GNOME],[1],[Define if GNOME support is enabled])
fi
68

69 70 71 72
# Check which gtk+ major version to use

AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
73
  [AS_HELP_STRING([--with-gtk=3.0],[which gtk+ version to compile against (default: 3.0)])],
74
  [case "$with_gtk" in
75 76
     3.0) ;;
     [0-9].0) AC_MSG_ERROR([unsupported gtk version $with_gtk specified]) ;;
77 78
     *) AC_MSG_ERROR([invalid gtk version specified]) ;;
   esac],
79
  [with_gtk=3.0])
80 81 82
AC_MSG_RESULT([$with_gtk])

case "$with_gtk" in
83
  3.0) GTK_API_VERSION=3.0
84 85 86 87 88 89 90
       GTK_API_MAJOR_VERSION=3
       ;;
esac

AC_SUBST([GTK_API_VERSION])
AC_SUBST([GTK_API_MAJOR_VERSION])

91
# **************
92
# Win32 platform
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

AC_CANONICAL_HOST

AC_MSG_CHECKING([for some Win32 platform])
case "$host" in
  *-*-cygwin*|*-*-mingw*)
    platform_win32=yes
    ;;
  *)
    platform_win32=no
    ;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL([PLATFORM_WIN32],[test "$platform_win32" = "yes"])

AC_MSG_CHECKING([for native Win32])
case "$host" in
  *-*-mingw*)
    os_win32=yes
    ;;
  *)
    os_win32=no
    ;;
esac
AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL([PLATFORM_WIN32_NATIVE],[test "$os_win32" = "yes"])

# ******************
122
# Card theme formats
123
# ******************
124 125 126

AC_MSG_CHECKING([for requested card theme formats])
AC_ARG_WITH([card-theme-formats],
127 128 129 130
  [AS_HELP_STRING([--with-card-theme-formats],[which card theme formats to support (svg,fixed,kde,pysol|default|all)])],
  [],[with_card_theme_formats=default])

case "$with_card_theme_formats" in
131
  default) with_card_theme_formats="svg,pysol" ;;
132
  all) with_card_theme_formats="svg,kde,fixed,native,pysol" ;;
133
esac
134 135 136 137

enable_card_theme_format_svg=no
enable_card_theme_format_kde=no
enable_card_theme_format_fixed=no
138
enable_card_theme_format_native=no
139
enable_card_theme_format_pysol=no
140
need_svg=no
141
need_rsvg=no
142
need_qtsvg=no
143 144

IFS="${IFS=	}"; gg_saved_ifs="$IFS"; IFS=","
145
for format in $with_card_theme_formats; do
146 147 148 149
  case "$format" in
    svg) enable_card_theme_format_svg=yes ;;
    kde) enable_card_theme_format_kde=yes ;;
    fixed) enable_card_theme_format_fixed=yes ;;
150
    native) enable_card_theme_format_native=yes ;;
151
    pysol) enable_card_theme_format_pysol=yes ;;
152
    *) IFS="$gg_saved_ifs" AC_MSG_ERROR([unknown card theme format $format requested]) ;;
153 154 155 156 157 158 159 160
  esac
done
IFS="$gg_saved_ifs"

AC_MSG_RESULT([$with_card_theme_formats])

if test "$enable_card_theme_format_svg" = "yes"; then
  AC_DEFINE([ENABLE_CARD_THEME_FORMAT_SVG],[1],[Define to enable SVG card theme format support])
161
  need_svg=yes
162 163 164 165
  need_rsvg=yes
fi
if test "$enable_card_theme_format_kde" = "yes"; then
  AC_DEFINE([ENABLE_CARD_THEME_FORMAT_KDE],[1],[Define to enable KDE card theme format support])
166 167
  need_svg=yes
  need_qtsvg=yes
168 169 170 171
fi
if test "$enable_card_theme_format_fixed" = "yes"; then
  AC_DEFINE([ENABLE_CARD_THEME_FORMAT_FIXED],[1],[Define to enable prerendered card theme format support])
fi
172 173 174 175
if test "$enable_card_theme_format_native" = "yes"; then
  AC_DEFINE([ENABLE_CARD_THEME_FORMAT_NATIVE],[1],[Define to enable native SVG rendering with QtSvg])
  need_svg=yes
  need_qtsvg=yes
176 177 178 179 180 181 182 183
fi
if test "$enable_card_theme_format_pysol" = "yes"; then
  AC_DEFINE([ENABLE_CARD_THEME_FORMAT_PYSOL],[1],[Define to enable PySol card theme format support])
fi

AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_SVG],[test "$enable_card_theme_format_svg" = "yes"])
AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_KDE],[test "$enable_card_theme_format_kde" = "yes"])
AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_FIXED],[test "$enable_card_theme_format_fixed" = "yes"])
184
AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_NATIVE],[test "$enable_card_theme_format_native" = "yes"])
185 186
AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_PYSOL],[test "$enable_card_theme_format_pysol" = "yes"])

187 188
# Card theme paths

189
AC_MSG_CHECKING([distribution])
190
if test -f /etc/os-release; then
191
  DISTRO="$(source /etc/os-release && echo $ID)"
192
else
193
  DISTRO="unknown"
194
fi
195
AC_MSG_RESULT([$DISTRO])
196

197
if test "$enable_card_theme_format_kde" = "yes"; then
198 199 200
  AC_MSG_CHECKING([for KDE card themes base path])
  AC_ARG_WITH([kde-card-theme-path],
    [AS_HELP_STRING([--with-kde-card-theme-path],[The base path to the KDE card themes])],
201
    [],[case "$DISTRO" in
202 203
           debian|opensuse|ubuntu) with_kde_card_theme_path="/usr/share/kde4/apps/carddecks" ;;
	   fedora|rhel|centos) with_kde_card_theme_path="/usr/share/carddecks" ;;
204 205 206 207 208 209 210
          *) AC_MSG_ERROR([When enabling the KDE card theme format, you must specify the KDE card themes base path.]) ;;
        esac])
  AC_MSG_RESULT([$with_kde_card_theme_path])

  AC_DEFINE_UNQUOTED([KDE_CARD_THEME_PATH],["$with_kde_card_theme_path"],[The base path to the KDE card themes])
fi

211
if test "$enable_card_theme_format_pysol" = "yes"; then
212 213 214
  AC_MSG_CHECKING([for PySol card themes base path])
  AC_ARG_WITH([pysol-card-theme-path],
    [AS_HELP_STRING([--with-pysol-card-theme-path],[The base path to the PySol card themes])],
215
    [],[case "$DISTRO" in
216 217
          debian|ubuntu) with_pysol_card_theme_path="/usr/share/games/pysol" ;;
          fedora|rhel|centos) with_pysol_card_theme_path="/usr/share/PySolFC" ;;
218
          opensuse) with_pysol_card_theme_path="/usr/share/games/pysol/data" ;;
219 220 221 222 223 224 225
          *) AC_MSG_ERROR([When enabling the PySol card theme format, you must specify the PySol card themes base path.]) ;;
        esac])
  AC_MSG_RESULT([$with_pysol_card_theme_path])

  AC_DEFINE_UNQUOTED([PYSOL_CARD_THEME_PATH],["$with_pysol_card_theme_path"],[The base path to the PySol card themes])
fi

226 227 228 229
# Default card theme

AC_MSG_CHECKING([which card theme to use by default])
AC_ARG_WITH([default-card-theme],
230 231
  [AS_HELP_STRING([--with-default-card-theme=NAME],[Which card theme to use by default (default: gnomangelo_bitmap.svgz)])],
  [],[with_default_card_theme="gnomangelo_bitmap.svgz"])
232 233
AC_MSG_RESULT([$with_default_card_theme])

234
AC_DEFINE_UNQUOTED([AR_CARD_THEME_DEFAULT],["$with_default_card_theme"],[The default card theme])
235

236 237 238
AC_MSG_CHECKING([which card theme format to use by default])
AC_ARG_WITH([default-card-theme-format],
  [AS_HELP_STRING([--with-default-card-theme-format=NAME],[Which card theme format to use by default (default: platform dependent)])],
239
  [],[with_default_card_theme_format=svg])
240 241 242
AC_MSG_RESULT([$with_default_card_theme_format])

case "$with_default_card_theme_format" in
243
  svg|kde|fixed|native|pysol) ;;
244
  *) AC_MSG_ERROR([card theme format $with_default_card_theme_format unknown])
245 246
esac

247
AC_DEFINE_UNQUOTED([AR_CARD_THEME_DEFAULT_FORMAT_STRING],["$with_default_card_theme_format"],[The default card theme format type string])
248

249 250 251 252 253 254
# ******************
# Extra Debugging UI
# ******************

AC_MSG_CHECKING([whether extra debugging UI in Aisleriot is requested])
AC_ARG_ENABLE([debug-ui],
255
  [AS_HELP_STRING([--enable-debug-ui],[Enable extra debugging UI in Aisleriot (default: disabled)])],
256 257 258 259 260 261 262 263 264
  [],[enable_debug_ui=no])
AC_MSG_RESULT([$enable_debug_ui])

if test "$enable_debug_ui" = "yes"; then
  AC_DEFINE([ENABLE_DEBUG_UI],[1],[Define extra debugging UI in Aisleriot is enabled])
fi

AM_CONDITIONAL([ENABLE_DEBUG_UI],[test "$enable_debug_ui" = "yes"])

265 266 267 268
# ********************
# Checks for libraries
# ********************

269
case "$with_gtk" in
270
  3.0) GTK_REQUIRED=3.4.0
271
       RSVG_REQUIRED=2.32.0
272
       LIBCANBERRA_GTK_REQUIRED=0.26
273
       LIBCANBERRA_GTK_PKGS="libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED"
274 275
       ;;
esac
276

277
GCONF_REQUIRED=2.0
278 279
GLIB_REQUIRED=2.32.0
GIO_REQUIRED=2.32.0
280 281 282

# Check for common modules

283 284 285 286 287 288 289 290 291 292 293
PKGS="$PKGS gtk+-$GTK_API_VERSION >= $GTK_REQUIRED"

# *****
# Sound
# *****

AC_MSG_CHECKING([whether to enable sound support])
AC_ARG_ENABLE([sound],
  [AS_HELP_STRING([--enable-sound],[Enable sound using libcanberra])],
  [],[enable_sound=yes])
AC_MSG_RESULT([$enable_sound])
294

295 296
if test "$enable_sound" = "yes"; then
  PKGS="$PKGS $LIBCANBERRA_GTK_PKGS"
297

298 299
  AC_DEFINE([ENABLE_SOUND],[1],[Define if sound support is enabled])
fi
Robert Ancell's avatar
Robert Ancell committed
300

301
AM_CONDITIONAL([ENABLE_SOUND],[test "$enable_sound" = "yes"])
302

303
# *********
304
# GSettings
305
# *********
306

307
GLIB_GSETTINGS
308 309 310

# Check for GNOME modules

311 312 313 314 315 316 317
m4_ifdef([AM_GCONF_SOURCE_2],
  [AM_GCONF_SOURCE_2
   AC_PATH_PROG([GCONFTOOL],[gconftool-2])
  ],
  [AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL],[false])
   with_platform=gtk-only]
)
318

319
if test "$with_platform" = "gnome"; then
320
  PKGS="$PKGS gconf-2.0 >= $GCONF_REQUIRED"
321 322
fi

323
# Check for librsvg
324

325
have_rsvg=no
326
if test "$need_rsvg" = "yes"; then
327
  CAIRO_REQUIRED=1.10.0
328

329 330
  PKG_CHECK_EXISTS([librsvg-2.0 >= $RSVG_REQUIRED],[have_rsvg=yes],[have_rsvg=no])

331
  PKGS="$PKGS librsvg-2.0 >= $RSVG_REQUIRED cairo >= $CAIRO_REQUIRED"
332 333 334

  AC_DEFINE([HAVE_RSVG],[1],[Refine if librsvg is available])
fi
335

336
AM_CONDITIONAL([HAVE_RSVG],[test "$have_rsvg" = "yes"])
337

338 339 340 341
# Check for QtSvg

have_qtsvg=no
if test "$need_qtsvg" = "yes"; then
342
  QT_SVG_REQUIRED=5.0.0
343

344
  PKG_CHECK_EXISTS([Qt5Svg >= $QT_SVG_REQUIRED],[have_qtsvg=yes],[have_qtsvg=no])
345

346
  PKGS="$PKGS Qt5Svg >= $QT_SVG_REQUIRED"
347 348 349 350 351 352 353 354
  EXTRA_CXX_LIBS="$EXTRA_CXX_LIBS -lstdc++"

  AC_DEFINE([HAVE_QTSVG],[1],[Refine if QtSvg is available])
fi

AM_CONDITIONAL([HAVE_QTSVG],[test "$have_qtsvg" = "yes"])

if test "$need_svg" = "yes" -a "$have_rsvg" = "no" -a "$have_qtsvg" = "no"; then
355
   AC_MSG_ERROR([One of librsvg or Qt5Svg are required])
356 357
fi

358 359 360
# *****************
# Extra build tools
# *****************
361

362
AC_ARG_VAR([GLIB_GENMARSHAL],[the glib-genmarshal programme])
363
if test -z "$GLIB_GENMARSHAL"; then
364 365 366 367
  AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal],[])
  if test -z "$GLIB_GENMARSHAL"; then
    AC_MSG_ERROR([glib-genmarshal not found])
  fi
368 369
fi

370 371
AC_ARG_VAR([GLIB_COMPILE_RESOURCES],[the glib-compile-resources programme])
if test -z "$GLIB_COMPILE_RESOURCES"; then
372 373 374 375
  AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources],[])
  if test -z "$GLIB_COMPILE_RESOURCES"; then
    AC_MSG_ERROR([glib-compile-resources not found])
  fi
376 377
fi

378 379
AC_ARG_VAR([GZIP],[the gzip programme])
if test -z "$GZIP"; then
380 381 382 383
  AC_PATH_PROG([GZIP],[gzip],[])
  if test -z "$GZIP"; then
    AC_MSG_ERROR([gzip not found])
  fi
384 385 386 387
fi

AC_ARG_VAR([XMLLINT],[the xmllint programme])
if test -z "$XMLLINT"; then
388 389 390 391
  AC_PATH_PROG([XMLLINT],[xmllint],[])
  if test -z "$XMLLINT"; then
    AC_MSG_ERROR([xmllint not found])
  fi
392
fi
393

394 395
AC_ARG_VAR([DESKTOP_FILE_VALIDATE],[the desktop-file-validate programme])
if test -z "$DESKTOP_FILE_VALIDATE"; then
396 397 398 399
  AC_PATH_PROG([DESKTOP_FILE_VALIDATE],[desktop-file-validate],[])
  if test -z "$DESKTOP_FILE_VALIDATE"; then
    AC_MSG_ERROR([desktop-file-validate not found])
  fi
400 401
fi

402 403 404 405 406 407 408
if test "$platform_win32" = "yes" -a "$os_win32" = "yes"; then
  AC_CHECK_TOOL([WINDRES],[windres],[no])
  if test "$WINDRES" = "no"; then
    AC_MSG_ERROR([windres is required for native win32])
  fi
fi

409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441
# ********
# Binreloc
# ********

AC_MSG_CHECKING([whether to enable binary relocation support])
AC_ARG_ENABLE([binreloc],
  [AS_HELP_STRING([--enable-binreloc],[enable binary relocation support (default: disabled)])],
  [],
  [enable_binreloc="$platform_win32"])
AC_MSG_RESULT([$enable_binreloc])

if test "$enable_binreloc" = "yes"; then

  # Check that all variables use the same prefix
  # Note: datarootdir exists only since autoconf 2.60, so we have to
  # check for the old and the new form of datadir.
  if test "$exec_prefix" != '${prefix}' -o \
          "$bindir" != '${exec_prefix}/bin' -o \
          "$sbindir" != '${exec_prefix}/sbin' -o \
          "$libdir" != '${exec_prefix}/lib' -o \
          "$libexecdir" != '${exec_prefix}/libexec' -o \
          "$sysconfdir" != '${prefix}/etc' -o \
          "$localstatedir" != '${prefix}/var' -o \
          \( -n "$datarootdir" -a "$datarootdir" != '${prefix}/share' \) -o \
          \( "$datadir" != '${datarootdir}' -a "$datadir" != '${prefix}/share' \) -o \
          \( "$localedir" != '${datarootdir}/locale' -a "$localedir" != '${datadir}/locale' \) -o \
          \( "$mandir" != '${datarootdir}/man' -a "$mandir" != '${datadir}/man' \); then
    AC_MSG_ERROR([cannot use binary relocation with different prefixes])
  fi

  AC_DEFINE([ENABLE_BINRELOC],[1],[Define for binary relocation support])
fi

442 443 444 445
# ***********
# Compilation
# ***********

446 447
save_CFLAGS="$CFLAGS"
CFLAGS=
448 449 450 451 452 453 454
CC_CHECK_CFLAGS_APPEND([ \
  -Wall -Wextra \
  -Wformat-nonliteral -Werror=format-security \
  -Wsign-compare -Werror=implicit-function-declaration \
  -Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
  -Waggregate-return -Wcast-align -Wimplicit -Wuninitialized \
  -Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
455
  -Wpacked -Wmissing-format-attribute -Wshadow -Wlogical-op \
456 457 458
  -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
  -Wdeclaration-after-statement -Wold-style-definition \
  -Wno-missing-field-initializers -Wno-unused-parameter \
459
  -Wempty-body -Wformat-signedness \
460
  -fno-common -fno-strict-aliasing -Wno-switch-enum])
461 462
AM_CFLAGS="$AM_CFLAGS $CFLAGS"
CFLAGS="$save_CFLAGS"
463

464 465 466 467
# ****
# i18n
# ****

468
GETTEXT_PACKAGE=aisleriot
469
AC_SUBST(GETTEXT_PACKAGE)
470
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext package name])
471
AM_GLIB_GNU_GETTEXT
472

473
IT_PROG_INTLTOOL([0.35.0])
474

475 476 477
# *****
# Guile
# *****
478

479
guile_versions_all="2.2 2.0"
480 481
AC_MSG_CHECKING([which guile version to use])
AC_ARG_WITH([guile],
482
  [AS_HELP_STRING([--with-guile=2.2|2.0|auto],[Which guile version to use (default: auto)])],
483
  [case "$with_guile" in
484
     1.8) AC_MSG_ERROR([unsupported guile version $with_guile requested]) ;;
485 486
     2.0|2.2) guile_versions="$withval" ;;
     auto) guile_versions="$guile_versions_all" ;;
487
     *) AC_MSG_ERROR([unsupported guile version $with_guile requested]) ;;
488
    esac],
489 490
   [guile_versions="$guile_versions_all" with_guile=auto])
AC_MSG_RESULT([$with_guile])
491

492 493 494
GUILE_PKG([$guile_versions])
# not using GUILE_FLAGS due to config.rpath issue
PKGS="$PKGS guile-$GUILE_EFFECTIVE_VERSION"
495

496
GUILE_PROGS
497

498 499 500 501 502 503 504 505
# ************
# Dependencies
# ************

PKG_CHECK_MODULES([AISLERIOT],[$PKGS])
AC_SUBST([AISLERIOT_CFLAGS])
AC_SUBST([AISLERIOT_LIBS])

506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523
# *************
# Documentation
# *************

# We support various ways to present help to the user:
# ghelp: using the ghelp: protocol, most likely displaying in Yelp
# file: showing html or xhtml files in the web browser
# library: in the web browser loaded remotedly from library.gnome.org
#
# Note that for help using [x]html files, we can't use gnome-doc-utils.make
# since it doesn't currently support this. The packager will have to use
# gnome-doc-tool directly to build the documentation in the right format.
# The help files must be installed in $(pkgdatadir)/$(DOC_MODULE)/$(LOCALE) .

AC_MSG_CHECKING([which help method to use])
AC_ARG_WITH([help-method],
  [AS_HELP_STRING([--with-help-method],[which help method to use (ghelp|file|library; default: ghelp)])],
  [],
524 525 526 527 528
  [if test "$platform_win32" = "yes"; then
     with_help_method=file
   else
     with_help_method=ghelp
   fi])
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
AC_MSG_RESULT([$with_help_method])

case "$with_help_method" in
  ghelp) AC_DEFINE([WITH_HELP_METHOD_GHELP],[1],[Define to use help using ghelp]) ;;
  file) AC_DEFINE([WITH_HELP_METHOD_FILE],[1],[Define to use help using file]) ;;
  library) AC_DEFINE([WITH_HELP_METHOD_LIBRARY],[1],[Define to use help using library.gnome.org]) ;;
  *) AC_MSG_ERROR([unknown help method "$with_help_method"]) ;;
esac

if test "$with_help_method" = "file"; then
  AC_MSG_CHECKING([for help file format])
  AC_ARG_WITH([help-file-format],
    [AS_HELP_STRING([--with-help-file-format],[which file format to use for help (html|xhtml; default: html)])],
    [case "$with_help_file_format" in
       html|xhtml) ;;
       *) AC_MSG_ERROR([unknown help file format "$with_help_file_format"]) ;;
     esac],
    [with_help_file_format=html])
  AC_MSG_RESULT([$with_help_file_format])

  AC_DEFINE_UNQUOTED([HELP_FILE_FORMAT],["$with_help_file_format"],[The help file format])
fi

552
YELP_HELP_INIT([no-lc-media-links no-lc-dist])
553 554 555

AM_CONDITIONAL([BUILD_HELP],[test "$with_help_method" = "ghelp"])

556 557 558 559 560 561 562 563 564
# ********
# Valgrind
# ********

AC_ARG_WITH([valgrind-dir],
  [AC_HELP_STRING([--with-valgrind-dir=PATH],[directory to install Valgrind suppressions to])],
  [],[with_valgrind_dir='${libdir}/valgrind'])
AC_SUBST([valgrinddir],[$with_valgrind_dir])

565 566
##############################################

567 568 569 570
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])
571
AC_SUBST([EXTRA_CXX_LIBS])
572

573 574
##############################################
##############################################
575

Callum McKenzie's avatar
Callum McKenzie committed
576
AC_CONFIG_FILES([
577
Makefile
578
cards/Makefile
579
data/Makefile
580
data/icons/Makefile
581
data/sounds/Makefile
582
data/sol.desktop.in
583
games/Makefile
584
help/Makefile
585
po/Makefile.in
586 587
src/Makefile
src/lib/Makefile
588
src/aisleriot.gresource.xml
589
])
Callum McKenzie's avatar
Callum McKenzie committed
590
AC_OUTPUT
591

592 593
echo "
Configuration:
594

595 596
    Source code location:  ${srcdir}
    Compiler:              ${CC}
597

598
    Guile version:         ${GUILE_EFFECTIVE_VERSION}
599
    GTK+ API version:      ${GTK_API_VERSION}
600
    Platform:              ${with_platform}
601
    Help method:           ${with_help_method} ${with_help_file_format}
602
    Using RSVG:            ${have_rsvg}
603
    Using QtSvg:           ${have_qtsvg}
604
    Card theme formats:    ${with_card_theme_formats}
605 606
    Default theme format:  ${with_default_card_theme_format}
    Default theme:         ${with_default_card_theme}
607
    Sound support:         ${with_sound}
608
    Binreloc:              ${enable_binreloc}
609
"