1 dnl KStars configuration
10 AC_DEFINE(TIMEZONE_IS_INT,1,[The symbol timezone is an int, not a function])
12 AC_DEFINE(TIMEZONE_IS_INT,0,[The symbol timezone is an int, not a function])
15 # KStars INDI driver for the FLI CCD
17 *linux* ) OSDIR=linux ;;
22 # This variable to is check for the availability of libusb
25 dnl --enable-libusb=PATH
27 AC_HELP_STRING([--enable-libusb=PATH],[libusb path (default /usr)]),
36 CPPFLAGS="$CPPFLAGS -I${enableval}/include"
37 LDFLAGS="$LDFLAGS -L${enableval}/lib"
43 dnl check if libusb is available
44 if test "${use_libusb}" != false ; then
46 AC_CHECK_HEADERS(usb.h, [have_libusb="yes"],
47 [ AC_MSG_WARN([usb.h not found, use --enable-libusb=PATH. Otherwise, INDI will compile without Apogee USB support.]) ])
50 LIBS="$LIBS $COREFOUNDATION $IOKIT"
51 AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb" have_libusb="yes"],
52 [ AC_MSG_WARN([libusb not found. INDI will compile without Apogee USB support.]) ])
57 dnl check if v4l2 is available
62 [AC_HELP_STRING([--disable-v4l2],
63 [disable V4L2 interface for KStars])],
64 [ case "${enableval}" in
65 no) disable_v4l2=yes ;;
66 yes) disable_v4l2=no ;;
67 *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l2) ;;
70 if test x$disable_v4l2 = xno; then
71 AC_CHECK_TYPE([struct v4l2_buffer],
74 [#include <sys/time.h>
75 #include <linux/videodev.h>])
76 if test x$have_v4l2 = xfalse; then
77 KERNEL_VERSION=`uname -r`
78 AC_CHECK_FILE(/lib/modules/$KERNEL_VERSION/build/include/linux/videodev2.h,
81 AC_MSG_WARN([We cannot locate videodev2.h in /usr/include/linux])
83 AC_MSG_WARN([This file is responsible for V4L2 in KStars])
84 AC_MSG_WARN([This file is correct in /lib/modules/$KERNEL_VERSION/build/include])
85 AC_MSG_WARN([It is recommended that you copy this file and videodev.h to /usr/include/linux])
97 if test x$have_v4l2 = xtrue; then
98 AC_DEFINE(HAVE_LINUX_VIDEODEV2_H, 1, [Define to 1 if you have the <linux/videodev2.h> header file.])
101 AM_CONDITIONAL(BSD, test x$OSDIR = xbsd)
102 AM_CONDITIONAL(LINUX, test x$OSDIR = xlinux)
103 AM_CONDITIONAL(NULL, test x$OSDIR = xnull)
104 AM_CONDITIONAL(HAVE_LIBUSB, test x$have_libusb = xyes)
105 AM_CONDITIONAL(HAVE_V4L2, [test x$have_v4l2 = xtrue])