configure.ac 19.6 KB
Newer Older
Philippe Rouquier's avatar
Philippe Rouquier committed
1
dnl Process this file with autoconf to produce a configure script.
Matthias Clasen's avatar
Matthias Clasen committed
2
AC_INIT([brasero],[3.12.1])
Philippe Rouquier's avatar
Philippe Rouquier committed
3 4
AC_CONFIG_SRCDIR(src/main.c)

Luis Medinas's avatar
Luis Medinas committed
5
BRASERO_MAJOR_VERSION=3
Frederic Peters's avatar
Frederic Peters committed
6
BRASERO_MINOR_VERSION=12
Matthias Clasen's avatar
Matthias Clasen committed
7
BRASERO_SUB=1
8
BRASERO_VERSION=$BRASERO_MAJOR_VERSION.$BRASERO_MINOR_VERSION.$BRASERO_SUB
Philippe Rouquier's avatar
Philippe Rouquier committed
9 10 11 12 13 14

AC_SUBST(BRASERO_MAJOR_VERSION)
AC_SUBST(BRASERO_MINOR_VERSION)
AC_SUBST(BRASERO_SUB)
AC_SUBST(BRASERO_VERSION)

15 16 17 18 19 20 21 22
dnl Before making a release, the BURN_LT_VERSION string should be modified.
dnl The string is of the form C:R:A.
dnl - If interfaces have been changed or added, but binary compatibility has
dnl   been preserved, change to C+1:0:A+1
dnl - If binary compatibility has been broken (eg removed or changed interfaces)
dnl   change to C+1:0:0
dnl - If the interface is the same as the previous version, change to C:R+1:A

23
LT_CURRENT=3
24
LT_REVISION=6
25
LT_AGE=2
26

Philippe Rouquier's avatar
Philippe Rouquier committed
27 28 29 30
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

31
LIBBRASERO_LT_VERSION=$LT_CURRENT:$LT_REVISION:$LT_AGE
32
AC_SUBST(LIBBRASERO_LT_VERSION) 
Philippe Rouquier's avatar
Philippe Rouquier committed
33

34 35 36
TYPELIB_VERSION=$BRASERO_MAJOR_VERSION.$((LT_CURRENT-LT_AGE))
AC_SUBST(TYPELIB_VERSION)

Philippe Rouquier's avatar
Philippe Rouquier committed
37 38 39 40 41
AC_DEFINE_UNQUOTED(BRASERO_MAJOR_VERSION, $BRASERO_MAJOR_VERSION, [major version])
AC_DEFINE_UNQUOTED(BRASERO_MINOR_VERSION, $BRASERO_MINOR_VERSION, [minor version])
AC_DEFINE_UNQUOTED(BRASERO_SUB, $BRASERO_SUB, [sub version])
AC_DEFINE_UNQUOTED(BRASERO_VERSION, $BRASERO_VERSION, [version])

42 43 44 45 46
dnl this is what it used to be
dnl AM_INIT_AUTOMAKE(brasero, $BRASERO_VERSION)

AM_INIT_AUTOMAKE([foreign])

47 48
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

49
AC_CONFIG_HEADERS([config.h])
Philippe Rouquier's avatar
Philippe Rouquier committed
50

51
AC_DISABLE_STATIC
52
LT_INIT
53

54
AM_MAINTAINER_MODE([enable])
55

56 57
dnl **************** Support GSettings *************************
GLIB_GSETTINGS
58

59
dnl **************** documentation *****************************
60
YELP_HELP_INIT
61
GTK_DOC_CHECK([1.12])
62

63 64
dnl ***************** GNOME MACROS *****************************

65
dnl This allows to set warnings
66 67 68 69 70 71 72
GNOME_COMPILE_WARNINGS([maximum])
GNOME_CXX_WARNINGS

dnl This could be use one day not to compile all debugging message
dnl GNOME_DEBUG_CHECK

GNOME_MAINTAINER_MODE_DEFINES
73 74
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -DGSEAL_ENABLE"
AC_SUBST(DISABLE_DEPRECATED)
75

Philippe Rouquier's avatar
Philippe Rouquier committed
76 77
dnl ***************** GENERAL **********************************

78
dnl ** reminder: the following set CFLAGS to -O2 -g if empty
Philippe Rouquier's avatar
Philippe Rouquier committed
79 80
AC_PROG_CC
AC_HEADER_STDC
81

82 83 84
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
  if test "x${prefix}" = "xNONE"; then
85
    AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], "${ac_default_prefix}/share/", [Define the PACKAGE_DATA_DIR.])
86
  else
87
    AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], "${prefix}/share/", [Define the PACKAGE_DATA_DIR.])
88 89 90 91
  fi
  elif test "x${datadir}" = 'x${datarootdir}'; then
  if test "x${datarootdir}" = 'x${prefix}/share'; then
  	if test "x${prefix}" = "xNONE"; then
92
 	AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], "${ac_default_prefix}/share/", [Define the PACKAGE_DATA_DIR.])
93
 	else
94
 	AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], "${prefix}/share/", [Define the PACKAGE_DATA_DIR.])
95 96
 	fi
  else
97
 	AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], "${datarootdir}/", [Define the PACKAGE_DATA_DIR.])
98 99
 	fi
  else
100
	AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], "${datadir}/", [Define the PACKAGE_DATA_DIR.])
101
fi
Philippe Rouquier's avatar
Philippe Rouquier committed
102

103
dnl ***************** SCSI related *****************************
104 105 106
AC_SUBST(BRASERO_SCSI_LIBS)
AC_CHECK_HEADERS([camlib.h],[has_cam="yes"],[has_cam="no"])

107 108 109 110 111
dnl ***************** check for linux sg interface *************
AC_CHECK_TYPES([sg_io_hdr_t],[has_sg="yes"],[has_sg="no"],
[#include <sys/types.h>
 #include <scsi/sg.h>])

112 113 114 115 116
dnl ***************** check for netbsd *************************
AC_CHECK_TYPES([scsireq_t],[has_scsiio="yes"],[has_scsiio="no"],
[#include <sys/types.h>
 #include <sys/scsiio.h>])

117 118 119 120 121 122 123 124 125
dnl ***************** check for solaris uscsi interface ********
AC_CHECK_TYPES([struct uscsi_cmd],[has_uscsi="yes"],[has_uscsi="no"],
[#include <sys/types.h>
 #include <sys/scsi/impl/uscsi.h>])

if test x"$has_cam" = x"yes"; then
    BRASERO_SCSI_LIBS="-lcam"
elif test x"$has_sg" = x"yes"; then
	:
126 127
elif test x"$has_scsiio" = x"yes"; then
	:
128 129 130
elif test x"$has_uscsi" = x"yes"; then
	:
else
131
	AC_MSG_ERROR([Support Linux SG, FreeBSD CAM, NetBSD SCSIPI, Solaris USCSI. No supported SCSI interface headers could not be found.])
132
fi
133

134 135
AM_CONDITIONAL(HAVE_CAM_LIB_H, test x"$has_cam" = "xyes")
AM_CONDITIONAL(HAVE_SG_IO_HDR_T, test x"$has_sg" = "xyes")
136
AM_CONDITIONAL(HAVE_USCSI_H, test x"$has_uscsi" = "xyes")
137
AM_CONDITIONAL(HAVE_SCSIIO_H, test x"$has_scsiio" = "xyes")
138

139 140 141 142
dnl ***************** LARGE FILE SUPPORT ***********************

AC_SYS_LARGEFILE

143
dnl ********** Required libraries **********************
144

145
GLIB_REQUIRED=2.29.14
146
GTHREAD_REQUIRED=2.6.0
147
GMODULE_REQUIRED=2.6.0
148
GMODULE_EXPORT_REQUIRED=2.6.0
149
GIO_REQUIRED=2.28.0
150 151
GSTREAMER_REQUIRED=0.11.92
GSTREAMER_BASE_REQUIRED=0.11.92
152
GSTREAMER_MODULE_REQUIRED=0.11.92
Philippe Rouquier's avatar
Philippe Rouquier committed
153
LIBXML2_REQUIRED=2.6.0
154

155
dnl ** used by brasero and one plugin
156
PKG_CHECK_MODULES(BRASERO_GSTREAMER, 			\
157 158 159 160 161 162
	gstreamer-1.0 >= $GSTREAMER_REQUIRED		\
	gstreamer-base-1.0 >= $GSTREAMER_REQUIRED		\
	gstreamer-video-1.0 >= $GSTREAMER_BASE_REQUIRED	\
	gstreamer-pbutils-1.0 >= $GSTREAMER_BASE_REQUIRED \
	gstreamer-tag-1.0 >= $GSTREAMER_BASE_REQUIRED)
BRASERO_GSTREAMER_CFLAGS="-DGST_USE_UNSTABLE_API $BRASERO_GSTREAMER_CFLAGS"
163 164 165
AC_SUBST(BRASERO_GSTREAMER_CFLAGS)
AC_SUBST(BRASERO_GSTREAMER_LIBS)

166
BRASERO_GSTREAMER_LIBS="$BRASERO_GSTREAMER_LIBS -lgstpbutils-1.0"
167 168

dnl ** used by brasero and one plugin
169 170
PKG_CHECK_MODULES(BRASERO_GIO, 	\
	gio-2.0 >= $GIO_REQUIRED)
171

172 173 174
AC_SUBST(BRASERO_GIO_CFLAGS)
AC_SUBST(BRASERO_GIO_LIBS)

175 176 177 178 179 180 181
dnl ** used by brasero and one plugin
PKG_CHECK_MODULES(BRASERO_LIBXML, 	\
	libxml-2.0 >= $LIBXML2_REQUIRED)

AC_SUBST(BRASERO_LIBXML_CFLAGS)
AC_SUBST(BRASERO_LIBXML_LIBS)

182 183 184 185 186 187 188
dnl ** used by brasero and both libraries
PKG_CHECK_MODULES(BRASERO_GTHREAD, 		\
	gthread-2.0 >= $GTHREAD_REQUIRED)

AC_SUBST(BRASERO_GTHREAD_CFLAGS)
AC_SUBST(BRASERO_GTHREAD_LIBS)

189
dnl ** used by brasero and all modules
190
PKG_CHECK_MODULES(BRASERO_GLIB, 		\
191
	gobject-2.0 >= $GLIB_REQUIRED		\
192
	glib-2.0 >= $GLIB_REQUIRED)
193

194 195
AC_SUBST(BRASERO_GLIB_CFLAGS)
AC_SUBST(BRASERO_GLIB_LIBS)
196

197 198 199 200 201 202
PKG_CHECK_MODULES(BRASERO_GMODULE,		\
	gmodule-2.0 >= $GMODULE_REQUIRED)

AC_SUBST(BRASERO_GMODULE_CFLAGS)
AC_SUBST(BRASERO_GMODULE_LIBS)

203 204 205 206 207 208
PKG_CHECK_MODULES(BRASERO_GMODULE_EXPORT,		\
	gmodule-export-2.0 >= $GMODULE_EXPORT_REQUIRED)

AC_SUBST(BRASERO_GMODULE_EXPORT_CFLAGS)
AC_SUBST(BRASERO_GMODULE_EXPORT_LIBS)

209 210 211
PKG_CHECK_MODULES(BRASERO_SM,
	sm \
	ice)
212

213 214
AC_SUBST(BRASERO_SM_CFLAGS)
AC_SUBST(BRASERO_SM_LIBS)
Philippe Rouquier's avatar
Philippe Rouquier committed
215

216 217 218
AC_CHECK_LIBM
AC_SUBST(LIBM)

219 220 221 222
#
# GTK+ stuff (taken and adapted from empathy)
#

223
GTK_REQUIRED=3.0.0
224

225 226 227
PKG_CHECK_MODULES([BRASERO_GTK],	\
		  gtk+-3.0 >= $GTK_REQUIRED	\
		  gdk-x11-3.0)
228 229 230 231

AC_SUBST(BRASERO_GTK_CFLAGS)
AC_SUBST(BRASERO_GTK_LIBS)

232 233 234 235 236 237 238 239 240 241
#
# libnotify check
#

LIBNOTIFY_REQUIRED=0.6.1

PKG_CHECK_MODULES([BRASERO_LIBNOTIFY],[libnotify >= $LIBNOTIFY_REQUIRED])
AC_SUBST(BRASERO_LIBNOTIFY_CFLAGS)
AC_SUBST(BRASERO_LIBNOTIFY_LIBS)

242 243 244
#
# Canberra
#
245

246 247
CANBERRA_REQUIRED=0.1

248
PKG_CHECK_MODULES(BRASERO_CANBERRA,
249
	      libcanberra >= $CANBERRA_REQUIRED
250
	      libcanberra-gtk3 >= $CANBERRA_REQUIRED)
251 252 253 254

AC_SUBST(BRASERO_CANBERRA_CFLAGS)
AC_SUBST(BRASERO_CANBERRA_LIBS)

255
dnl ****************Nautilus**********************************
256 257
# Note: the extension is built against gtk+-3.0 so we cannot build extension with gtk+-2.0
NAUTILUS_REQUIRED=2.91.90
258 259

AC_ARG_ENABLE(nautilus,
260
			AS_HELP_STRING([--enable-nautilus],[Build Nautilus extension [[default=yes]]]),
261
			[enable_nautilus=$enableval],
262 263
			[enable_nautilus="yes"])

264 265 266 267 268
AC_ARG_WITH(nautilusdir,
			AS_HELP_STRING([--with-nautilusdir=DIR],[Installation path for Nautilus extension @<:@auto@:>@]),
			[ac_with_nautilusdir=$withval],
			[ac_with_nautilusdir=""])

269 270
if test x"$enable_nautilus" = "xyes"; then
    	PKG_CHECK_MODULES(NAUTILUS_EXTENSION,
271
			  libnautilus-extension >= $NAUTILUS_REQUIRED,
272 273
			  build_nautilus=yes,
			  build_nautilus=no)
274
else
275
	build_nautilus="no"
276 277 278
fi

if test x"$build_nautilus" = "xyes"; then
279 280
	NAUTILUS_EXTENSION_CFLAGS="$BRASERO_GLIB_CFLAGS $BRASERO_UI_CFLAGS $NAUTILUS_EXTENSION_CFLAGS"
	NAUTILUS_EXTENSION_LIBS="$BRASERO_GLIB_LIBS $BRASERO_UI_LIBS $NAUTILUS_EXTENSION_LIBS"
281 282 283 284 285 286 287 288

	if test "${ac_with_nautilusdir}" = ""; then
		ac_with_nautilusdir=`pkg-config --variable=extensiondir libnautilus-extension`
	fi

	AC_MSG_NOTICE([installing plugin in ${ac_with_nautilusdir}])
	AC_SUBST([NAUTILUSDIR],[${ac_with_nautilusdir}])

289 290 291 292 293
	AM_GLIB_DEFINE_LOCALEDIR([GNOMELOCALEDIR])
fi

AM_CONDITIONAL(BUILD_NAUTILUS, test x"$build_nautilus" = "xyes")

294 295 296 297
#
# Installation path for plugins
#

298
BRASERO_PLUGIN_DIRECTORY=${libdir}/brasero3/plugins
299 300
AC_SUBST(BRASERO_PLUGIN_DIRECTORY)

Philippe Rouquier's avatar
Philippe Rouquier committed
301
dnl ****************check for libburn (optional)**************
302
LIBBURN_REQUIRED=0.4.0
303
LIBISOFS_REQUIRED=0.6.4
Philippe Rouquier's avatar
Philippe Rouquier committed
304

305
AC_ARG_ENABLE(libburnia,
306
			AS_HELP_STRING([--enable-libburnia],[Build libburnia plugins [[default=yes]]]),
307
			[enable_libburnia=$enableval],
308
			[enable_libburnia="yes"])
Philippe Rouquier's avatar
Philippe Rouquier committed
309

310
if test x"$enable_libburnia" = "xyes"; then
311
	PKG_CHECK_MODULES(LIBBURNIA, libburn-1 >= $LIBBURN_REQUIRED  libisofs-1 >= $LIBISOFS_REQUIRED, build_libburnia=yes, build_libburnia=no)
Philippe Rouquier's avatar
Philippe Rouquier committed
312
else
313
	build_libburnia="no"
Philippe Rouquier's avatar
Philippe Rouquier committed
314 315
fi

316 317 318
if test x"$build_libburnia" = "xyes"; then
	AC_SUBST(BRASERO_LIBBURNIA_CFLAGS)
	AC_SUBST(BRASERO_LIBBURNIA_LIBS)
319

320 321 322
	BRASERO_LIBBURNIA_CFLAGS="$LIBBURNIA_CFLAGS"
	BRASERO_LIBBURNIA_LIBS="$LIBBURNIA_LIBS"
	AC_DEFINE(BUILD_LIBBURNIA, 1, [define if you  want to build libburnia plugins])
Philippe Rouquier's avatar
Philippe Rouquier committed
323
fi
324
AM_CONDITIONAL(BUILD_LIBBURNIA, test x"$build_libburnia" = "xyes")
Philippe Rouquier's avatar
Philippe Rouquier committed
325

326 327
dnl **************** check for cdrtools **********************
AC_ARG_ENABLE(cdrtools,
328
			AS_HELP_STRING([--enable-cdrtools],[Build cdrtools plugins [[default=yes]]]),
329
			[build_cdrtools=$enableval],
330
			[build_cdrtools="yes"])
331

332 333
if test x"$build_cdrtools" = "xyes"; then
	AC_DEFINE(BUILD_CDRTOOLS, 1, [define if you  want to build cdrtools plugins])
334 335
else
	build_cdrtools="no"
336
fi
337
AM_CONDITIONAL(BUILD_CDRTOOLS, test x"$build_cdrtools" = "xyes")
338

339 340 341 342 343 344 345 346 347 348 349 350 351
dnl **************** check for cdrdao **********************
AC_ARG_ENABLE(cdrdao,
			AS_HELP_STRING([--enable-cdrdao],[Build cdrdao plugins [[default=yes]]]),
			[build_cdrdao=$enableval],
			[build_cdrdao="yes"])

if test x"$build_cdrdao" = "xyes"; then
	AC_DEFINE(BUILD_CDRDAO, 1, [define if you  want to build cdrdao plugins])
else
	build_cdrdao="no"
fi
AM_CONDITIONAL(BUILD_CDRDAO, test x"$build_cdrdao" = "xyes")

352 353
dnl **************** check for cdrkit ************************
AC_ARG_ENABLE(cdrkit,
354
			AS_HELP_STRING([--enable-cdrkit],[Build cdrkit plugins [[default=yes]]]),
355
			[build_cdrkit=$enableval],
356
			[build_cdrkit="yes"])
357

358 359
if test x"$build_cdrkit" = "xyes"; then
	AC_DEFINE(BUILD_CDRKIT, 1, [define if you  want to build cdrkit plugins])
360 361
else
	build_cdrkit="no"
362
fi
363
AM_CONDITIONAL(BUILD_CDRKIT, test x"$build_cdrkit" = "xyes")
364

365 366 367 368 369 370 371 372 373 374 375 376 377
dnl **************** check for growisofs ************************
AC_ARG_ENABLE(growisofs,
			AS_HELP_STRING([--enable-growisofs],[Build growisofs plugins [[default=yes]]]),
			[build_growisofs=$enableval],
			[build_growisofs="yes"])

if test x"$build_growisofs" = "xyes"; then
	AC_DEFINE(BUILD_GROWISOFS, 1, [define if you  want to build growisofs plugins])
else
	build_growisofs="no"
fi
AM_CONDITIONAL(BUILD_GROWISOFS, test x"$build_growisofs" = "xyes")

378
TRACKER_REQUIRED=0.10.0
Philippe Rouquier's avatar
Philippe Rouquier committed
379 380

AC_ARG_ENABLE(search,
381 382
			AS_HELP_STRING([--enable-search],[Build search pane (if a search backend is available) [[default=auto]]]),
			[case "$enableval" in
383
				"auto"|"yes"|"no") ;;
384 385
				*)         echo "Unknown option"; exit 2 ;;
			esac],
386 387
			[enable_search="auto"])

388 389 390
if test x"$enable_search" != "xno"; then
        # Try to figure out the tracker API version to use
        tracker_api="0.10"
Joshua Lock's avatar
Joshua Lock committed
391
        m4_foreach([VERSION], [[0.10], [0.12], [0.14], [0.16], [0.18], [1.0]],
392 393 394 395 396
                              [PKG_CHECK_EXISTS([tracker-sparql-VERSION >= $TRACKER_REQUIRED],
                                                [tracker_api="VERSION"])
                              ])
fi

397
if test x"$enable_search" = "xauto"; then
398 399 400
        PKG_CHECK_EXISTS([tracker-sparql-$tracker_api >= $TRACKER_REQUIRED],
                         [enable_search=yes],
                         [enable_search=no])
401
fi
Philippe Rouquier's avatar
Philippe Rouquier committed
402

403 404
if test x"$enable_search" = "xyes"; then
	PKG_CHECK_MODULES(BRASERO_SEARCH, tracker-sparql-$tracker_api >= $TRACKER_REQUIRED)
405 406 407 408 409 410
	AC_DEFINE(BUILD_SEARCH, 1, [define if you  want to use search pane])
	AC_DEFINE(BUILD_TRACKER, 1, [define if you  want to use search pane])
	AC_SUBST(BRASERO_SEARCH_CFLAGS)
	AC_SUBST(BRASERO_SEARCH_LIBS)
	build_tracker="yes"
	build_search="yes"
411 412
else
	build_search="no"
Philippe Rouquier's avatar
Philippe Rouquier committed
413
fi
414

Philippe Rouquier's avatar
Philippe Rouquier committed
415
AM_CONDITIONAL(BUILD_SEARCH, test x"$build_search" = "xyes")
416
AM_CONDITIONAL(BUILD_TRACKER, test x"$build_tracker" = "xyes")
Philippe Rouquier's avatar
Philippe Rouquier committed
417 418

dnl ****************check for playlist (optional)**************
419
TOTEM_REQUIRED=2.29.1
Philippe Rouquier's avatar
Philippe Rouquier committed
420 421

AC_ARG_ENABLE(playlist,
422
			AS_HELP_STRING([--enable-playlist],[Build playlist pane (if totem-pl-parser is available)[[default=yes]]]),
423
			[enable_playlist=$enableval],
Philippe Rouquier's avatar
Philippe Rouquier committed
424 425 426
			[enable_playlist="yes"])

if test x"$enable_playlist" = "xyes"; then
427
	PKG_CHECK_MODULES(BRASERO_PL_PARSER, totem-plparser >= $TOTEM_REQUIRED, build_totem=yes, build_totem=no)
Philippe Rouquier's avatar
Philippe Rouquier committed
428 429 430 431 432 433 434
else
	build_totem="no"
fi

if test x"$build_totem" = "xyes"; then
	AC_DEFINE(BUILD_PLAYLIST, 1, [define if you  want to build playlist pane])
fi
435 436 437 438

AC_SUBST(BRASERO_PL_PARSER_CFLAGS)
AC_SUBST(BRASERO_PL_PARSER_LIBS)

Philippe Rouquier's avatar
Philippe Rouquier committed
439 440 441 442
AM_CONDITIONAL(BUILD_PLAYLIST, test x"$build_totem" = "xyes")

dnl ****************check for preview (optional)**************
AC_ARG_ENABLE(preview,
443
			AS_HELP_STRING([--enable-preview],[Build preview pane [[default=yes]]]),
444
			[enable_preview=$enableval],
Philippe Rouquier's avatar
Philippe Rouquier committed
445 446 447
			[enable_preview="yes"])

if test x"$enable_preview" = "xyes"; then
448
	PKG_CHECK_MODULES(BRASERO_GSTREAMER_BASE, gstreamer-plugins-base-1.0 >= $GSTREAMER_MODULE_REQUIRED, build_preview=yes, build_preview=no)
Philippe Rouquier's avatar
Philippe Rouquier committed
449 450 451 452 453 454 455
else
	build_preview="no"
fi

if test x"$build_preview" = "xyes"; then
	AC_DEFINE(BUILD_PREVIEW, 1, [define if you  want to build preview pane])
fi
456 457 458 459

AC_SUBST(BRASERO_GSTREAMER_BASE_CFLAGS)
AC_SUBST(BRASERO_GSTREAMER_BASE_LIBS)

Philippe Rouquier's avatar
Philippe Rouquier committed
460 461 462 463
AM_CONDITIONAL(BUILD_PREVIEW, test x"$build_preview" = "xyes")

dnl ****************check for inotify (optional)**************
AC_ARG_ENABLE(inotify,
464
			AS_HELP_STRING([--enable-inotify],[use inotify [[default=yes]]]),
465
			[enable_inotify=$enableval],
Philippe Rouquier's avatar
Philippe Rouquier committed
466 467 468 469 470 471 472
			[enable_inotify="yes"])

if test x"$enable_inotify" = "xyes"; then
	AC_DEFINE(BUILD_INOTIFY, 1, [define if you  want to build inotify])
fi
AM_CONDITIONAL(BUILD_INOTIFY, test x"$enable_inotify" = "xyes")

473
dnl ****** GObject Introspection **********************
474 475 476 477 478 479 480
dnl This is a copy of the m4 function in gobject-introspection package
dnl but it was modified so the install path can be forced with a command
dnl line parameter. This is to be able to use make distcheck.

GOBJECT_INTROSPECTION_REQUIRED=0.6.3

AC_ARG_ENABLE(introspection,
481 482 483
                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], [Enable introspection for this build]),
		  [enable_introspection=$enableval],
		  [enable_introspection="auto"])
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544

AC_ARG_WITH(girdir,
			AS_HELP_STRING([--with-girdir=DIR],[Installation path for .gir files @<:@auto@:>@]),
			[ac_with_girdir=$withval],
			[ac_with_girdir=""])

AC_ARG_WITH(typelibdir,
			AS_HELP_STRING([--with-typelibdir=DIR],[Installation path for .typelib files @<:@auto@:>@]),
			[ac_with_typelibdir=$withval],
			[ac_with_typelibdir=""])

AC_MSG_CHECKING([for gobject-introspection])

dnl presence/version checking
AS_CASE([$enable_introspection],
    [no], [dnl
        found_introspection="no (disabled, use --enable-introspection to enable)"
    ],dnl
    [yes],[dnl
        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED],
                         found_introspection=yes,
                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
    ],dnl
    [auto],[dnl
        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED], found_introspection=yes, found_introspection=no)
    ],dnl
    [dnl	
        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
])dnl

AC_MSG_RESULT([$found_introspection])

INTROSPECTION_SCANNER=
INTROSPECTION_COMPILER=
INTROSPECTION_GENERATE=
INTROSPECTION_GIRDIR=
INTROSPECTION_TYPELIBDIR=
if test "x$found_introspection" = "xyes"; then
	INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
	INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
	INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`

	if test "${ac_with_girdir}" = ""; then
		ac_with_girdir=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
	fi
	INTROSPECTION_GIRDIR=${ac_with_girdir}
	AC_MSG_NOTICE([installing .gir files in ${INTROSPECTION_GIRDIR}])

	if test "${ac_with_typelibdir}" = ""; then
		ac_with_typelibdir="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
	fi
	INTROSPECTION_TYPELIBDIR=${ac_with_typelibdir}
	AC_MSG_NOTICE([installing .typelib files in ${INTROSPECTION_TYPELIBDIR}])
fi
AC_SUBST(INTROSPECTION_SCANNER)
AC_SUBST(INTROSPECTION_COMPILER)
AC_SUBST(INTROSPECTION_GENERATE)
AC_SUBST(INTROSPECTION_GIRDIR)
AC_SUBST(INTROSPECTION_TYPELIBDIR)
545

546
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
547

Philippe Rouquier's avatar
Philippe Rouquier committed
548 549
dnl ****** Update mime, desktop and icon caches *******
AC_ARG_ENABLE(caches,
550
			AS_HELP_STRING([--enable-caches],[Run update-* to update mime, desktop and icon caches when installing [[default=yes]]]),
551
			[enable_caches=$enableval],
Philippe Rouquier's avatar
Philippe Rouquier committed
552 553 554 555 556 557 558 559 560 561 562
			[enable_caches="yes"])

AM_CONDITIONAL(UPDATE_CACHES, test x"$enable_caches" = "xyes")

dnl ****** INTERNATIONALIZATION **********************
GETTEXT_PACKAGE=brasero
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])

AM_GLIB_GNU_GETTEXT

563
IT_PROG_INTLTOOL([0.50])
Philippe Rouquier's avatar
Philippe Rouquier committed
564 565 566 567 568 569 570 571 572

if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [Location of package locale files])
else
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", [Location of package locale files])
fi

dnl ****** END ***********************

573
AC_CONFIG_FILES([
Philippe Rouquier's avatar
Philippe Rouquier committed
574 575
Makefile
docs/Makefile
576
docs/reference/Makefile
Philippe Rouquier's avatar
Philippe Rouquier committed
577 578 579 580
docs/reference/libbrasero-media/Makefile
docs/reference/libbrasero-burn/Makefile
docs/reference/libbrasero-media/version.xml
docs/reference/libbrasero-burn/version.xml
Philippe Rouquier's avatar
Philippe Rouquier committed
581
data/Makefile
582
data/brasero.desktop.in
583
data/icons/Makefile
584
data/mime/Makefile
585
help/Makefile
586
nautilus/Makefile
587
nautilus/brasero-nautilus.desktop.in
588
libbrasero-media/Makefile
589
libbrasero-media/brasero-media.h
590 591 592
libbrasero-utils/Makefile
libbrasero-burn/Makefile
libbrasero-burn/brasero-burn-lib.h
593
plugins/Makefile
594
plugins/audio2cue/Makefile
595 596 597 598 599 600 601 602 603 604 605
plugins/cdrdao/Makefile
plugins/cdrkit/Makefile
plugins/cdrtools/Makefile
plugins/growisofs/Makefile
plugins/libburnia/Makefile
plugins/transcode/Makefile
plugins/dvdcss/Makefile
plugins/dvdauthor/Makefile
plugins/checksum/Makefile
plugins/local-track/Makefile
plugins/vcdimager/Makefile
Philippe Rouquier's avatar
Philippe Rouquier committed
606 607
po/Makefile.in
src/Makefile
608 609
libbrasero-media3.pc
libbrasero-burn3.pc
Philippe Rouquier's avatar
Philippe Rouquier committed
610
])
611

612
AC_OUTPUT
Philippe Rouquier's avatar
Philippe Rouquier committed
613 614 615 616 617 618

echo
echo
echo "$PACKAGE configuration summary:"
echo "----------------------------------"

619 620
dnl 	Build libnotify support : ${build_libnotify}

Philippe Rouquier's avatar
Philippe Rouquier committed
621
echo "Version: $BRASERO_VERSION
622
	Using GTK+ 3
Philippe Rouquier's avatar
Philippe Rouquier committed
623
	Update caches: ${enable_caches}
624
	Build Nautilus extension : ${build_nautilus}
Philippe Rouquier's avatar
Philippe Rouquier committed
625
	Build inotify: ${enable_inotify}
626
	Build search pane : ${build_search}
Philippe Rouquier's avatar
Philippe Rouquier committed
627
	Build playlist pane : ${build_totem}
628
	Build Preview pane : ${build_preview}
629
	Plugins installed in : ${BRASERO_PLUGIN_DIRECTORY}
630
	Build cdrdao plugins : ${build_cdrdao}
631 632
	Build cdrtools plugins : ${build_cdrtools}
	Build cdrkit plugins : ${build_cdrkit}
633
	Build growisofs plugins : ${build_growisofs}
634
	Build libburnia plugins : ${build_libburnia}
635
	Build GObject-Introspection : ${found_introspection}
Philippe Rouquier's avatar
Philippe Rouquier committed
636 637 638
"
echo
echo