|
|
|
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 ============
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# HAL check from kdebase/kioslave/media
|
|
|
|
|
|
|
|
AC_ARG_WITH(
|
|
|
|
hal,
|
|
|
|
AS_HELP_STRING(
|
|
|
|
[--without-hal],
|
|
|
|
[build K3b without HAL support (default=no)]),
|
|
|
|
[ac_cv_use_hal=$withval],
|
|
|
|
[ac_cv_use_hal=yes]
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x$ac_cv_use_hal" = "xyes" ; then
|
|
|
|
|
|
|
|
########### Check for the HAL
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for the HAL)
|
|
|
|
|
|
|
|
hal_inc=NOTFOUND
|
|
|
|
hal_lib=NOTFOUND
|
|
|
|
hal=NOTFOUND
|
|
|
|
|
|
|
|
search_incs="$kde_includes /usr/include /usr/include/hal /usr/local/include /usr/local/include/hal"
|
|
|
|
AC_FIND_FILE(libhal.h libhal-storage.h, $search_incs, hal_incdir)
|
|
|
|
|
|
|
|
if [test -r $hal_incdir/libhal.h] ; then
|
|
|
|
HAL_INCS="-I$hal_incdir"
|
|
|
|
hal_inc=FOUND
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -r $hal_incdir/libhal-storage.h ; then
|
|
|
|
hal_storage_version=4
|
|
|
|
grep LibHalVolume $hal_incdir/libhal-storage.h \
|
|
|
|
> /dev/null 2>&1 && hal_storage_version=5
|
|
|
|
if test $hal_storage_version = 4 ; then
|
|
|
|
AC_DEFINE(HAL_0_4, , [HAL API version 0.4])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
search_libs="$kde_libraries /usr/lib64 /usr/lib /usr/local/lib /lib /lib64"
|
|
|
|
AC_FIND_FILE(libhal.so, $search_libs, hal_libdir)
|
|
|
|
|
|
|
|
if [test -r $hal_libdir/libhal.so] ; then
|
|
|
|
HAL_LIBS="-L$hal_libdir -lhal"
|
|
|
|
hal_lib=FOUND
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [test $hal_inc = FOUND] && [test $hal_lib = FOUND] ; then
|
|
|
|
AC_MSG_RESULT(headers $hal_incdir libraries $hal_libdir)
|
|
|
|
hal=FOUND
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(searched but not found)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(HAL_INCS)
|
|
|
|
AC_SUBST(HAL_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
########### Check for DBus
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for DBus)
|
|
|
|
|
|
|
|
dbus_inc=NOTFOUND
|
|
|
|
dbus_lib=NOTFOUND
|
|
|
|
dbus=NOTFOUND
|
|
|
|
|
|
|
|
search_incs="$kde_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0 /usr/include/*/dbus-1.0"
|
|
|
|
AC_FIND_FILE(dbus/dbus.h, $search_incs, dbus_incdir)
|
|
|
|
|
|
|
|
search_incs_arch_deps="$kde_includes /usr/lib64/dbus-1.0/include /usr/lib/dbus-1.0/include /usr/local/lib/dbus-1.0/include /usr/lib/*/dbus-1.0/include"
|
|
|
|
AC_FIND_FILE(dbus/dbus-arch-deps.h, $search_incs_arch_deps, dbus_incdir_arch_deps)
|
|
|
|
|
|
|
|
if [test -r $dbus_incdir/dbus/dbus.h] && [test -r $dbus_incdir_arch_deps/dbus/dbus-arch-deps.h] ; then
|
|
|
|
DBUS_INCS="-I$dbus_incdir -I$dbus_incdir_arch_deps"
|
|
|
|
dbus_inc=FOUND
|
|
|
|
fi
|
|
|
|
|
|
|
|
search_libs="$kde_libraries /usr/lib64 /usr/lib /usr/local/lib /lib /lib64 /lib/*/ /usr/lib/*/"
|
|
|
|
AC_FIND_FILE(libdbus-1.so, $search_libs, dbus_libdir)
|
|
|
|
|
|
|
|
if test -r $dbus_libdir/libdbus-1.so ; then
|
|
|
|
DBUS_LIBS="-L$dbus_libdir -ldbus-1"
|
|
|
|
dbus_lib=FOUND
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [test $dbus_inc = FOUND] && [test $dbus_lib = FOUND] ; then
|
|
|
|
AC_MSG_RESULT(headers $dbus_incdir $dbus_incdir_arch_deps libraries $dbus_libdir)
|
|
|
|
dbus=FOUND
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(searched but not found)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(DBUS_INCS)
|
|
|
|
AC_SUBST(DBUS_LIBS)
|
|
|
|
|
|
|
|
########### Check for DBus-TQt bindings
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for DBus-TQt bindings)
|
|
|
|
|
|
|
|
dbusqt_inc=NOTFOUND
|
|
|
|
dbusqt_lib=NOTFOUND
|
|
|
|
dbusqt=NOTFOUND
|
|
|
|
|
|
|
|
search_incs="$kde_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
|
|
|
|
AC_FIND_FILE(dbus/connection.h, $search_incs, dbusqt_incdir)
|
|
|
|
|
|
|
|
if test -r $dbusqt_incdir/dbus/connection.h ; then
|
|
|
|
DBUSQT_INCS="-I$dbusqt_incdir"
|
|
|
|
dbusqt_inc=FOUND
|
|
|
|
fi
|
|
|
|
|
|
|
|
search_libs="$kde_libraries /usr/lib /usr/lib64 /usr/local/lib"
|
|
|
|
AC_FIND_FILE(libdbus-tqt-1.so, $search_libs, dbusqt_libdir)
|
|
|
|
|
|
|
|
if test -r $dbusqt_libdir/libdbus-tqt-1.so ; then
|
|
|
|
DBUSQT_LIBS="-L$dbusqt_libdir -ldbus-tqt-1"
|
|
|
|
dbusqt_lib=FOUND
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [test $dbusqt_inc = FOUND] && [test $dbusqt_lib = FOUND] ; then
|
|
|
|
AC_MSG_RESULT(headers $dbusqt_incdir libraries $dbusqt_libdir)
|
|
|
|
dbusqt=FOUND
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(searched but not found)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(DBUSQT_INCS)
|
|
|
|
AC_SUBST(DBUSQT_LIBS)
|
|
|
|
fi
|
|
|
|
|
|
|
|
########### Check if media HAL backend sould be compiled
|
|
|
|
|
|
|
|
have_hal=no
|
|
|
|
HAL_DBUS_LIBS=""
|
|
|
|
AC_MSG_RESULT(Found HAL storage version $hal_storage_version)
|
|
|
|
if [test "x$hal" = "xFOUND"] && [test "x$dbus" = "xFOUND"] && [test "x$dbusqt" = "xFOUND"] && [ test $hal_storage_version = 5 ] ; then
|
|
|
|
AC_DEFINE(HAVE_HAL, , [compile in HAL support])
|
|
|
|
have_hal=yes
|
|
|
|
HAL_DBUS_LIBS="$HAL_LIBS $DBUS_LIBS $DBUSQT_LIBS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(include_HAL, [test x$have_hal = xyes])
|
|
|
|
AC_SUBST(HAL_DBUS_LIBS)
|
|
|
|
|