summaryrefslogtreecommitdiffstats
path: root/libk3bdevice/configure.in.in
blob: 6887494196dfb2dd6c6e5445236036f6651d40c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
dnl FIXME: only make the linux header check on linux systems.

linux_scsi=no
AC_MSG_CHECKING(for linux scsi headers)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
	#include <linux/version.h>
	#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,50)
	typedef unsigned char u8;
	#endif
	#include <sys/types.h>
	#include <linux/../scsi/scsi.h> /* cope with silly includes */
	],
	[],
	[linux_scsi=yes])
AC_MSG_RESULT($linux_scsi)

case "$host_os" in
freebsd*|dragonfly*)
	# I'll be damned if lousy coding prevents us from running
	# this application.
	linux_scsi=yes
	;;
esac

if test "x$linux_scsi" = "xno" ; then
	DO_NOT_COMPILE="$DO_NOT_COMPILE k3b"
fi
AC_LANG_RESTORE

dnl - find the cam_* functions
AC_CHECK_FUNC(cam_close_device,
	[CAM_LIB=""],
	[AC_CHECK_LIB(cam, cam_close_device, [CAM_LIB=-lcam], [CAM_LIB=""])]
	)
AC_SUBST(CAM_LIB)



dnl === check for resmgr - begin ============
AC_ARG_WITH(
	resmgr, 
	AS_HELP_STRING([--without-resmgr], [build K3b without ResMgr support (default=no)]), 
	[ac_cv_use_resmgr=$withval], 
	[ac_cv_use_resmgr=yes]
)

if test "$ac_cv_use_resmgr" = "yes"; then
  RESMGR_LIB=""
  KDE_CHECK_HEADERS(resmgr.h, [
         KDE_CHECK_LIB(resmgr,rsm_open_device,[
                 RESMGR_LIB="-lresmgr"
                 AC_DEFINE(HAVE_RESMGR,1,[defined if you have resmgr libraries and headers])
         ])
  ])
  AC_SUBST(RESMGR_LIB)
fi
dnl === check for resmgr - end ============