fi
# PCMCIA driver modules
# (Try and mimic checks done by configure script.)
-if grep -q '^CONFIG_PCMCIA=[ym]' ${kernel_source_dir}/.config 2>/dev/null &&
- tr '\n' ' ' < /lib/modules/${kernelver}/source/include/pcmcia/ds.h 2>/dev/null |
+if grep -q '^CONFIG_PCMCIA=[ym]' ${kernel_source_dir}/.config 2>/dev/null ; then
+if test -d /lib/modules/${kernelver}/source ; then
+ src=/lib/modules/${kernelver}/source
+else
+ src=${kernel_src_dir}
+fi
+if test -f ${src}/include/pcmcia/ds.h ; then
+if tr '\n' ' ' < ${src}/include/pcmcia/ds.h 2>/dev/null |
grep -q 'struct[[:space:]]\+pcmcia_driver[[:space:]]*{[^}]*probe' ; then
BUILT_MODULE_NAME[$nn]="cb_das16_cs"
BUILT_MODULE_LOCATION[$nn]="comedi/drivers/"
BUILT_MODULE_LOCATION[$nn]="comedi/drivers/"
DEST_MODULE_LOCATION[$((nn++))]="/kernel/comedi/drivers/"
fi
+fi
+fi
# real-time driver modules
if grep -q '^CONFIG_\(RTHAL\|ADEOS\|IPIPE\)=y' ${kernel_source_dir}/.config 2>/dev/null ; then
BUILT_MODULE_NAME[$nn]="comedi_rt_timer"