aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure162
-rw-r--r--configure.in3
-rw-r--r--drivers.m414
4 files changed, 173 insertions, 9 deletions
diff --git a/config.h.in b/config.h.in
index ad784b4..ee5a8d2 100644
--- a/config.h.in
+++ b/config.h.in
@@ -28,6 +28,9 @@
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
+/* Define to 1 if you have the <ftdi.h> header file. */
+#undef HAVE_FTDI_H
+
/* Define to 1 if you have the <gd/gd.h> header file. */
#undef HAVE_GD_GD_H
diff --git a/configure b/configure
index 7536685..f28d8cf 100755
--- a/configure
+++ b/configure
@@ -7253,6 +7253,155 @@ fi
done
+# check for ftdi.h (ULA200)
+
+for ac_header in ftdi.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ---------------------------------------------------- ##
+## Report this to lcd4linux-users@lists.sourceforge.net ##
+## ---------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ has_ftdi="true"
+else
+ has_ftdi="false"; break
+fi
+
+done
+
+
# check for python
{ echo "$as_me:$LINENO: checking if python support is wanted" >&5
echo $ECHO_N "checking if python support is wanted... $ECHO_C" >&6; }
@@ -8197,15 +8346,20 @@ echo "$as_me: WARNING: usb.h not found: Trefon driver disabled" >&2;}
fi
if test "$ULA200" = "yes"; then
- TEXT="yes"
- LIBUSB="yes"
- LIBFTDI="yes"
- DRIVERS="$DRIVERS drv_ula200.o"
+ if test "$has_ftdi" = "true"; then
+ TEXT="yes"
+ LIBUSB="yes"
+ LIBFTDI="yes"
+ DRIVERS="$DRIVERS drv_ula200.o"
cat >>confdefs.h <<\_ACEOF
#define WITH_ULA200 1
_ACEOF
+ else
+ { echo "$as_me:$LINENO: WARNING: ftdi.h not found: ULA200 driver disabled" >&5
+echo "$as_me: WARNING: ftdi.h not found: ULA200 driver disabled" >&2;}
+ fi
fi
if test "$USBHUB" = "yes"; then
diff --git a/configure.in b/configure.in
index 78ff1e6..837a3b9 100644
--- a/configure.in
+++ b/configure.in
@@ -83,6 +83,9 @@ AC_CHECK_HEADERS(st2205.h, [has_st2205="true"], [has_st2205="false"])
# check for LCD-Linux
AC_CHECK_HEADERS(linux/lcd-linux.h linux/hd44780.h, [has_lcd_linux="true"], [has_lcd_linux="false"; break])
+# check for ftdi.h (ULA200)
+AC_CHECK_HEADERS(ftdi.h, [has_ftdi="true"], [has_ftdi="false"; break])
+
# check for python
AC_MSG_CHECKING(if python support is wanted)
AC_ARG_WITH(python,
diff --git a/drivers.m4 b/drivers.m4
index deab189..4f5a392 100644
--- a/drivers.m4
+++ b/drivers.m4
@@ -567,11 +567,15 @@ if test "$Trefon" = "yes"; then
fi
if test "$ULA200" = "yes"; then
- TEXT="yes"
- LIBUSB="yes"
- LIBFTDI="yes"
- DRIVERS="$DRIVERS drv_ula200.o"
- AC_DEFINE(WITH_ULA200,1,[ULA200 driver])
+ if test "$has_ftdi" = "true"; then
+ TEXT="yes"
+ LIBUSB="yes"
+ LIBFTDI="yes"
+ DRIVERS="$DRIVERS drv_ula200.o"
+ AC_DEFINE(WITH_ULA200,1,[ULA200 driver])
+ else
+ AC_MSG_WARN(ftdi.h not found: ULA200 driver disabled)
+ fi
fi
if test "$USBHUB" = "yes"; then