1 dnl $Id: configure.ac,v 1.17.2.1 2008/10/26 14:11:30 lirc Exp $
3 dnl Process this file with autoconf to produce a configure script.
4 dnl configure.ac, (c)1999 Tom Wheeley <tw104@york.ac.uk>
7 AC_CONFIG_SRCDIR([daemons/lircd.c])
9 AM_INIT_AUTOMAKE(lirc, 0.8.4a)
10 AM_CONFIG_HEADER(config.h)
12 CFLAGS="${CFLAGS--O2 -g -Wall}"
14 dnl Checks for programs.
19 AC_PATH_PROG(mknod, mknod, /bin/mknod)
20 AC_PATH_PROG(mkfifo, mkfifo, /usr/bin/mkfifo)
21 AC_PATH_PROG(depmod, depmod, /sbin/depmod, $PATH:/sbin)
22 AC_PATH_PROG(LIBUSB_CONFIG, libusb-config)
26 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ""])
28 dnl Checks for header files.
31 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h syslog.h unistd.h)
33 dnl Checks for typedefs, structures, and compiler characteristics.
41 dnl Checks for library functions.
44 AC_CHECK_FUNCS(gethostname gettimeofday mkfifo select socket strdup \
45 strerror strtoul snprintf strsep vsyslog)
48 AC_CHECK_FUNCS(forkpty)
49 if test "$ac_cv_func_forkpty" != yes; then
50 AC_CHECK_LIB(util,forkpty,[
52 AC_DEFINE(HAVE_FORKPTY)])
56 AC_CHECK_HEADER(vga.h,
57 [AC_CHECK_HEADER(vgagl.h,
58 [AC_CHECK_LIB(vga, vga_init,
59 [AC_CHECK_LIB(vgagl, gl_setcontextvga,
60 [AC_DEFINE(HAVE_LIBVGA)]
67 x_progs="irxevent xmode2"
69 if test "$no_x" = "yes"; then
73 dnl getopt_long support
74 AC_CHECK_FUNCS(getopt_long,,
75 [AC_CHECK_LIB(gnugetopt,getopt_long,LDFLAGS="${LDFLAGS} -lgnugetopt",
76 [AC_MSG_ERROR([*** your libc doesn't provide the getopt_long function.
77 Therfore you need to have \"libgnugetopt\" installed to compile LIRC.
78 You can get a version from:
79 http://www.inf.ethz.ch/~mringwal/downloads/libgnugetopt-1.2.tar.gz
80 Extract the package and do a \"./configure && make && sudo make install\"
87 dnl Determine default configuration based on OS
90 dnl Mac OS X configuration
92 dnl PortAudio for mac os x
93 portaudio_lib_other="-framework CoreAudio -framework AudioToolbox"
95 dnl default devdir, on mac os x/darwin, /dev/ can not be used without kernel programming, so use a fifo somewhere else
96 devdir_default="/usr/lirc/dev/"
100 dnl Unix OSS configuration
102 dnl PortAudio for UNIX OSS
103 portaudio_lib_other="-lm -lpthread ${forkpty}"
106 devdir_default="/dev"
111 # use fifo instead of devnode (required on mac os x)
112 AM_CONDITIONAL(USE_FIFOS, test "$use_fifos" = "yes")
115 dnl look for Linux kernel source
117 AC_PATH_KERNEL_SOURCE
119 dnl here we see what drivers we could possibly even hope to run.
120 dnl this could be _much_ more sophisticated! especially the lirc ones.
122 AC_MSG_CHECKING([for which drivers can be installed on this system])
125 possible_drivers="(none) \
155 if test x${no_kernel} != xyes; then
156 possible_drivers="${possible_drivers} \
159 (lirc_dev lirc_atiusb) \
160 (lirc_dev lirc_bt829) \
161 (lirc_dev commandir lirc_cmdir) \
162 (lirc_dev lirc_gpio) \
163 (lirc_dev lirc_i2c) \
164 (lirc_dev lirc_igorplugusb) \
165 (lirc_dev lirc_ttusbir) \
166 (lirc_dev lirc_imon) \
167 (lirc_dev lirc_it87) \
168 (lirc_dev lirc_ite8709) \
169 (lirc_dev lirc_mceusb) \
170 (lirc_dev lirc_mceusb2) \
171 (lirc_dev lirc_parallel) \
172 (lirc_dev lirc_sasem) \
173 (lirc_dev lirc_serial) \
174 (lirc_dev lirc_sir) \
175 (lirc_dev lirc_streamzap)"
178 AH_TEMPLATE([DAEMONIZE],
179 [Define to run daemons as daemons])
182 [Define to enable debugging output])
184 AH_TEMPLATE([DEVDIR],
185 [device files directory])
187 AH_TEMPLATE([DYNCODES],
188 [Define to use dynamic IR codes])
190 AH_TEMPLATE([HAVE_ALSA_SB_RC],
191 [Define if the ALSA library with SB RC support is installed])
193 AH_TEMPLATE([HAVE_FORKPTY],
194 [Define if forkpty is available])
196 AH_TEMPLATE([HAVE_IGUANAIR],
197 [Define if the iguanaIR library is installed])
199 AH_TEMPLATE([HAVE_LIBALSA],
200 [Define if the ALSA library is installed])
202 AH_TEMPLATE([HAVE_LIBCARACA],
203 [Define if the caraca library is installed])
205 AH_TEMPLATE([HAVE_LIBIRMAN],
206 [Define if the libirman library is installed])
208 AH_TEMPLATE([HAVE_LIBIRMAN_SW],
209 [Define if the software only test version of libirman is installed])
211 AH_TEMPLATE([HAVE_LIBPORTAUDIO],
212 [Define if the portaudio library is installed])
214 AH_TEMPLATE([HAVE_LIBUSB],
215 [Define if libusb is installed])
217 AH_TEMPLATE([HAVE_LIBVGA],
218 [Define if the complete vga libraries (vga, vgagl) are installed])
220 AH_TEMPLATE([HAVE_LINUX_DEVINPUT],
221 [defined if Linux input interface is available])
223 AH_TEMPLATE([HAVE_LINUX_HIDDEV_FLAG_UREF],
224 [defined if Linux hiddev HIDDEV_FLAG_UREF flag is available])
226 AH_TEMPLATE([HAVE_SCSI],
227 [defined if SCSI API is available])
229 AH_TEMPLATE([HAVE_SOUNDCARD],
230 [defined if soundcard API is available])
232 AH_TEMPLATE([HAVE_VSYSLOG],
233 [define if you have vsyslog( prio, fmt, va_arg )])
235 AH_TEMPLATE([HW_DEFAULT],
236 [The name of the hw_* structure to use by default])
238 AH_TEMPLATE([LIRC_DRIVER],
239 [Text string signifying which driver is configured])
241 AH_TEMPLATE([LIRC_DRIVER_ANY],
242 [Define to include most drivers])
244 AH_TEMPLATE([LIRC_HAVE_DEVFS],
245 [Define if devfs support is present in current kernel])
247 AH_TEMPLATE([LIRC_IRQ],
248 [Set the IRQ for the lirc driver])
250 AH_TEMPLATE([LIRC_IRTTY],
251 [Set the default tty used by the irman/remotemaster driver])
253 AH_TEMPLATE([LIRC_IT87_DIGIMATRIX],
254 [Define if you want to use lirc_it87 with an Asus Digimatrix])
256 AH_TEMPLATE([LIRC_MAJOR],
257 [Set the device major for the lirc driver])
259 AH_TEMPLATE([LIRC_ON_SA1100],
260 [Define if you want to cross-compile for the SA1100])
262 AH_TEMPLATE([LIRC_PORT],
263 [Set the port address for the lirc driver])
265 AH_TEMPLATE([LIRC_SERIAL_ANIMAX],
266 [Define if you have an animax serial port receiver])
268 AH_TEMPLATE([LIRC_SERIAL_IGOR],
269 [Define if you have an Igor Cesko receiver])
271 AH_TEMPLATE([LIRC_SERIAL_IRDEO],
272 [Define if you have an IRdeo serial port receiver])
274 AH_TEMPLATE([LIRC_SERIAL_IRDEO_REMOTE],
275 [Define if you have an IRdeo remote transmitter])
277 AH_TEMPLATE([LIRC_SERIAL_NSLU2],
278 [Define if you have a Linksys NSLU2 and use CTS2+GreenLED])
280 AH_TEMPLATE([LIRC_SERIAL_SOFTCARRIER],
281 [Define if the software needs to generate the carrier frequency])
283 AH_TEMPLATE([LIRC_SERIAL_TRANSMITTER],
284 [Define if you have a IR diode connected to the serial port])
286 AH_TEMPLATE([LIRC_SIR_ACTISYS_ACT200L],
287 [Define if you want to use a Actisys Act200L])
289 AH_TEMPLATE([LIRC_SIR_ACTISYS_ACT220L],
290 [Define if you want to use a Actisys Act220L])
292 AH_TEMPLATE([LIRC_SIR_TEKRAM],
293 [Define if you want to use a Tekram Irmate 210])
295 AH_TEMPLATE([LIRC_SYSLOG],
296 [syslog facility to use])
298 AH_TEMPLATE([LIRC_IMON_LCD],
299 [Define if your iMON is an LCD and not a VFD.])
301 AH_TEMPLATE([LIRC_TIMER],
302 [Set the timer for the parallel port driver])
304 AH_TEMPLATE([LOCALSTATEDIR],
305 [modifiable single-machine data])
307 AH_TEMPLATE([LONG_IR_CODE],
308 [Define to use long long IR codes])
310 AH_TEMPLATE([MAINTAINER_MODE],
311 [define in maintainer mode])
313 AH_TEMPLATE([SYSCONFDIR],
314 [system configuration directory])
316 AH_TEMPLATE([USE_SYSLOG],
317 [define if you want to log to syslog instead of logfile])
319 if test -n "${LIBUSB_CONFIG}"; then
320 AC_DEFINE(HAVE_LIBUSB)
321 possible_drivers="${possible_drivers} (atilibusb) (commandir)"
323 AC_CHECK_LIB(caraca_client, caraca_init,
324 AC_DEFINE(HAVE_LIBCARACA)
325 possible_drivers="${possible_drivers} (caraca)"
327 AC_CHECK_HEADER(iguanaIR.h,
328 AC_DEFINE(HAVE_IGUANAIR)
329 possible_drivers="${possible_drivers} (iguanaIR)"
331 AC_CHECK_LIB(irman, ir_strerror,
332 AC_DEFINE(HAVE_LIBIRMAN)
333 possible_drivers="${possible_drivers} (irman)"
335 AC_CHECK_LIB(irman_sw, ir_strerror,
336 AC_DEFINE(HAVE_LIBIRMAN_SW)
337 possible_drivers="${possible_drivers} (irman_sw)"
339 dnl audio driver requires PortAudio library installed and some linker flags
340 AC_CHECK_HEADERS(portaudio.h,[
341 AC_CHECK_LIB(portaudio, Pa_Initialize,[
342 AC_DEFINE(HAVE_LIBPORTAUDIO)
343 possible_drivers="${possible_drivers} (audio)"
344 ],,${portaudio_lib_other}
347 dnl audio_alsa driver requires ALSA library installed and some linker flags
349 AC_CHECK_HEADERS(alsa/asoundlib.h,[
350 AC_CHECK_LIB(asound, snd_pcm_open,[
351 AC_DEFINE(HAVE_LIBALSA)
353 possible_drivers="${possible_drivers} (audio_alsa)"
357 dnl alsa_usb driver requires an ALSA that knows about our hwdep device
358 if test "$have_alsa" = "yes"; then
359 AC_MSG_CHECKING(for ALSA SB RC hwdep support)
360 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
361 #include <alsa/asoundlib.h>
363 if (snd_hwdep_info_get_iface(NULL) == SND_HWDEP_IFACE_SB_RC) {}
366 AC_DEFINE(HAVE_ALSA_SB_RC)
367 possible_drivers="${possible_drivers} (alsa_usb)"
372 dnl creative_infracd driver requires linux scsi api
373 AC_CHECK_HEADERS(scsi/sg.h,[
375 possible_drivers="${possible_drivers} (creative_infracd)"
378 dnl dev_input driver requires linux input device api
379 AC_CHECK_HEADERS(linux/input.h,[
380 AC_DEFINE(HAVE_LINUX_DEVINPUT)
381 possible_drivers="${possible_drivers} (devinput)"
384 dnl check if hiddev is available
385 AC_CHECK_HEADERS([linux/types.h])
386 AC_CHECK_HEADERS([linux/hiddev.h],[
387 possible_drivers="${possible_drivers} (dvico) (asusdh) (bw6130) (macmini)"
388 AC_MSG_CHECKING(for HIDDEV_FLAG_UREF support)
389 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
390 #include <linux/types.h>
391 #include <linux/hiddev.h>
393 int flag = HIDDEV_FLAG_UREF;
396 AC_DEFINE(HAVE_LINUX_HIDDEV_FLAG_UREF)
397 possible_drivers="${possible_drivers} (samsung) (sb0540)"
402 [#ifdef HAVE_LINUX_TYPES_H
403 #include <linux/types.h>
407 dnl dsp driver requires linux soundcard api
408 AC_CHECK_HEADERS(sys/soundcard.h,[
409 AC_DEFINE(HAVE_SOUNDCARD)
410 possible_drivers="${possible_drivers} (dsp)"
413 dnl i2cuser driver requires the Linux I2C API
414 AC_CHECK_HEADERS(linux/i2c-dev.h,[
415 possible_drivers="${possible_drivers} (i2cuser)"
419 dnl here we see what driver the user wants.
422 [ --with-driver=X specify the driver to use, where X is one of:
423 all, none, userspace, accent, act200l,
424 act220l, adaptec, alsa_usb, animax, asusdh,
425 atilibusb, atiusb, audio, audio_alsa
426 avermedia, avermedia_vdomate, avermedia98,
427 bestbuy, bestbuy2, breakoutbox, bte, bw6130,
428 caraca, chronos, cmdir, commandir, comX, cph06x,
429 creative, creative_infracd, devinput,
430 digimatrix, dsp, dvico, ea65, exaudio,
431 flyvideo, gvbctv5pci, hauppauge,
432 hauppauge_dvb, hercules_smarttv_stereo,
433 i2cuser, igorplugusb, iguanaIR, imon,
434 imon_24g, imon_knob, imon_lcd, imon_pad,
435 imon_rsc, irdeo, irdeo_remote, irlink,
436 irman, irreal, it87, ite8709, knc_one, kworld,
437 leadtek_0007, leadtek_0010, leadtek_pvr2000,
438 livedrive_midi, livedrive_seq, logitech,
439 lptX, macmini, mceusb, mceusb2, mediafocusI,
440 mouseremote, mouseremote_ps2, mp3anywhere,
441 mplay, nslu2,packard_bell, parallel, pcmak,
442 pcmak_usb, pctv, pixelview_bt878,
443 pixelview_pak, pixelview_pro, provideo,
444 realmagic, remotemaster, sa1100, samsung,
445 sasem, sb0540, serial, silitek, sir, slinke,
446 streamzap, tekram, tekram_bt829, tira,
447 ttusbir, tuxbox, tvbox, udp, uirt2,
448 uirt2_raw, usb_uirt_raw, usbx],
453 #START HARDWARE HEURISTIC
455 lirc_driver="$driver"
465 hw_module="hw_default.o receive.o transmit.o"
466 HW_DEFAULT="hw_default"
469 if test "$driver" = "none"; then
475 if test "$driver" = "userspace" -o "$driver" = "all"; then
476 AC_DEFINE(LIRC_DRIVER_ANY)
479 any_possible_drivers=`echo ${possible_drivers} | sed -e's/ /-/g' \
480 -e's/)-(/ /g' -e's/(//g' -e's/)//g' \
482 for any_driver in ${any_possible_drivers}; do
483 case ${any_driver} in
485 hw_module="${hw_module} hw_accent.o serial.o"
488 hw_module="${hw_module} hw_alsa_usb.o"
492 hw_module="${hw_module} hw_hiddev.o"
495 hw_module="${hw_module} hw_atilibusb.o receive.o"
496 atilibusb_lib=`${LIBUSB_CONFIG} --libs`
497 CFLAGS="$CFLAGS `${LIBUSB_CONFIG} --cflags`"
500 hw_module="${hw_module} hw_audio.o receive.o"
501 portaudio_lib="-lportaudio ${portaudio_lib_other}"
504 hw_module="${hw_module} hw_audio_alsa.o receive.o"
508 hw_module="${hw_module} hw_bte.o serial.o"
511 hw_module="${hw_module} hw_hiddev.o"
514 hw_module="${hw_module} hw_caraca.o"
515 caraca_lib=-lcaraca_client
518 hw_module="${hw_module} hw_creative.o serial.o"
521 hw_module="${hw_module} hw_creative_infracd.o"
524 hw_module="${hw_module} hw_commandir.o receive.o"
525 commandir_lib=`${LIBUSB_CONFIG} --libs`
526 CFLAGS="$CFLAGS `${LIBUSB_CONFIG} --cflags`"
529 hw_module="${hw_module} hw_devinput.o"
532 hw_module="${hw_module} hw_dsp.o receive.o"
535 hw_module="${hw_module} hw_hiddev.o"
538 hw_module="${hw_module} hw_ea65.o serial.o"
543 hw_module="${hw_module} hw_i2cuser.o receive.o"
546 hw_module="${hw_module} hw_iguanaIR.o transmit.o receive.o"
547 iguanaIR_lib=-liguanaIR
550 hw_module="${hw_module} hw_irlink.o serial.o receive.o"
553 hw_module="${hw_module} hw_irman.o serial.o"
556 # There is not much sense in using 'irman_sw' with driver
557 # 'any' and that would conflict with 'irman' which will
558 # probably also be available.
561 #hw_module="${hw_module} hw_irman.o serial.o"
562 #irman_lib=-lirman_sw
565 #hw_module="${hw_module} hw_irreal.o serial.o receive.o transmit.o"
567 lirc_dev-lirc_atiusb)
569 lirc_dev-commandir-lirc_cmdir)
572 #lirc_driver="${lirc_driver} lirc_dev lirc_gpio"
575 #lirc_driver="${lirc_driver} lirc_dev lirc_i2c"
577 lirc_dev-lirc_igorplugusb)
579 lirc_dev-lirc_ttusbir)
585 lirc_dev-lirc_ite8709)
587 lirc_dev-lirc_mceusb)
589 lirc_dev-lirc_mceusb2)
591 lirc_dev-lirc_parallel)
595 lirc_dev-lirc_serial)
599 lirc_dev-lirc_streamzap)
604 hw_module="${hw_module} hw_livedrive_common.o hw_livedrive_midi.o"
607 hw_module="${hw_module} hw_livedrive_common.o hw_livedrive_seq.o"
610 hw_module="${hw_module} hw_logitech.o serial.o"
613 hw_module="${hw_module} hw_hiddev.o"
618 hw_module="${hw_module} hw_mouseremote.o serial.o"
621 hw_module="${hw_module} hw_mouseremote.o serial.o"
624 hw_module="${hw_module} hw_mp3anywhere.o serial.o"
627 hw_module="${hw_module} hw_mplay.o serial.o"
630 hw_module="${hw_module} hw_pcmak.o serial.o"
633 hw_module="${hw_module} hw_pinsys.o serial.o"
636 hw_module="${hw_module} hw_pixelview.o serial.o"
639 hw_module="${hw_module} hw_hiddev.o"
642 hw_module="${hw_module} hw_hiddev.o"
645 hw_module="${hw_module} hw_silitek.o serial.o"
648 #hw_module="${hw_module} hw_slinke.o serial.o receive.o"
651 hw_module="${hw_module} hw_tira.o"
654 hw_module="${hw_module} hw_udp.o receive.o"
657 hw_module="${hw_module} hw_uirt2.o serial.o"
659 uirt2_raw|usb_uirt_raw)
660 hw_module="${hw_module} hw_uirt2_raw.o hw_uirt2_common.o serial.o receive.o transmit.o"
663 hw_module="${hw_module} hw_usbx.o serial.o"
669 #sed segfaults when $hw_module is too long :(
670 #hw_module=`echo ${hw_module}| sed \
672 # -e's/\(.*\)\(\<.*\) \(.*\) \2\(.*\)$/\1\2 \3\4/' \
676 { for token in $*; do echo $token; done; }
680 hw_module=$(newline_to_space $(space_to_newline ${hw_module}| sort -u))
684 if test "$driver" = "accent"; then
686 hw_module="hw_accent.o serial.o"
687 HW_DEFAULT="hw_accent"
688 lircd_conf="kanam_accent/lircd.conf.IR-100"
691 if test "$driver" = "act200l"; then
692 lirc_driver="lirc_dev lirc_sir"
693 AC_DEFINE(LIRC_SIR_ACTISYS_ACT200L)
696 if test "$driver" = "act220l"; then
697 lirc_driver="lirc_dev lirc_sir"
698 AC_DEFINE(LIRC_SIR_ACTISYS_ACT220L)
701 if test "$driver" = "adaptec"; then
702 lirc_driver="lirc_dev lirc_i2c"
703 lircd_conf="adaptec/lircd.conf.AVC-2410"
704 # lircmd_conf="adaptec/lircmd.conf.AVC-2410"
707 if test "$driver" = "alsa_usb"; then
708 lirc_driver="alsa_usb"
709 hw_module="hw_alsa_usb.o"
710 HW_DEFAULT="hw_alsa_usb"
712 lircd_conf="creative/lircd.conf.alsa_usb"
715 if test "$driver" = "animax"; then
716 lirc_driver="lirc_dev lirc_serial"
717 lircd_conf="animax/lircd.conf.animax"
718 lircmd_conf="animax/lircmd.conf.animax"
719 AC_DEFINE(LIRC_SERIAL_ANIMAX)
722 if test "$driver" = "asusdh"; then
723 lirc_driver="$driver"
724 hw_module="hw_hiddev.o"
725 HW_DEFAULT="hw_asusdh"
726 lircd_conf="asus/lircd.conf.asusdh"
729 if test "$driver" = "atiusb"; then
730 lirc_driver="lirc_dev lirc_atiusb"
731 lircd_conf="atiusb/lircd.conf.atiusb"
734 if test "$driver" = "atilibusb"; then
735 lirc_driver="$driver"
736 hw_module="hw_atilibusb.o receive.o"
737 HW_DEFAULT="hw_atilibusb"
738 lircd_conf="atiusb/lircd.conf.atilibusb"
739 if test -n "${LIBUSB_CONFIG}"; then
740 atilibusb_lib=`${LIBUSB_CONFIG} --libs`
741 CFLAGS="$CFLAGS `${LIBUSB_CONFIG} --cflags`"
745 if test "$driver" = "audio"; then
747 hw_module="hw_audio.o receive.o"
748 HW_DEFAULT="hw_audio"
749 portaudio_lib="-lportaudio ${portaudio_lib_other}"
752 if test "$driver" = "audio_alsa"; then
753 lirc_driver="audio_alsa"
754 hw_module="hw_audio_alsa.o receive.o"
755 HW_DEFAULT="hw_audio_alsa"
759 if test "$driver" = "avermedia"; then
760 lirc_driver="lirc_dev lirc_gpio"
761 lircd_conf="avermedia/lircd.conf.avermedia"
762 lircmd_conf="avermedia/lircmd.conf.avermedia"
765 if test "$driver" = "avermedia98"; then
766 lirc_driver="lirc_dev lirc_gpio"
767 lircd_conf="avermedia/lircd.conf.avermedia98"
768 lircmd_conf="avermedia/lircmd.conf.avermedia98"
771 if test "$driver" = "avermedia_vdomate"; then
772 lirc_driver="lirc_dev lirc_gpio"
773 lircd_conf="avermedia/lircd.conf.vdomate"
774 # lircmd_conf="avermedia/lircmd.conf.vdomate"
777 if test "$driver" = "bestbuy"; then
778 lirc_driver="lirc_dev lirc_gpio"
779 lircd_conf="bestbuy/lircd.conf.bestbuy"
780 lircmd_conf="bestbuy/lircmd.conf.bestbuy"
783 if test "$driver" = "bestbuy2"; then
784 lirc_driver="lirc_dev lirc_gpio"
785 lircd_conf="bestbuy/lircd.conf.bestbuy2"
786 lircmd_conf="bestbuy/lircmd.conf.bestbuy2"
789 if test "$driver" = "breakoutbox"; then
790 lirc_driver="lirc_dev lirc_i2c"
791 lircd_conf="creative/lircd.conf.breakoutbox"
794 if test "$driver" = "bte"; then
796 hw_module="hw_bte.o serial.o"
798 lircd_conf="ericsson/lircd.conf.bte"
799 # lircmd_conf="ericsson/lircmd.conf.bte"
802 if test "$driver" = "bw6130"; then
803 lirc_driver="$driver"
804 hw_module="hw_hiddev.o"
805 HW_DEFAULT="hw_bw6130"
806 lircd_conf="remotec/lircd.conf.BW6130"
807 lircmd_conf="remotec/lircmd.conf.BW6130"
810 if test "$driver" = "caraca"; then
812 hw_module="hw_caraca.o"
813 HW_DEFAULT="hw_caraca"
814 caraca_lib=-lcaraca_client
815 lircd_conf="caraca/lircd.conf.caraca"
816 # lircmd_conf="caraca/lircmd.conf.caraca"
819 if test "$driver" = "chronos"; then
820 lirc_driver="lirc_dev lirc_gpio"
821 lircd_conf="chronos/lircd.conf.chronos"
822 # lircmd_conf="chronos/lircmd.conf.chronos"
825 if test "$driver" = "cmdir"; then
826 lirc_driver="lirc_dev commandir lirc_cmdir"
829 if test "$driver" = "com1"; then
830 lirc_driver="lirc_dev lirc_serial"
835 if test "$driver" = "com2"; then
836 lirc_driver="lirc_dev lirc_serial"
841 if test "$driver" = "com3"; then
842 lirc_driver="lirc_dev lirc_serial"
847 if test "$driver" = "com4"; then
848 lirc_driver="lirc_dev lirc_serial"
853 if test "$driver" = "commandir"; then
854 lirc_driver="$driver"
855 hw_module="hw_commandir.o receive.o transmit.o"
856 HW_DEFAULT="hw_commandir"
857 lircd_conf="hauppauge/lircd.conf.hauppauge"
858 lircmd_conf="hauppauge/lircmd.conf.hauppauge"
859 if test -n "${LIBUSB_CONFIG}"; then
860 commandir_lib=`${LIBUSB_CONFIG} --libs`
861 CFLAGS="$CFLAGS `${LIBUSB_CONFIG} --cflags`"
865 if test "$driver" = "cph03x" -o "$driver" = "cph06x"; then
866 lirc_driver="lirc_dev lirc_gpio"
867 lircd_conf="cph03x/lircd.conf.cph03x"
868 # lircmd_conf="cph03x/lircmd.conf.cph03x"
871 if test "$driver" = "creative"; then
873 hw_module="hw_creative.o serial.o"
874 HW_DEFAULT="hw_creative"
875 lircd_conf="creative/lircd.conf.creative"
876 # lircmd_conf="creative/lircmd.conf.creative"
879 if test "$driver" = "creative_infracd"; then
881 hw_module="hw_creative_infracd.o"
882 HW_DEFAULT="hw_creative_infracd"
883 lircd_conf="creative/lircd.conf.infracd"
886 if test "$driver" = "devinput"; then
888 hw_module="hw_devinput.o"
889 HW_DEFAULT="hw_devinput"
890 # for table.html (unset later)
891 lircd_conf='<A HREF="http://linux.bytesex.org/v4l2/faq.html#lircd">generic config file for Linux input layer</A>'
894 if test "$driver" = "digimatrix"; then
895 lirc_driver="lirc_dev lirc_it87"
896 lircd_conf="asus/lircd.conf.digimatrix"
897 AC_DEFINE(LIRC_IT87_DIGIMATRIX)
900 if test "$driver" = "dsp"; then
902 hw_module="hw_dsp.o receive.o"
906 if test "$driver" = "dvico"; then
907 lirc_driver="$driver"
908 hw_module="hw_hiddev.o"
909 HW_DEFAULT="hw_dvico"
910 lircd_conf="dvico/lircd.conf.fusionHDTV"
913 if test "$driver" = "ea65"; then
915 hw_module="hw_ea65.o serial.o"
917 lircd_conf="ea65/lircd.conf.ea65"
920 if test "$driver" = "exaudio"; then
922 # lircd_conf="creative/lircd.conf.exaudio"
923 # lircmd_conf="creative/lircmd.conf.exaudio"
926 if test "$driver" = "flyvideo"; then
927 lirc_driver="lirc_dev lirc_gpio"
928 lircd_conf="life-view/lircd.conf.flyvideo"
929 lircmd_conf="life-view/lircmd.conf.flyvideo"
932 if test "$driver" = "gvbctv5pci"; then
933 lirc_driver="lirc_dev lirc_gpio"
934 lircd_conf="iodata/lircd.conf.gvbctv5pci"
935 # lircmd_conf="iodata/lircmd.conf.gvbctv5pci"
938 if test "$driver" = "hauppauge"; then
939 lirc_driver="lirc_dev lirc_i2c"
940 lircd_conf="hauppauge/lircd.conf.hauppauge"
941 lircmd_conf="hauppauge/lircmd.conf.hauppauge"
944 if test "$driver" = "hauppauge_dvb"; then
945 lirc_driver="lirc_dev"
946 lircd_conf="hauppauge/lircd.conf.hauppauge"
947 lircmd_conf="hauppauge/lircmd.conf.hauppauge"
950 if test "$driver" = "hercules_smarttv_stereo"; then
951 lirc_driver="lirc_dev lirc_i2c"
952 lircd_conf="hercules/lircd.conf.smarttv_stereo"
955 if test "$driver" = "i2cuser"; then
957 hw_module="hw_i2cuser.o receive.o"
958 HW_DEFAULT="hw_i2cuser"
961 if test "$driver" = "igorplugusb"; then
962 lirc_driver="lirc_dev lirc_igorplugusb"
965 if test "$driver" = "iguanaIR"; then
966 lirc_driver="iguanaIR"
967 hw_module="hw_iguanaIR.o transmit.o receive.o"
968 HW_DEFAULT="hw_iguanaIR"
969 iguanaIR_lib=-liguanaIR
972 if test "$driver" = "imon"; then
973 lirc_driver="lirc_dev lirc_imon"
974 lircd_conf="imon/lircd.conf.imon"
977 if test "$driver" = "imon_24g"; then
978 lirc_driver="lirc_dev lirc_imon"
979 lircd_conf="imon/lircd.conf.imon-2.4g"
982 if test "$driver" = "imon_knob"; then
983 lirc_driver="lirc_dev lirc_imon"
984 lircd_conf="imon/lircd.conf.imon-knob"
987 if test "$driver" = "imon_lcd"; then
988 lirc_driver="lirc_dev lirc_imon"
989 lircd_conf="imon/lircd.conf.imon"
990 AC_DEFINE(LIRC_IMON_LCD)
993 if test "$driver" = "imon_pad"; then
994 lirc_driver="lirc_dev lirc_imon"
995 lircd_conf="imon/lircd.conf.imon-pad"
998 if test "$driver" = "imon_rsc"; then
999 lirc_driver="lirc_dev lirc_imon"
1000 lircd_conf="imon/lircd.conf.imon-rsc"
1003 if test "$driver" = "irdeo"; then
1004 lirc_driver="lirc_dev lirc_serial"
1005 AC_DEFINE(LIRC_SERIAL_IRDEO)
1008 if test "$driver" = "irdeo_remote"; then
1009 lirc_driver="lirc_dev lirc_serial"
1010 AC_DEFINE(LIRC_SERIAL_IRDEO_REMOTE)
1013 if test "$driver" = "irlink"; then
1015 hw_module="hw_irlink.o serial.o receive.o"
1016 HW_DEFAULT="hw_irlink"
1019 if test "$driver" = "irman"; then
1021 hw_module="hw_irman.o serial.o"
1022 HW_DEFAULT="hw_irman"
1026 if test "$driver" = "irman_sw"; then
1027 lirc_driver="irman_sw"
1028 hw_module="hw_irman.o serial.o"
1029 HW_DEFAULT="hw_irman"
1030 irman_lib=-lirman_sw
1033 if test "$driver" = "irreal"; then
1035 hw_module="hw_irreal.o serial.o receive.o transmit.o"
1036 HW_DEFAULT="hw_irreal"
1039 if test "$driver" = "it87"; then
1040 lirc_driver="lirc_dev lirc_it87"
1043 if test "$driver" = "ite8709"; then
1044 lirc_driver="lirc_dev lirc_ite8709"
1047 if test "$driver" = "knc_one"; then
1048 lirc_driver="lirc_dev lirc_i2c"
1049 lircd_conf="knc_one/lircd.conf.knc_one"
1050 # lircmd_conf="knc_one/lircmd.conf.knc_one"
1053 if test "$driver" = "kworld"; then
1054 lirc_driver="lirc_dev lirc_gpio"
1055 lircd_conf="kworld/lircd.conf.kworld"
1056 # lircmd_conf="kworld/lircmd.conf.kworld"
1059 if test "$driver" = "leadtek_0007"; then
1060 lirc_driver="lirc_dev lirc_gpio"
1061 lircd_conf="leadtek/lircd.conf.RM-0007"
1062 lircmd_conf="leadtek/lircmd.conf.RM-0007"
1065 if test "$driver" = "leadtek_0010"; then
1066 lirc_driver="lirc_dev lirc_gpio"
1067 lircd_conf="leadtek/lircd.conf.RM-0010"
1068 lircmd_conf="leadtek/lircmd.conf.RM-0010"
1071 if test "$driver" = "leadtek_pvr2000"; then
1072 lirc_driver="lirc_dev lirc_i2c"
1073 lircd_conf="leadtek/lircd.conf.PVR2000"
1074 # lircmd_conf="leadtek/lircmd.conf.PVR2000"
1077 if test "$driver" = "livedrive_midi"; then
1079 hw_module="hw_livedrive_common.o hw_livedrive_midi.o"
1080 HW_DEFAULT="hw_livedrive_midi"
1081 lircd_conf="creative/lircd.conf.livedrive"
1082 # lircmd_conf="creative/lircmd.conf.livedrive"
1085 if test "$driver" = "livedrive_seq"; then
1087 hw_module="hw_livedrive_common.o hw_livedrive_seq.o"
1088 HW_DEFAULT="hw_livedrive_seq"
1089 lircd_conf="creative/lircd.conf.livedrive"
1090 # lircmd_conf="creative/lircmd.conf.livedrive"
1093 if test "$driver" = "logitech"; then
1095 hw_module="hw_logitech.o serial.o"
1096 HW_DEFAULT="hw_logitech"
1097 lircd_conf="logitech/lircd.conf.logitech"
1098 lircmd_conf="logitech/lircmd.conf.logitech"
1101 if test "$driver" = "lpt1"; then
1102 lirc_driver="lirc_dev lirc_parallel"
1107 if test "$driver" = "lpt2"; then
1108 lirc_driver="lirc_dev lirc_parallel"
1113 if test "$driver" = "macmini"; then
1114 lirc_driver="$driver"
1115 hw_module="hw_hiddev.o"
1116 HW_DEFAULT="hw_macmini"
1117 lircd_conf="apple/lircd.conf.macmini"
1120 if test "$driver" = "mceusb"; then
1121 lirc_driver="lirc_dev lirc_mceusb"
1122 lircd_conf="mceusb/lircd.conf.mceusb"
1125 if test "$driver" = "mceusb2"; then
1126 lirc_driver="lirc_dev lirc_mceusb2"
1127 lircd_conf="mceusb/lircd.conf.mceusb"
1130 if test "$driver" = "mediafocusI"; then
1132 lircd_conf="technisat/lircd.conf.mediafocusI"
1133 # lircmd_conf="technisat/lircmd.conf.mediafocusI"
1136 if test "$driver" = "mouseremote"; then
1138 hw_module="hw_mouseremote.o serial.o"
1139 HW_DEFAULT="hw_mouseremote"
1140 lircd_conf="x10/lircd.conf.mouseremote"
1141 lircmd_conf="x10/lircmd.conf.mouseremote"
1144 if test "$driver" = "mouseremote_ps2"; then
1146 hw_module="hw_mouseremote.o serial.o"
1147 HW_DEFAULT="hw_mouseremote_ps2"
1148 lircd_conf="x10/lircd.conf.mouseremote"
1149 lircmd_conf="x10/lircmd.conf.mouseremote"
1152 if test "$driver" = "mp3anywhere"; then
1154 hw_module="hw_mp3anywhere.o serial.o"
1155 HW_DEFAULT="hw_mp3anywhere"
1156 lircd_conf="x10/lircd.conf.mp3anywhere"
1159 if test "$driver" = "mplay"; then
1161 hw_module="hw_mplay.o serial.o"
1162 HW_DEFAULT="hw_mplay"
1163 lircd_conf="vlsystem/lircd.conf.mplay"
1166 if test "$driver" = "nslu2"; then
1167 lirc_driver="lirc_dev lirc_serial"
1168 AC_DEFINE(LIRC_SERIAL_NSLU2)
1171 if test "$driver" = "packard_bell"; then
1172 lirc_driver="lirc_dev lirc_serial"
1173 lircd_conf="packard_bell/lircd.conf.packard_bell"
1176 if test "$driver" = "parallel"; then
1177 lirc_driver="lirc_dev lirc_parallel"
1180 if test "$driver" = "pcmak" -o "$driver" = "pcmak_usb"; then
1182 hw_module="hw_pcmak.o serial.o"
1183 HW_DEFAULT="hw_pcmak"
1184 lircd_conf="pcmak/lircd.conf.pcmak"
1185 lircmd_conf="pcmak/lircmd.conf.pcmak"
1188 if test "$driver" = "pctv"; then
1190 hw_module="hw_pinsys.o serial.o"
1191 HW_DEFAULT="hw_pinsys"
1192 lircd_conf="pinnacle_systems/lircd.conf.pctv"
1193 # lircmd_conf="pinnacle_systems/lircmd.conf.pctv"
1196 if test "$driver" = "pixelview_bt878"; then
1197 lirc_driver="lirc_dev lirc_i2c"
1198 lircd_conf="pixelview/lircd.conf.playtv_bt878"
1199 # lircmd_conf="pixelview/lircmd.conf.pixelview_bt878"
1202 if test "$driver" = "pixelview_pak"; then
1203 lirc_driver="lirc_dev lirc_gpio"
1204 # the config files are the same as for the PlayTV pro
1205 lircd_conf="pixelview/lircd.conf.playtv_pro"
1206 lircmd_conf="pixelview/lircmd.conf.playtv_pro"
1209 if test "$driver" = "pixelview_pro"; then
1210 lirc_driver="lirc_dev lirc_gpio"
1211 lircd_conf="pixelview/lircd.conf.playtv_pro"
1212 lircmd_conf="pixelview/lircmd.conf.playtv_pro"
1215 if test "$driver" = "provideo"; then
1216 lirc_driver="lirc_dev lirc_i2c"
1217 lircd_conf="provideo/lircd.conf.pv951"
1218 # lircmd_conf="provideo/lircmd.conf.pv951"
1221 if test "$driver" = "realmagic"; then
1223 hw_module="hw_pixelview.o serial.o"
1224 HW_DEFAULT="hw_pixelview"
1225 lircd_conf="sigma_designs/lircd.conf.realmagic"
1226 # lircmd_conf="sigma_designs/lircmd.conf.realmagic"
1229 if test "$driver" = "remotemaster"; then
1231 hw_module="hw_pixelview.o serial.o"
1232 HW_DEFAULT="hw_pixelview"
1233 lircd_conf="pixelview/lircd.conf.remotemaster"
1234 lircmd_conf="pixelview/lircmd.conf.remotemaster"
1237 if test "$driver" = "sa1100"; then
1238 lirc_driver="lirc_dev lirc_sir"
1239 AC_DEFINE(LIRC_ON_SA1100)
1242 if test "$driver" = "sasem"; then
1243 lirc_driver="lirc_dev lirc_sasem"
1244 lircd_conf="sasem/lircd.conf.sasem"
1247 if test "$driver" = "samsung"; then
1248 lirc_driver="$driver"
1249 hw_module="hw_hiddev.o"
1250 HW_DEFAULT="hw_samsung"
1251 lircd_conf="samsung/lircd.conf.samsung"
1254 if test "$driver" = "sb0540"; then
1255 lirc_driver="$driver"
1256 hw_module="hw_hiddev.o"
1257 HW_DEFAULT="hw_sb0540"
1258 # original RM-1500 is included here
1259 lircd_conf="creative/lircd.conf.alsa_usb"
1262 if test "$driver" = "serial"; then
1263 lirc_driver="lirc_dev lirc_serial"
1266 if test "$driver" = "silitek"; then
1268 hw_module="hw_silitek.o serial.o"
1269 HW_DEFAULT="hw_silitek"
1270 lircd_conf="silitek/lircd.conf.silitek"
1271 lircmd_conf="silitek/lircmd.conf.silitek"
1274 if test "$driver" = "sir"; then
1275 lirc_driver="lirc_dev lirc_sir"
1278 if test "$driver" = "sir_com3"; then
1279 lirc_driver="lirc_dev lirc_sir"
1284 if test "$driver" = "slinke"; then
1286 echo "Please use lirc-0.6.5. The Slink-e is no longer supported."
1290 hw_module="hw_slinke.o serial.o receive.o"
1291 HW_DEFAULT="hw_slinke"
1294 if test "$driver" = "streamzap"; then
1295 lirc_driver="lirc_dev lirc_streamzap"
1296 lircd_conf="streamzap/lircd.conf.streamzap"
1299 if test "$driver" = "tekram"; then
1300 lirc_driver="lirc_dev lirc_sir"
1301 AC_DEFINE(LIRC_SIR_TEKRAM)
1304 if test "$driver" = "tekram_bt829"; then
1305 lirc_driver="lirc_dev lirc_bt829"
1306 lircd_conf="tekram/lircd.conf.m230"
1307 lircmd_conf="tekram/lircmd.conf.m230"
1310 if test "$driver" = "tira"; then
1312 hw_module="hw_tira.o serial.o"
1313 HW_DEFAULT="hw_tira"
1316 if test "$driver" = "ttusbir"; then
1317 lirc_driver="lirc_dev lirc_ttusbir"
1320 if test "$driver" = "tuxbox"; then
1322 hw_module="hw_default.o receive.o transmit.o"
1323 HW_DEFAULT="hw_default"
1326 if test "$driver" = "tvbox"; then
1327 lirc_driver="lirc_dev lirc_i2c"
1328 lircd_conf="asus/lircd.conf.asus"
1331 if test "$driver" = "udp"; then
1333 hw_module="hw_udp.o receive.o"
1337 if test "$driver" = "uirt2"; then
1339 hw_module="hw_uirt2.o serial.o"
1340 HW_DEFAULT="hw_uirt2"
1342 if test "$driver" = "uirt2_raw"; then
1344 hw_module="hw_uirt2_raw.o hw_uirt2_common.o serial.o receive.o transmit.o"
1345 HW_DEFAULT="hw_uirt2_raw"
1347 if test "$driver" = "usb_uirt_raw"; then
1349 hw_module="hw_uirt2_raw.o hw_uirt2_common.o serial.o receive.o transmit.o"
1350 HW_DEFAULT="hw_usb_uirt_raw"
1352 if test "$driver" = "usbx"; then
1354 hw_module="hw_usbx.o serial.o"
1355 HW_DEFAULT="hw_usbx"
1356 lircd_conf="adstech/lircd.conf.usbx-707"
1359 #END HARDWARE HEURISTIC
1361 if test "$driver" = "devinput"; then
1366 AC_DEFINE_UNQUOTED(HW_DEFAULT, ${HW_DEFAULT})
1368 dnl now check to see if the user is behaving himself
1370 if test "$lirc_driver" = "unset"; then
1371 AC_MSG_ERROR([no driver specified, try ./configure --help])
1374 if echo ${possible_drivers} | grep "($lirc_driver)" >/dev/null 2>&1; then
1377 case $lirc_driver in
1379 AC_MSG_ERROR([*** you need to first install the libirman package
1380 (libirman-0.4.2 or better) before you can use this driver])
1383 AC_MSG_ERROR([*** you need to first install the caraca package
1384 before you can use this driver])
1387 AC_MSG_ERROR([*** you need to have the Linux kernel source installed
1391 AC_MSG_ERROR([*** you need to have libusb installed for this driver.
1395 http://libusb.sourceforge.net/
1399 AC_MSG_ERROR([*** you need to have the PortAudio library V18 installed
1400 to use the audio driver. You can get it at:
1401 http://www.inf.ethz.ch/~mringwal/downloads/portaudio_v18_with_configure.zip
1402 Extract the package and do a \"./configure && make && sudo make install\"
1407 AC_MSG_ERROR([*** you need to have the ALSA headers and libraries
1411 AC_MSG_ERROR([*** you need to have the ALSA libraries and drivers
1412 from at least version 1.0.9 for this driver])
1415 AC_MSG_ERROR([*** you need to have libusb installed for this driver.
1419 http://libusb.sourceforge.net/
1421 Or install these packages from your distro:
1429 AC_MSG_ERROR([*** you need to have the iguanaIR headers and
1430 libraries for this driver])
1433 AC_MSG_ERROR([*** it is not possible to install the specified driver
1439 dnl now we've checked, we can rename things for the drivers/Makefile
1441 if test "$lirc_driver" = "none" || \
1442 test "$lirc_driver" = "alsa_usb" || \
1443 test "$lirc_driver" = "asusdh" || \
1444 test "$lirc_driver" = "atilibusb" || \
1445 test "$lirc_driver" = "audio" || \
1446 test "$lirc_driver" = "audio_alsa" || \
1447 test "$lirc_driver" = "bw6130" || \
1448 test "$lirc_driver" = "caraca" || \
1449 test "$lirc_driver" = "commandir" || \
1450 test "$lirc_driver" = "dvico" || \
1451 test "$lirc_driver" = "iguanaIR" || \
1452 test "$lirc_driver" = "irman" || \
1453 test "$lirc_driver" = "irman_sw" || \
1454 test "$lirc_driver" = "macmini" || \
1455 test "$lirc_driver" = "samsung" || \
1456 test "$lirc_driver" = "sb0540" || \
1457 test "$lirc_driver" = "userspace"; then
1459 elif test "$lirc_driver" = "all"; then
1460 lirc_driver="lirc_dev \
1479 if kernel_module=$(expr "$lirc_driver" : 'lirc_dev \(.*\)'); then
1481 elif test "$lirc_driver" != ""; then
1482 kernel_module=$lirc_driver
1485 dnl slightly more advanced options
1487 dnl maintainer mode options
1489 maintmode_daemons_extra=
1490 AC_ARG_ENABLE(maintainer-mode,
1491 [ --enable-maintainer-mode enable maintainer specific things],
1493 if test x${enableval} = xyes; then
1494 AC_DEFINE(MAINTAINER_MODE)
1495 maintmode_daemons_extra="lircd.simrec lircd.simsend slinke"
1499 dnl don't create nor destroy devices when installing and uninstalling
1501 AC_ARG_ENABLE(sandboxed,
1502 [ --enable-sandboxed don't touch anything out of the install directory],
1503 [ enable_sandboxed="${enableval}" ],
1504 [ enable_sandboxed="no"])
1505 AM_CONDITIONAL(SANDBOXED, test x$enable_sandboxed = xyes)
1508 [ --with-devdir=DIR Install device files in DIR (/dev)],
1510 devdir=${devdir_default})
1512 default_moduledir=/lib/modules/`uname -r`/misc
1513 AC_ARG_WITH(moduledir,
1514 [ --with-moduledir=DIR kernel modules in DIR (/lib/modules/`uname -r`/misc)],
1515 moduledir=${withval},
1516 moduledir=${default_moduledir})
1518 AC_ARG_ENABLE(long-codes,
1519 [ --disable-long-codes use this if your compiler won't do long long],
1520 test x${enableval} = xyes && AC_DEFINE(LONG_IR_CODE),
1521 AC_DEFINE(LONG_IR_CODE))
1523 AC_ARG_ENABLE(dyncodes,
1524 [ --enable-dyncodes use dynamic codes],
1525 test x${enableval} = xyes && AC_DEFINE(DYNCODES))
1528 [ --with-major=value specify the device major for the driver (61)],
1529 lirc_major=${withval},
1533 [ --with-port=port specify the port number for the lirc device.],
1538 [ --with-irq=irq specify the irq line for the lirc device.],
1543 [ --with-timer=value specify the timer value for the parallel driver],
1546 dnl I dont think libirman will accept this at the moment
1548 [ --with-tty=file specify the tty to use (Irman, RemoteMaster, etc.)],
1551 AC_ARG_WITH(soft-carrier,
1552 [ --without-soft-carrier use this if your serial hw generates carrier],
1553 test x${withval} = xyes && AC_DEFINE(LIRC_SERIAL_SOFTCARRIER),
1554 AC_DEFINE(LIRC_SERIAL_SOFTCARRIER))
1556 AC_ARG_WITH(transmitter,
1557 [ --with-transmitter use this if you use a transmitter diode],
1558 test x${withval} = xyes && AC_DEFINE(LIRC_SERIAL_TRANSMITTER))
1561 [ --with-igor use this if you have an Igor Cesko receiver],
1562 test x${withval} = xyes && AC_DEFINE(LIRC_SERIAL_IGOR))
1564 AC_ARG_ENABLE(debug,
1565 [ --enable-debug enable debugging features],
1566 test x${enableval} = xyes && AC_DEFINE(DEBUG)
1569 AC_ARG_ENABLE(daemonize,
1570 [ --disable-daemonize disable daemons from daemonizing],
1571 test x${enableval} = xyes && AC_DEFINE(DAEMONIZE),
1573 AC_CHECK_FUNCS(daemon)
1574 if test "$ac_cv_func_daemon" != yes; then
1576 AC_CHECK_LIB(bsd,daemon,daemon="-lbsd")
1577 if test "$daemon" = ""; then
1578 AC_MSG_ERROR([*** daemon() function not available on this system and --disable-daemonize not specified])
1581 AC_DEFINE(DAEMONIZE)
1585 [ --with-syslog=facility use syslog instead of logfile],
1586 if test -n "${withval}"; then
1587 facility="${withval}"
1588 if test "${withval}" = yes; then
1589 facility=LOG_DAEMON;
1590 elif test "${withval}" = LOG_AUTH; then
1592 elif test "${withval}" = LOG_AUTHPRIV; then
1594 elif test "${withval}" = LOG_DAEMON; then
1596 elif test "${withval}" = LOG_LOCAL0; then
1598 elif test "${withval}" = LOG_LOCAL1; then
1600 elif test "${withval}" = LOG_LOCAL2; then
1602 elif test "${withval}" = LOG_LOCAL3; then
1604 elif test "${withval}" = LOG_LOCAL4; then
1606 elif test "${withval}" = LOG_LOCAL5; then
1608 elif test "${withval}" = LOG_LOCAL6; then
1610 elif test "${withval}" = LOG_LOCAL7; then
1612 elif test "${withval}" = LOG_USER; then
1615 AC_MSG_ERROR([*** invalid facility (see syslog(3) for possible facilities) ])
1617 AC_DEFINE(USE_SYSLOG)
1621 dnl if --prefix is not specified, then $prefix is still set to NONE by
1622 dnl configure. That's bad here where we want to expand it!
1624 test "x${prefix}" = "xNONE" && prefix=$ac_default_prefix
1625 test "${sysconfdir}" = "\${prefix}/etc" && sysconfdir=/etc
1626 test "${localstatedir}" = "\${prefix}/var" && localstatedir=/var
1627 sysconfdir_exp=`eval "echo ${sysconfdir}"`
1628 localstatedir_exp=`eval "echo ${localstatedir}"`
1632 if ! echo ${hw_module}|grep " receive.o" >/dev/null; then
1636 hw_module_libs="${alsa_lib} ${atilibusb_lib} ${caraca_lib} ${commandir_lib} ${iguanaIR_lib} ${irman_lib} ${portaudio_lib}"
1638 dnl tell the Makefiles what we decided
1642 AC_SUBST(sysconfdir)
1644 AC_SUBST(lirc_major)
1646 AC_SUBST(lirc_driver)
1647 AC_SUBST(hw_module_libs)
1653 AC_SUBST(lircd_conf)
1654 AC_SUBST(lircmd_conf)
1655 AC_SUBST(maintmode_daemons_extra)
1657 if test "$lirc_driver" = "lirc_dev commandir lirc_cmdir"; then
1658 lirc_driver="lirc_dev lirc_cmdir"
1661 dnl tell the C code what we decided
1662 AC_DEFINE_UNQUOTED(DEVDIR, "$devdir")
1663 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir_exp")
1664 AC_DEFINE_UNQUOTED(LOCALSTATEDIR, "$localstatedir_exp")
1665 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
1666 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
1668 AC_DEFINE_UNQUOTED(LIRC_DRIVER, "$driver")
1669 AC_DEFINE_UNQUOTED(LIRC_MAJOR, $lirc_major)
1670 if test "$port" != ""; then
1671 AC_DEFINE_UNQUOTED(LIRC_PORT, $port)
1673 if test "$irq" != ""; then
1674 AC_DEFINE_UNQUOTED(LIRC_IRQ, $irq)
1676 if test "$timer" != ""; then
1677 AC_DEFINE_UNQUOTED(LIRC_TIMER, $timer)
1679 AC_DEFINE_UNQUOTED(LIRC_IRTTY, "$irtty")
1680 AC_DEFINE_UNQUOTED(LIRC_SYSLOG, $facility)
1683 /* device file names - beneath DEVDIR (default /dev) */
1684 #define DEV_LIRC "lirc"
1685 #define DEV_LIRCD "lircd"
1686 #define DEV_LIRCM "lircm"
1688 /* config file names - beneath SYSCONFDIR (default /etc) */
1689 #define CFG_LIRCD "lircd.conf"
1690 #define CFG_LIRCM "lircmd.conf"
1692 /* config file names - beneath $HOME or SYSCONFDIR */
1693 #define CFG_LIRCRC "lircrc"
1696 #define LOG_LIRCD "lircd"
1697 #define LOG_LIRMAND "lirmand"
1700 #define PID_LIRCD "lircd.pid"
1702 /* default port number */
1703 #define LIRC_INET_PORT 8765
1707 #ifdef LIRC_HAVE_DEVFS
1708 #define LIRC_DRIVER_DEVICE DEVDIR "/" DEV_LIRC "/0"
1710 #define LIRC_DRIVER_DEVICE DEVDIR "/" DEV_LIRC
1711 #endif /* LIRC_HAVE_DEVFS */
1713 #define LIRC_IRTTY DEVDIR "/" "ttyS0"
1715 #define LIRCD DEVDIR "/" DEV_LIRCD
1716 #define LIRCM DEVDIR "/" DEV_LIRCM
1718 #define LIRCDCFGFILE SYSCONFDIR "/" CFG_LIRCD
1719 #define LIRCMDCFGFILE SYSCONFDIR "/" CFG_LIRCM
1721 #define LIRCRC_USER_FILE "." CFG_LIRCRC
1722 #define LIRCRC_ROOT_FILE SYSCONFDIR "/" CFG_LIRCRC
1724 #define LOGFILE LOCALSTATEDIR "/log/" LOG_LIRCD
1725 #define LIRMAND_LOGFILE LOCALSTATEDIR "/log/" LOG_LIRMAND
1727 #define PIDFILE LOCALSTATEDIR "/run/" PID_LIRCD
1729 #define LIRC_RELEASE_SUFFIX "_UP"
1732 dnl bug in automake/autoconf?
1733 dnl SHELL=/bin/sh AC_SUBST(SHELL)
1735 dnl write these decisions out to the Makefiles
1739 drivers/lirc_atiusb/Makefile
1740 drivers/lirc_bt829/Makefile
1741 drivers/lirc_cmdir/Makefile
1742 drivers/lirc_dev/Makefile
1743 drivers/lirc_gpio/Makefile
1744 drivers/lirc_i2c/Makefile
1745 drivers/lirc_igorplugusb/Makefile
1746 drivers/lirc_ttusbir/Makefile
1747 drivers/lirc_imon/Makefile
1748 drivers/lirc_it87/Makefile
1749 drivers/lirc_ite8709/Makefile
1750 drivers/lirc_mceusb/Makefile
1751 drivers/lirc_mceusb2/Makefile
1752 drivers/lirc_parallel/Makefile
1753 drivers/lirc_sasem/Makefile
1754 drivers/lirc_serial/Makefile
1755 drivers/lirc_sir/Makefile
1756 drivers/lirc_streamzap/Makefile
1765 if test "$driver" = "all"; then
1766 echo "All kernel modules will be built."
1767 elif test "$driver" = "mediafocusI"; then
1768 echo "You will have to use the MediaFocus driver from:"
1769 echo "http://freenet-homepage.de/mediafocus/"
1770 elif test "$driver" = "exaudio"; then
1771 echo "You will have to use the Exaudio driver from:"
1772 echo "http://exaudio.sourceforge.net/"
1773 elif test "$driver" = "alsa_usb"; then
1774 echo "You will have to use the snd-usb-audio driver from:"
1775 echo "http://www.alsa-project.org/"
1776 elif test "$driver" = "hauppauge_dvb"; then
1777 echo "You will have to use the DVB driver from:"
1778 echo "http://www.linuxtv.org"
1779 elif test "$kernel_module" = ""; then
1780 echo "Your hardware does not require a special LIRC kernel module."
1781 if test "${irtty}" != ""; then
1783 echo "You will have to use the suitable kernel driver to access ${irtty}."
1786 echo "You will have to use the $kernel_module kernel module."
1789 echo "Now enter 'make' and 'make install' to compile and install the package."